Bug 482923: 
Port, part and property replication could be specified as a constant
string (part 4)

Added test models under models/tests/codepattern/structure. All are
named SymbolicReplication<N>

Change-Id: I7142d9d0c2963d885a15d74180a48aaca52e1584
Signed-off-by: Ernesto Posse <eposse@gmail.com>
diff --git a/models/tests/codepattern/structure/SymbolicReplication1/.project b/models/tests/codepattern/structure/SymbolicReplication1/.project
new file mode 100644
index 0000000..3d89049
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication1/.project
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>SymbolicReplication1</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+	</natures>
+</projectDescription>
diff --git a/models/tests/codepattern/structure/SymbolicReplication1/SymbolicReplication1.di b/models/tests/codepattern/structure/SymbolicReplication1/SymbolicReplication1.di
new file mode 100644
index 0000000..bf9abab
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication1/SymbolicReplication1.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/models/tests/codepattern/structure/SymbolicReplication1/SymbolicReplication1.notation b/models/tests/codepattern/structure/SymbolicReplication1/SymbolicReplication1.notation
new file mode 100644
index 0000000..524dd23
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication1/SymbolicReplication1.notation
@@ -0,0 +1,95 @@
+<?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:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_z0DKENdkEea_OZb9wPvKIQ" type="CompositeStructure" measurementUnit="Pixel">
+  <children xmi:type="notation:Shape" xmi:id="_z0eA0NdkEea_OZb9wPvKIQ" type="Class_Shape">
+    <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Ty2JYNkPEea_Gs1dMaVMnw" source="PapyrusCSSForceValue">
+      <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Ty2JYdkPEea_Gs1dMaVMnw" key="mutable" value="true"/>
+    </eAnnotations>
+    <children xmi:type="notation:DecorationNode" xmi:id="_z0iSQNdkEea_OZb9wPvKIQ" type="Class_NameLabel"/>
+    <children xmi:type="notation:DecorationNode" xmi:id="_z0iSQddkEea_OZb9wPvKIQ" type="Class_FloatingNameLabel">
+      <layoutConstraint xmi:type="notation:Location" xmi:id="_z0iSQtdkEea_OZb9wPvKIQ" y="5"/>
+    </children>
+    <children xmi:type="notation:BasicCompartment" xmi:id="_z0iSQ9dkEea_OZb9wPvKIQ" type="Class_StructureCompartment">
+      <styles xmi:type="notation:TitleStyle" xmi:id="_z0iSRNdkEea_OZb9wPvKIQ"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_z0iSRddkEea_OZb9wPvKIQ"/>
+    </children>
+    <children xmi:type="notation:DecorationNode" xmi:id="_TodeUNkPEea_Gs1dMaVMnw" type="StereotypeLabel">
+      <styles xmi:type="notation:StringValueStyle" xmi:id="_TodeUdkPEea_Gs1dMaVMnw" name="stereotype" stringValue="UMLRealTime::Capsule"/>
+      <element xmi:type="uml:Stereotype" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_hcMIwEhNEeO0lv5O1DTHOQ"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_TodeUtkPEea_Gs1dMaVMnw"/>
+    </children>
+    <children xmi:type="notation:BasicCompartment" xmi:id="_Toy1gNkPEea_Gs1dMaVMnw" type="StereotypeBrace">
+      <styles xmi:type="notation:TitleStyle" xmi:id="_Toy1gdkPEea_Gs1dMaVMnw"/>
+      <styles xmi:type="notation:StringValueStyle" xmi:id="_Toy1gtkPEea_Gs1dMaVMnw" name="stereotype" stringValue="UMLRealTime::Capsule"/>
+      <element xmi:type="uml:Stereotype" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_hcMIwEhNEeO0lv5O1DTHOQ"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Toy1g9kPEea_Gs1dMaVMnw"/>
+    </children>
+    <children xmi:type="notation:BasicCompartment" xmi:id="_To2f4NkPEea_Gs1dMaVMnw" type="compartment_shape_display">
+      <styles xmi:type="notation:TitleStyle" xmi:id="_To2f4dkPEea_Gs1dMaVMnw"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_To2f4tkPEea_Gs1dMaVMnw"/>
+    </children>
+    <children xmi:type="notation:BasicCompartment" xmi:id="_TpA38NkPEea_Gs1dMaVMnw" type="StereotypeCompartment">
+      <styles xmi:type="notation:TitleStyle" xmi:id="_TpA38dkPEea_Gs1dMaVMnw"/>
+      <styles xmi:type="notation:StringValueStyle" xmi:id="_TpA38tkPEea_Gs1dMaVMnw" name="stereotype" stringValue="UMLRealTime::Capsule"/>
+      <element xmi:type="uml:Stereotype" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_hcMIwEhNEeO0lv5O1DTHOQ"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_TpA389kPEea_Gs1dMaVMnw"/>
+    </children>
+    <children xmi:type="notation:Shape" xmi:id="_TqTRYNkPEea_Gs1dMaVMnw" type="Port_Shape">
+      <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Ty2JYtkPEea_Gs1dMaVMnw" source="PapyrusCSSForceValue">
+        <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Ty2wcNkPEea_Gs1dMaVMnw" key="mutable" value="true"/>
+      </eAnnotations>
+      <children xmi:type="notation:DecorationNode" xmi:id="_TqVGkNkPEea_Gs1dMaVMnw" type="Port_NameLabel">
+        <layoutConstraint xmi:type="notation:Location" xmi:id="_TqVGkdkPEea_Gs1dMaVMnw" x="25" y="3"/>
+      </children>
+      <children xmi:type="notation:DecorationNode" xmi:id="_TqVGktkPEea_Gs1dMaVMnw" type="Port_StereotypeLabel">
+        <layoutConstraint xmi:type="notation:Location" xmi:id="_TqVGk9kPEea_Gs1dMaVMnw" x="25" y="-10"/>
+      </children>
+      <element xmi:type="uml:Port" href="SymbolicReplication1.uml#_te9a0NdlEea_OZb9wPvKIQ"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_TqTRYdkPEea_Gs1dMaVMnw" x="-8" y="117" width="16" height="16"/>
+    </children>
+    <element xmi:type="uml:Class" href="SymbolicReplication1.uml#_zp7kwNdkEea_OZb9wPvKIQ"/>
+    <layoutConstraint xmi:type="notation:Bounds" xmi:id="_z0eA0ddkEea_OZb9wPvKIQ" x="40" y="40" width="500" height="250"/>
+  </children>
+  <children xmi:type="notation:Shape" xmi:id="_To7YYNkPEea_Gs1dMaVMnw" type="StereotypeComment">
+    <styles xmi:type="notation:TitleStyle" xmi:id="_To7YYdkPEea_Gs1dMaVMnw"/>
+    <styles xmi:type="notation:EObjectValueStyle" xmi:id="_To8mgNkPEea_Gs1dMaVMnw" name="BASE_ELEMENT">
+      <eObjectValue xmi:type="uml:Class" href="SymbolicReplication1.uml#_zp7kwNdkEea_OZb9wPvKIQ"/>
+    </styles>
+    <element xsi:nil="true"/>
+    <layoutConstraint xmi:type="notation:Bounds" xmi:id="_To7YYtkPEea_Gs1dMaVMnw" x="240" y="40"/>
+  </children>
+  <children xmi:type="notation:Shape" xmi:id="_Tr83MNkPEea_Gs1dMaVMnw" type="StereotypeComment">
+    <styles xmi:type="notation:TitleStyle" xmi:id="_Tr83MdkPEea_Gs1dMaVMnw"/>
+    <styles xmi:type="notation:EObjectValueStyle" xmi:id="_Tr9eQNkPEea_Gs1dMaVMnw" name="BASE_ELEMENT">
+      <eObjectValue xmi:type="uml:Port" href="SymbolicReplication1.uml#_te9a0NdlEea_OZb9wPvKIQ"/>
+    </styles>
+    <element xsi:nil="true"/>
+    <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Tr83MtkPEea_Gs1dMaVMnw" x="192" y="-8"/>
+  </children>
+  <styles xmi:type="notation:StringValueStyle" xmi:id="_z0DKEddkEea_OZb9wPvKIQ" name="diagram_compatibility_version" stringValue="1.2.0"/>
+  <styles xmi:type="notation:DiagramStyle" xmi:id="_z0DKEtdkEea_OZb9wPvKIQ"/>
+  <styles xmi:type="style:PapyrusViewStyle" xmi:id="_z0DKE9dkEea_OZb9wPvKIQ">
+    <owner xmi:type="uml:Class" href="SymbolicReplication1.uml#_zp7kwNdkEea_OZb9wPvKIQ"/>
+    <configuration xmi:type="configuration:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/configuration/UMLRT.configuration#_Z79eQHcZEeSnWeKqQOfW2A"/>
+  </styles>
+  <element xmi:type="uml:Class" href="SymbolicReplication1.uml#_zp7kwNdkEea_OZb9wPvKIQ"/>
+  <edges xmi:type="notation:Connector" xmi:id="_To9NkNkPEea_Gs1dMaVMnw" type="StereotypeCommentLink" source="_z0eA0NdkEea_OZb9wPvKIQ" target="_To7YYNkPEea_Gs1dMaVMnw">
+    <styles xmi:type="notation:FontStyle" xmi:id="_To9NkdkPEea_Gs1dMaVMnw"/>
+    <styles xmi:type="notation:EObjectValueStyle" xmi:id="_To90odkPEea_Gs1dMaVMnw" name="BASE_ELEMENT">
+      <eObjectValue xmi:type="uml:Class" href="SymbolicReplication1.uml#_zp7kwNdkEea_OZb9wPvKIQ"/>
+    </styles>
+    <element xsi:nil="true"/>
+    <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_To9NktkPEea_Gs1dMaVMnw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+    <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_To9Nk9kPEea_Gs1dMaVMnw"/>
+    <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_To90oNkPEea_Gs1dMaVMnw"/>
+  </edges>
+  <edges xmi:type="notation:Connector" xmi:id="_Tr9eQdkPEea_Gs1dMaVMnw" type="StereotypeCommentLink" source="_TqTRYNkPEea_Gs1dMaVMnw" target="_Tr83MNkPEea_Gs1dMaVMnw">
+    <styles xmi:type="notation:FontStyle" xmi:id="_Tr9eQtkPEea_Gs1dMaVMnw"/>
+    <styles xmi:type="notation:EObjectValueStyle" xmi:id="_Tr9eRtkPEea_Gs1dMaVMnw" name="BASE_ELEMENT">
+      <eObjectValue xmi:type="uml:Port" href="SymbolicReplication1.uml#_te9a0NdlEea_OZb9wPvKIQ"/>
+    </styles>
+    <element xsi:nil="true"/>
+    <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Tr9eQ9kPEea_Gs1dMaVMnw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+    <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Tr9eRNkPEea_Gs1dMaVMnw"/>
+    <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Tr9eRdkPEea_Gs1dMaVMnw"/>
+  </edges>
+</notation:Diagram>
diff --git a/models/tests/codepattern/structure/SymbolicReplication1/SymbolicReplication1.uml b/models/tests/codepattern/structure/SymbolicReplication1/SymbolicReplication1.uml
new file mode 100644
index 0000000..f93b146
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication1/SymbolicReplication1.uml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:UMLRealTime="http://www.eclipse.org/papyrus/umlrt" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+  <uml:Model xmi:id="_vO2gkNdkEea_OZb9wPvKIQ" name="SymbolicReplication1">
+    <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Eu9WkNdmEea_OZb9wPvKIQ" source="http://www.eclipse.org/papyrus-rt/language/1.0.0">
+      <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_EvAZ4NdmEea_OZb9wPvKIQ" key="language" value="umlrt-cpp"/>
+    </eAnnotations>
+    <packagedElement xmi:type="uml:Class" xmi:id="_zp7kwNdkEea_OZb9wPvKIQ" name="Top" isActive="true">
+      <ownedAttribute xmi:type="uml:Property" xmi:id="_3GPTkNdkEea_OZb9wPvKIQ" name="SIZE" visibility="public">
+        <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+        <defaultValue xmi:type="uml:LiteralInteger" xmi:id="_pQpnUNdlEea_OZb9wPvKIQ" value="2"/>
+      </ownedAttribute>
+      <ownedAttribute xmi:type="uml:Port" xmi:id="_te9a0NdlEea_OZb9wPvKIQ" name="protocol1" visibility="public" type="_t2wPwNdlEea_OZb9wPvKIQ" isOrdered="true" aggregation="composite" isBehavior="true">
+        <lowerValue xmi:type="uml:OpaqueExpression" xmi:id="_GFE08NdmEea_OZb9wPvKIQ">
+          <language>C++</language>
+          <body>SIZE * 2 - 1</body>
+        </lowerValue>
+        <upperValue xmi:type="uml:OpaqueExpression" xmi:id="_GE1kYNdmEea_OZb9wPvKIQ">
+          <language>C++</language>
+          <body>SIZE * 2 - 1</body>
+        </upperValue>
+      </ownedAttribute>
+    </packagedElement>
+    <packagedElement xmi:type="uml:Package" xmi:id="_t29EENdlEea_OZb9wPvKIQ" name="Protocol1">
+      <packagedElement xmi:type="uml:Collaboration" xmi:id="_t2wPwNdlEea_OZb9wPvKIQ" name="Protocol1">
+        <interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_t3ZI8NdlEea_OZb9wPvKIQ" client="_t2wPwNdlEea_OZb9wPvKIQ" supplier="_t3KfcNdlEea_OZb9wPvKIQ" contract="_t3KfcNdlEea_OZb9wPvKIQ"/>
+        <interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_t3lWMNdlEea_OZb9wPvKIQ" client="_t2wPwNdlEea_OZb9wPvKIQ" supplier="_t3hEwNdlEea_OZb9wPvKIQ" contract="_t3hEwNdlEea_OZb9wPvKIQ"/>
+      </packagedElement>
+      <packagedElement xmi:type="uml:Interface" xmi:id="_t3KfcNdlEea_OZb9wPvKIQ" name="Protocol1"/>
+      <packagedElement xmi:type="uml:Interface" xmi:id="_t3cMQNdlEea_OZb9wPvKIQ" name="Protocol1~">
+        <ownedOperation xmi:type="uml:Operation" xmi:id="__wp0ENdmEea_OZb9wPvKIQ" name="OutProtocolMessage1"/>
+      </packagedElement>
+      <packagedElement xmi:type="uml:Usage" xmi:id="_t3f2oNdlEea_OZb9wPvKIQ" client="_t2wPwNdlEea_OZb9wPvKIQ" supplier="_t3cMQNdlEea_OZb9wPvKIQ"/>
+      <packagedElement xmi:type="uml:AnyReceiveEvent" xmi:id="_t3gdsNdlEea_OZb9wPvKIQ" name="*"/>
+      <packagedElement xmi:type="uml:Interface" xmi:id="_t3hEwNdlEea_OZb9wPvKIQ" name="Protocol1IO"/>
+      <packagedElement xmi:type="uml:Usage" xmi:id="_t3mkUNdlEea_OZb9wPvKIQ" client="_t2wPwNdlEea_OZb9wPvKIQ" supplier="_t3hEwNdlEea_OZb9wPvKIQ"/>
+      <packagedElement xmi:type="uml:CallEvent" xmi:id="__w-kMNdmEea_OZb9wPvKIQ" operation="__wp0ENdmEea_OZb9wPvKIQ"/>
+    </packagedElement>
+    <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_vUw7UNdkEea_OZb9wPvKIQ">
+      <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_vU1MwNdkEea_OZb9wPvKIQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+        <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/umlrt#/"/>
+      </eAnnotations>
+      <appliedProfile xmi:type="uml:Profile" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_1h74oEeVEeO0lv5O1DTHOQ"/>
+    </profileApplication>
+    <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_E0vOcNdmEea_OZb9wPvKIQ">
+      <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_E0v1gNdmEea_OZb9wPvKIQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+        <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/umlrt/cppproperties#/"/>
+      </eAnnotations>
+      <appliedProfile xmi:type="uml:Profile" href="pathmap://UMLRT_CPP/RTCppProperties.profile.uml#_vl5LALs8EeSTjNEQkASznQ"/>
+    </profileApplication>
+  </uml:Model>
+  <UMLRealTime:Capsule xmi:id="_z03CYNdkEea_OZb9wPvKIQ" base_Class="_zp7kwNdkEea_OZb9wPvKIQ"/>
+  <UMLRealTime:RTPort xmi:id="_tgUFsNdlEea_OZb9wPvKIQ" base_Port="_te9a0NdlEea_OZb9wPvKIQ"/>
+  <UMLRealTime:ProtocolContainer xmi:id="_t3CjoNdlEea_OZb9wPvKIQ" base_Package="_t29EENdlEea_OZb9wPvKIQ"/>
+  <UMLRealTime:RTMessageSet xmi:id="_t3QmENdlEea_OZb9wPvKIQ" base_Interface="_t3KfcNdlEea_OZb9wPvKIQ"/>
+  <UMLRealTime:RTMessageSet xmi:id="_t3daYNdlEea_OZb9wPvKIQ" base_Interface="_t3cMQNdlEea_OZb9wPvKIQ" rtMsgKind="out"/>
+  <UMLRealTime:RTMessageSet xmi:id="_t3kIENdlEea_OZb9wPvKIQ" base_Interface="_t3hEwNdlEea_OZb9wPvKIQ" rtMsgKind="inOut"/>
+  <UMLRealTime:Protocol xmi:id="_t3sD4NdlEea_OZb9wPvKIQ" base_Collaboration="_t2wPwNdlEea_OZb9wPvKIQ"/>
+</xmi:XMI>
diff --git a/models/tests/codepattern/structure/SymbolicReplication1/expected_src/CMakeLists.txt b/models/tests/codepattern/structure/SymbolicReplication1/expected_src/CMakeLists.txt
new file mode 100644
index 0000000..6d887b8
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication1/expected_src/CMakeLists.txt
@@ -0,0 +1,36 @@
+# Generated 2017-01-12 16:39:50
+
+cmake_minimum_required(VERSION 2.8.7)
+set(TARGET TopMain)
+project(${TARGET})
+
+# require location of supporting RTS
+if (NOT UMLRTS_ROOT)
+  if (DEFINED ENV{UMLRTS_ROOT})
+    set(UMLRTS_ROOT $ENV{UMLRTS_ROOT})
+  else ()
+    set(UMLRTS_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/umlrt.rts)
+  endif ()
+endif ()
+
+# setup primary envars - provides tooling config
+include(${UMLRTS_ROOT}/build/buildenv.cmake)
+
+# model sources
+set(SRCS TopMain.cc Protocol1.cc Top.cc TopControllers.cc )
+
+# specify target
+add_executable(${TARGET} ${SRCS})
+
+# setup lib dependency support after defining TARGET
+include(${UMLRTS_ROOT}/build/rtslib.cmake)
+
+# compiler parameters
+set_target_properties(${TARGET} PROPERTIES COMPILE_OPTIONS "${COPTS}")
+set_target_properties(${TARGET} PROPERTIES COMPILE_DEFINITIONS "${CDEFS}")
+include_directories(${INCS})
+
+# linker parameters
+set_target_properties(${TARGET} PROPERTIES CMAKE_EXE_LINKER_FLAGS "${LOPTS}")
+target_link_libraries(${TARGET} ${LIBS})
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication1/expected_src/Makefile b/models/tests/codepattern/structure/SymbolicReplication1/expected_src/Makefile
new file mode 100644
index 0000000..0bcbd22
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication1/expected_src/Makefile
@@ -0,0 +1,11 @@
+##################################################
+# Default makefile
+# Redirect make to target makefile
+##################################################
+
+all:
+	make -f MakefileTop.mk all
+clean:
+	make -f MakefileTop.mk clean
+.PHONY: 
+	make -f MakefileTop.mk all clean
diff --git a/models/tests/codepattern/structure/SymbolicReplication1/expected_src/MakefileTop.mk b/models/tests/codepattern/structure/SymbolicReplication1/expected_src/MakefileTop.mk
new file mode 100644
index 0000000..6cb0eb2
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication1/expected_src/MakefileTop.mk
@@ -0,0 +1,49 @@
+# set default value for TARGETOS if is it not defined
+ifeq ($(TARGETOS), )
+$(warning warning: TARGETOS not defined. Choosing linux)
+TARGETOS=linux
+endif
+
+# set default value for BUILDTOOLS if is it not defined
+ifeq ($(BUILDTOOLS), )
+$(warning warning: BUILDTOOLS not defined. Choosing x86-gcc-4.6.3)
+BUILDTOOLS=x86-gcc-4.6.3
+endif
+
+# Location of RTS root.
+UMLRTS_ROOT ?= ./umlrt.rts
+
+CONFIG=$(TARGETOS).$(BUILDTOOLS)
+
+# Destination directory for the RTS services library.
+LIBDEST=$(UMLRTS_ROOT)/lib/$(CONFIG)
+
+include $(UMLRTS_ROOT)/build/host/host.mk
+include $(UMLRTS_ROOT)/build/buildtools/$(BUILDTOOLS)/buildtools.mk
+
+LD_PATHS=$(LIBDEST)
+CC_INCLUDES+=$(UMLRTS_ROOT)/include
+
+CC_DEFINES:=$(foreach d, $(CC_DEFINES), $(CC_DEF)$d)
+CC_INCLUDES:=$(foreach i, $(CC_INCLUDES), $(CC_INC)$i)
+LD_LIBS:=$(foreach i, $(LD_LIBS), $(LD_LIB)$i)
+LD_PATHS:=$(foreach i, $(LD_PATHS), $(LD_LIBPATH)$i)
+
+SRCS = TopMain.cc Protocol1.cc Top.cc TopControllers.cc 
+OBJS = $(subst $(CC_EXT),$(OBJ_EXT),$(SRCS))
+
+MAIN = TopMain$(EXE_EXT)
+
+all: $(MAIN)
+
+$(MAIN): $(OBJS) $(UMLRTS_ROOT)/lib/$(CONFIG)/$(LIB_PRFX)rts$(LIB_EXT)
+	$(LD) $(LD_FLAGS) $(OBJS) $(LD_PATHS) $(LD_LIBS) $(LD_OUT)$@
+
+%$(OBJ_EXT) : %$(CC_EXT)
+	$(CC) $< $(CC_FLAGS) $(CC_DEFINES) $(CC_INCLUDES) $(CC_OUT)$@
+
+clean :
+	@echo $(RM) main$(EXE_EXT) *$(OBJ_EXT) *$(DEP_EXT) $(DBG_FILES)
+	@$(RM) main$(EXE_EXT) *$(OBJ_EXT) *$(DEP_EXT) $(DBG_FILES)
+
+.PHONY: all clean
diff --git a/models/tests/codepattern/structure/SymbolicReplication1/expected_src/Protocol1.cc b/models/tests/codepattern/structure/SymbolicReplication1/expected_src/Protocol1.cc
new file mode 100644
index 0000000..6f60c06
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication1/expected_src/Protocol1.cc
@@ -0,0 +1,50 @@
+
+#include "Protocol1.hh"
+
+#include "umlrtobjectclass.hh"
+#include "umlrtoutsignal.hh"
+struct UMLRTCommsPort;
+
+static UMLRTObject_field fields_OutProtocolMessage1[] = 
+{
+    #ifdef NEED_NON_FLEXIBLE_ARRAY
+    {
+        0,
+        0,
+        0,
+        0,
+        0
+    }
+    #endif
+};
+
+static UMLRTObject payload_OutProtocolMessage1 = 
+{
+    0,
+    #ifdef NEED_NON_FLEXIBLE_ARRAY
+    1
+    #else
+    0
+    #endif
+    ,
+    fields_OutProtocolMessage1
+};
+
+Protocol1::Base::Base( const UMLRTCommsPort * & srcPort )
+: UMLRTProtocol( srcPort )
+{
+}
+
+UMLRTOutSignal Protocol1::Base::OutProtocolMessage1() const
+{
+    UMLRTOutSignal signal;
+    signal.initialize( "OutProtocolMessage1", signal_OutProtocolMessage1, srcPort, &payload_OutProtocolMessage1 );
+    return signal;
+}
+
+Protocol1::Conj::Conj( const UMLRTCommsPort * & srcPort )
+: UMLRTProtocol( srcPort )
+{
+}
+
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication1/expected_src/Protocol1.hh b/models/tests/codepattern/structure/SymbolicReplication1/expected_src/Protocol1.hh
new file mode 100644
index 0000000..677a2e0
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication1/expected_src/Protocol1.hh
@@ -0,0 +1,30 @@
+
+#ifndef PROTOCOL1_HH
+#define PROTOCOL1_HH
+
+#include "umlrtoutsignal.hh"
+#include "umlrtprotocol.hh"
+#include "umlrtsignal.hh"
+struct UMLRTCommsPort;
+
+namespace Protocol1
+{
+    class Base : public UMLRTProtocol
+    {
+    public:
+        Base( const UMLRTCommsPort * & srcPort );
+        UMLRTOutSignal OutProtocolMessage1() const;
+    };
+    class Conj : public UMLRTProtocol
+    {
+    public:
+        Conj( const UMLRTCommsPort * & srcPort );
+    };
+    enum SignalId
+    {
+        signal_OutProtocolMessage1 = UMLRTSignal::FIRST_PROTOCOL_SIGNAL_ID
+    };
+};
+
+#endif
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication1/expected_src/Top-connections.log b/models/tests/codepattern/structure/SymbolicReplication1/expected_src/Top-connections.log
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication1/expected_src/Top-connections.log
diff --git a/models/tests/codepattern/structure/SymbolicReplication1/expected_src/Top.cc b/models/tests/codepattern/structure/SymbolicReplication1/expected_src/Top.cc
new file mode 100644
index 0000000..06c2c40
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication1/expected_src/Top.cc
@@ -0,0 +1,91 @@
+
+#include "Top.hh"
+
+#include <cstddef>
+#include "umlrtcapsuleclass.hh"
+#include "umlrtcommsportrole.hh"
+#include "umlrtframeservice.hh"
+#include "umlrtslot.hh"
+class UMLRTRtsInterface;
+struct UMLRTCommsPort;
+
+Capsule_Top::Capsule_Top( const UMLRTCapsuleClass * cd, UMLRTSlot * st, const UMLRTCommsPort * * border, const UMLRTCommsPort * * internal, bool isStat )
+: UMLRTCapsule( NULL, cd, st, border, internal, isStat )
+, protocol1( borderPorts[borderport_protocol1] )
+, SIZE( 2 )
+{
+}
+
+
+
+
+
+void Capsule_Top::bindPort( bool isBorder, int portId, int index )
+{
+    if( isBorder )
+        switch( portId )
+        {
+        case borderport_protocol1:
+            UMLRTFrameService::sendBoundUnbound( borderPorts, borderport_protocol1, index, true );
+            break;
+        }
+}
+
+void Capsule_Top::unbindPort( bool isBorder, int portId, int index )
+{
+    if( isBorder )
+        switch( portId )
+        {
+        case borderport_protocol1:
+            UMLRTFrameService::sendBoundUnbound( borderPorts, borderport_protocol1, index, false );
+            UMLRTFrameService::disconnectPort( borderPorts[borderport_protocol1], index );
+            break;
+        }
+}
+
+
+void Capsule_Top::initialize( const UMLRTMessage & msg )
+{
+}
+
+void Capsule_Top::inject( const UMLRTMessage & msg )
+{
+}
+
+
+static const UMLRTCommsPortRole portroles_border[] = 
+{
+    {
+        Capsule_Top::port_protocol1,
+        "Protocol1",
+        "protocol1",
+        "",
+        3,
+        true,
+        false,
+        false,
+        false,
+        false,
+        false,
+        true
+    }
+};
+
+static void instantiate_Top( const UMLRTRtsInterface * rts, UMLRTSlot * slot, const UMLRTCommsPort * * borderPorts )
+{
+    slot->capsule = new Capsule_Top( &Top, slot, borderPorts, NULL, false );
+}
+
+const UMLRTCapsuleClass Top = 
+{
+    "Top",
+    NULL,
+    instantiate_Top,
+    0,
+    NULL,
+    1,
+    portroles_border,
+    0,
+    NULL
+};
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication1/expected_src/Top.hh b/models/tests/codepattern/structure/SymbolicReplication1/expected_src/Top.hh
new file mode 100644
index 0000000..5dfaac9
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication1/expected_src/Top.hh
@@ -0,0 +1,39 @@
+
+#ifndef TOP_HH
+#define TOP_HH
+
+#include "Protocol1.hh"
+#include "umlrtcapsule.hh"
+#include "umlrtcapsuleclass.hh"
+#include "umlrtmessage.hh"
+struct UMLRTCommsPort;
+struct UMLRTSlot;
+
+class Capsule_Top : public UMLRTCapsule
+{
+public:
+    Capsule_Top( const UMLRTCapsuleClass * cd, UMLRTSlot * st, const UMLRTCommsPort * * border, const UMLRTCommsPort * * internal, bool isStat );
+protected:
+    Protocol1::Base protocol1;
+public:
+    enum BorderPortId
+    {
+        borderport_protocol1
+    };
+    enum PartId
+    {
+    };
+    enum PortId
+    {
+        port_protocol1
+    };
+    virtual void bindPort( bool isBorder, int portId, int index );
+    virtual void unbindPort( bool isBorder, int portId, int index );
+    int SIZE;
+    virtual void initialize( const UMLRTMessage & msg );
+    virtual void inject( const UMLRTMessage & msg );
+};
+extern const UMLRTCapsuleClass Top;
+
+#endif
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication1/expected_src/TopControllers.cc b/models/tests/codepattern/structure/SymbolicReplication1/expected_src/TopControllers.cc
new file mode 100644
index 0000000..f0239ae
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication1/expected_src/TopControllers.cc
@@ -0,0 +1,84 @@
+
+#include "TopControllers.hh"
+
+#include "Top.hh"
+#include "umlrtcapsuleclass.hh"
+#include "umlrtcommsport.hh"
+#include "umlrtcommsportfarend.hh"
+#include "umlrtcontroller.hh"
+#include "umlrtslot.hh"
+#include <cstddef>
+
+
+static UMLRTController DefaultController_( "DefaultController" );
+
+UMLRTController * DefaultController = &DefaultController_;
+
+static UMLRTCommsPortFarEnd borderfarEndList_Top[] = 
+{
+    {
+        0,
+        NULL
+    },
+    {
+        0,
+        NULL
+    },
+    {
+        0,
+        NULL
+    }
+};
+
+UMLRTCommsPort borderports_Top[] = 
+{
+    {
+        &Top,
+        Capsule_Top::borderport_protocol1,
+        &Top_slots[InstId_Top],
+        3,
+        borderfarEndList_Top,
+        NULL,
+        NULL,
+        "",
+        true,
+        true,
+        true,
+        false,
+        false,
+        false,
+        false,
+        false,
+        false,
+        false,
+        true
+    }
+};
+
+static const UMLRTCommsPort * borderports_Top_ptrs[] = 
+{
+    &borderports_Top[0]
+};
+
+static Capsule_Top top( &Top, &Top_slots[InstId_Top], borderports_Top_ptrs, NULL, true );
+
+UMLRTSlot Top_slots[] = 
+{
+    {
+        "Top",
+        0,
+        &Top,
+        NULL,
+        0,
+        &top,
+        &DefaultController_,
+        0,
+        NULL,
+        1,
+        borderports_Top,
+        NULL,
+        true,
+        false
+    }
+};
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication1/expected_src/TopControllers.hh b/models/tests/codepattern/structure/SymbolicReplication1/expected_src/TopControllers.hh
new file mode 100644
index 0000000..0d5aac6
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication1/expected_src/TopControllers.hh
@@ -0,0 +1,18 @@
+
+#ifndef TOPCONTROLLERS_HH
+#define TOPCONTROLLERS_HH
+
+class UMLRTController;
+struct UMLRTCommsPort;
+struct UMLRTSlot;
+
+enum CapsuleInstanceId
+{
+    InstId_Top
+};
+extern UMLRTController * DefaultController;
+extern UMLRTCommsPort borderports_Top[];
+extern UMLRTSlot Top_slots[];
+
+#endif
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication1/expected_src/TopMain.cc b/models/tests/codepattern/structure/SymbolicReplication1/expected_src/TopMain.cc
new file mode 100644
index 0000000..bf88ec4
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication1/expected_src/TopMain.cc
@@ -0,0 +1,38 @@
+#include "umlrtmain.hh"
+
+#include "umlrtcontroller.hh"
+#include "TopControllers.hh"
+#include "umlrtcapsuletocontrollermap.hh"
+#include "umlrtmessagepool.hh"
+#include "umlrtsignalelementpool.hh"
+#include "umlrttimerpool.hh"
+#include "umlrtuserconfig.hh"
+#include <stdio.h>
+
+static UMLRTSignalElement signalElementBuffer[USER_CONFIG_SIGNAL_ELEMENT_POOL_SIZE];
+static UMLRTSignalElementPool signalElementPool( signalElementBuffer, USER_CONFIG_SIGNAL_ELEMENT_POOL_SIZE );
+
+static UMLRTMessage messageBuffer[USER_CONFIG_MESSAGE_POOL_SIZE];
+static UMLRTMessagePool messagePool( messageBuffer, USER_CONFIG_MESSAGE_POOL_SIZE );
+
+static UMLRTTimer timers[USER_CONFIG_TIMER_POOL_SIZE];
+static UMLRTTimerPool timerPool( timers, USER_CONFIG_TIMER_POOL_SIZE );
+
+int main( int argc, char * argv[] )
+{
+    UMLRTController::initializePools( &signalElementPool, &messagePool, &timerPool );
+    UMLRTMain::setArgs( argc, argv );
+    UMLRTCapsuleToControllerMap::setDefaultSlotList( Top_slots, 1 );
+
+    if( ! UMLRTMain::targetStartup() )
+        return EXIT_FAILURE;
+
+    DefaultController->spawn();
+
+    if( ! UMLRTMain::mainLoop() )
+        return UMLRTMain::targetShutdown( false );
+
+    DefaultController->join();
+
+    return UMLRTMain::targetShutdown( true );
+}
diff --git a/models/tests/codepattern/structure/SymbolicReplication2/.project b/models/tests/codepattern/structure/SymbolicReplication2/.project
new file mode 100644
index 0000000..4a392da
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication2/.project
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>SymbolicReplication2</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+	</natures>
+</projectDescription>
diff --git a/models/tests/codepattern/structure/SymbolicReplication2/SymbolicReplication2.di b/models/tests/codepattern/structure/SymbolicReplication2/SymbolicReplication2.di
new file mode 100644
index 0000000..bf9abab
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication2/SymbolicReplication2.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/models/tests/codepattern/structure/SymbolicReplication2/SymbolicReplication2.notation b/models/tests/codepattern/structure/SymbolicReplication2/SymbolicReplication2.notation
new file mode 100644
index 0000000..3abfafe
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication2/SymbolicReplication2.notation
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+  <notation:Diagram xmi:id="_2fVWkNkPEea_Gs1dMaVMnw" type="CompositeStructure" measurementUnit="Pixel">
+    <children xmi:type="notation:Shape" xmi:id="_2fYZ4NkPEea_Gs1dMaVMnw" type="Class_Shape">
+      <children xmi:type="notation:DecorationNode" xmi:id="_2fZA8NkPEea_Gs1dMaVMnw" type="Class_NameLabel"/>
+      <children xmi:type="notation:DecorationNode" xmi:id="_2fZA8dkPEea_Gs1dMaVMnw" type="Class_FloatingNameLabel">
+        <layoutConstraint xmi:type="notation:Location" xmi:id="_2fZA8tkPEea_Gs1dMaVMnw" y="5"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_2fZA89kPEea_Gs1dMaVMnw" type="Class_StructureCompartment">
+        <children xmi:type="notation:Shape" xmi:id="_6QJVwNkPEea_Gs1dMaVMnw" type="Property_Shape">
+          <children xmi:type="notation:DecorationNode" xmi:id="_6QJ80NkPEea_Gs1dMaVMnw" type="Property_NameLabel"/>
+          <children xmi:type="notation:DecorationNode" xmi:id="_6QJ80dkPEea_Gs1dMaVMnw" type="Property_FloatingNameLabel">
+            <layoutConstraint xmi:type="notation:Location" xmi:id="_6QKj4NkPEea_Gs1dMaVMnw" y="5"/>
+          </children>
+          <children xmi:type="notation:BasicCompartment" xmi:id="_6QKj4dkPEea_Gs1dMaVMnw" type="Property_StructureCompartment">
+            <styles xmi:type="notation:TitleStyle" xmi:id="_6QKj4tkPEea_Gs1dMaVMnw"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6QKj49kPEea_Gs1dMaVMnw"/>
+          </children>
+          <element xmi:type="uml:Property" href="SymbolicReplication2.uml#_5njEsNkPEea_Gs1dMaVMnw"/>
+          <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6QJVwdkPEea_Gs1dMaVMnw" x="151" y="60"/>
+        </children>
+        <children xmi:type="notation:Shape" xmi:id="_6RCGkNkPEea_Gs1dMaVMnw" type="StereotypeComment">
+          <styles xmi:type="notation:TitleStyle" xmi:id="_6RCGkdkPEea_Gs1dMaVMnw"/>
+          <styles xmi:type="notation:EObjectValueStyle" xmi:id="_6RCGk9kPEea_Gs1dMaVMnw" name="BASE_ELEMENT">
+            <eObjectValue xmi:type="uml:Property" href="SymbolicReplication2.uml#_5njEsNkPEea_Gs1dMaVMnw"/>
+          </styles>
+          <element xsi:nil="true"/>
+          <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6RCGktkPEea_Gs1dMaVMnw" x="200"/>
+        </children>
+        <styles xmi:type="notation:TitleStyle" xmi:id="_2fZA9NkPEea_Gs1dMaVMnw"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2fZA9dkPEea_Gs1dMaVMnw"/>
+      </children>
+      <element xmi:type="uml:Class" href="SymbolicReplication2.uml#_2drJsNkPEea_Gs1dMaVMnw"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2fYZ4dkPEea_Gs1dMaVMnw" x="40" y="40" width="500" height="250"/>
+    </children>
+    <children xmi:type="notation:Shape" xmi:id="_4CvqENkPEea_Gs1dMaVMnw" type="StereotypeComment">
+      <styles xmi:type="notation:TitleStyle" xmi:id="_4CvqEdkPEea_Gs1dMaVMnw"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_4CvqE9kPEea_Gs1dMaVMnw" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Class" href="SymbolicReplication2.uml#_2drJsNkPEea_Gs1dMaVMnw"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_4CvqEtkPEea_Gs1dMaVMnw" x="240" y="40"/>
+    </children>
+    <styles xmi:type="notation:StringValueStyle" xmi:id="_2fVWkdkPEea_Gs1dMaVMnw" name="diagram_compatibility_version" stringValue="1.2.0"/>
+    <styles xmi:type="notation:DiagramStyle" xmi:id="_2fVWktkPEea_Gs1dMaVMnw"/>
+    <styles xmi:type="style:PapyrusViewStyle" xmi:id="_2fVWk9kPEea_Gs1dMaVMnw">
+      <owner xmi:type="uml:Class" href="SymbolicReplication2.uml#_2drJsNkPEea_Gs1dMaVMnw"/>
+      <configuration xmi:type="configuration:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/configuration/UMLRT.configuration#_Z79eQHcZEeSnWeKqQOfW2A"/>
+    </styles>
+    <element xmi:type="uml:Class" href="SymbolicReplication2.uml#_2drJsNkPEea_Gs1dMaVMnw"/>
+    <edges xmi:type="notation:Connector" xmi:id="_4CwRINkPEea_Gs1dMaVMnw" type="StereotypeCommentLink" source="_2fYZ4NkPEea_Gs1dMaVMnw" target="_4CvqENkPEea_Gs1dMaVMnw">
+      <styles xmi:type="notation:FontStyle" xmi:id="_4CwRIdkPEea_Gs1dMaVMnw"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_4CwRJdkPEea_Gs1dMaVMnw" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Class" href="SymbolicReplication2.uml#_2drJsNkPEea_Gs1dMaVMnw"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_4CwRItkPEea_Gs1dMaVMnw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+      <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_4CwRI9kPEea_Gs1dMaVMnw"/>
+      <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_4CwRJNkPEea_Gs1dMaVMnw"/>
+    </edges>
+    <edges xmi:type="notation:Connector" xmi:id="_6RCtoNkPEea_Gs1dMaVMnw" type="StereotypeCommentLink" source="_6QJVwNkPEea_Gs1dMaVMnw" target="_6RCGkNkPEea_Gs1dMaVMnw">
+      <styles xmi:type="notation:FontStyle" xmi:id="_6RCtodkPEea_Gs1dMaVMnw"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_6RCtpdkPEea_Gs1dMaVMnw" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Property" href="SymbolicReplication2.uml#_5njEsNkPEea_Gs1dMaVMnw"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_6RCtotkPEea_Gs1dMaVMnw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+      <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6RCto9kPEea_Gs1dMaVMnw"/>
+      <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6RCtpNkPEea_Gs1dMaVMnw"/>
+    </edges>
+  </notation:Diagram>
+  <notation:Diagram xmi:id="_58Ua0NkPEea_Gs1dMaVMnw" type="CompositeStructure" measurementUnit="Pixel">
+    <children xmi:type="notation:Shape" xmi:id="_58VB4NkPEea_Gs1dMaVMnw" type="Class_Shape">
+      <children xmi:type="notation:DecorationNode" xmi:id="_58VB4tkPEea_Gs1dMaVMnw" type="Class_NameLabel"/>
+      <children xmi:type="notation:DecorationNode" xmi:id="_58VB49kPEea_Gs1dMaVMnw" type="Class_FloatingNameLabel">
+        <layoutConstraint xmi:type="notation:Location" xmi:id="_58VB5NkPEea_Gs1dMaVMnw" y="5"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_58VB5dkPEea_Gs1dMaVMnw" type="Class_StructureCompartment">
+        <styles xmi:type="notation:TitleStyle" xmi:id="_58VB5tkPEea_Gs1dMaVMnw"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_58VB59kPEea_Gs1dMaVMnw"/>
+      </children>
+      <element xmi:type="uml:Class" href="SymbolicReplication2.uml#_576LINkPEea_Gs1dMaVMnw"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_58VB4dkPEea_Gs1dMaVMnw" x="40" y="40" width="500" height="250"/>
+    </children>
+    <styles xmi:type="notation:StringValueStyle" xmi:id="_58Ua0dkPEea_Gs1dMaVMnw" name="diagram_compatibility_version" stringValue="1.2.0"/>
+    <styles xmi:type="notation:DiagramStyle" xmi:id="_58Ua0tkPEea_Gs1dMaVMnw"/>
+    <styles xmi:type="style:PapyrusViewStyle" xmi:id="_58Ua09kPEea_Gs1dMaVMnw">
+      <owner xmi:type="uml:Class" href="SymbolicReplication2.uml#_576LINkPEea_Gs1dMaVMnw"/>
+      <configuration xmi:type="configuration:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/configuration/UMLRT.configuration#_Z79eQHcZEeSnWeKqQOfW2A"/>
+    </styles>
+    <element xmi:type="uml:Class" href="SymbolicReplication2.uml#_576LINkPEea_Gs1dMaVMnw"/>
+  </notation:Diagram>
+</xmi:XMI>
diff --git a/models/tests/codepattern/structure/SymbolicReplication2/SymbolicReplication2.uml b/models/tests/codepattern/structure/SymbolicReplication2/SymbolicReplication2.uml
new file mode 100644
index 0000000..215633e
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication2/SymbolicReplication2.uml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:UMLRealTime="http://www.eclipse.org/papyrus/umlrt" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+  <uml:Model xmi:id="_xWoXYNkPEea_Gs1dMaVMnw" name="SymbolicReplication2">
+    <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_1ai4wNkPEea_Gs1dMaVMnw" source="http://www.eclipse.org/papyrus-rt/language/1.0.0">
+      <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1ajf0NkPEea_Gs1dMaVMnw" key="language" value="umlrt-cpp"/>
+    </eAnnotations>
+    <packagedElement xmi:type="uml:Class" xmi:id="_2drJsNkPEea_Gs1dMaVMnw" name="Top" isActive="true">
+      <ownedAttribute xmi:type="uml:Property" xmi:id="_5njEsNkPEea_Gs1dMaVMnw" name="capsule1" visibility="protected" type="_576LINkPEea_Gs1dMaVMnw" isOrdered="true" aggregation="composite">
+        <lowerValue xmi:type="uml:OpaqueExpression" xmi:id="_8jcOENkPEea_Gs1dMaVMnw" name="OpaqueExpression2">
+          <language>C++</language>
+          <body>2*SIZE-1</body>
+        </lowerValue>
+        <upperValue xmi:type="uml:OpaqueExpression" xmi:id="_8isAINkPEea_Gs1dMaVMnw" name="OpaqueExpression1">
+          <language>C++</language>
+          <body>2*SIZE-1</body>
+        </upperValue>
+      </ownedAttribute>
+      <ownedAttribute xmi:type="uml:Property" xmi:id="_920hgNkPEea_Gs1dMaVMnw" name="SIZE" visibility="public">
+        <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+        <defaultValue xmi:type="uml:LiteralInteger" xmi:id="_BCIm8NkQEea_Gs1dMaVMnw" value="2"/>
+      </ownedAttribute>
+    </packagedElement>
+    <packagedElement xmi:type="uml:Class" xmi:id="_576LINkPEea_Gs1dMaVMnw" name="Capsule1" isActive="true"/>
+    <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_xXf6ENkPEea_Gs1dMaVMnw">
+      <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_xXjkcNkPEea_Gs1dMaVMnw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+        <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/umlrt#/"/>
+      </eAnnotations>
+      <appliedProfile xmi:type="uml:Profile" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_1h74oEeVEeO0lv5O1DTHOQ"/>
+    </profileApplication>
+    <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_1cCGgNkPEea_Gs1dMaVMnw">
+      <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_1cCtkNkPEea_Gs1dMaVMnw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+        <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/umlrt/cppproperties#/"/>
+      </eAnnotations>
+      <appliedProfile xmi:type="uml:Profile" href="pathmap://UMLRT_CPP/RTCppProperties.profile.uml#_vl5LALs8EeSTjNEQkASznQ"/>
+    </profileApplication>
+  </uml:Model>
+  <UMLRealTime:Capsule xmi:id="_2fjZANkPEea_Gs1dMaVMnw" base_Class="_2drJsNkPEea_Gs1dMaVMnw"/>
+  <UMLRealTime:CapsulePart xmi:id="_5oRdcNkPEea_Gs1dMaVMnw" base_Property="_5njEsNkPEea_Gs1dMaVMnw"/>
+  <UMLRealTime:Capsule xmi:id="_58WQANkPEea_Gs1dMaVMnw" base_Class="_576LINkPEea_Gs1dMaVMnw"/>
+</xmi:XMI>
diff --git a/models/tests/codepattern/structure/SymbolicReplication2/expected_src/CMakeLists.txt b/models/tests/codepattern/structure/SymbolicReplication2/expected_src/CMakeLists.txt
new file mode 100644
index 0000000..6f1786c
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication2/expected_src/CMakeLists.txt
@@ -0,0 +1,36 @@
+# Generated 2017-01-12 16:43:17
+
+cmake_minimum_required(VERSION 2.8.7)
+set(TARGET TopMain)
+project(${TARGET})
+
+# require location of supporting RTS
+if (NOT UMLRTS_ROOT)
+  if (DEFINED ENV{UMLRTS_ROOT})
+    set(UMLRTS_ROOT $ENV{UMLRTS_ROOT})
+  else ()
+    set(UMLRTS_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/umlrt.rts)
+  endif ()
+endif ()
+
+# setup primary envars - provides tooling config
+include(${UMLRTS_ROOT}/build/buildenv.cmake)
+
+# model sources
+set(SRCS TopMain.cc Capsule1.cc Top.cc TopControllers.cc )
+
+# specify target
+add_executable(${TARGET} ${SRCS})
+
+# setup lib dependency support after defining TARGET
+include(${UMLRTS_ROOT}/build/rtslib.cmake)
+
+# compiler parameters
+set_target_properties(${TARGET} PROPERTIES COMPILE_OPTIONS "${COPTS}")
+set_target_properties(${TARGET} PROPERTIES COMPILE_DEFINITIONS "${CDEFS}")
+include_directories(${INCS})
+
+# linker parameters
+set_target_properties(${TARGET} PROPERTIES CMAKE_EXE_LINKER_FLAGS "${LOPTS}")
+target_link_libraries(${TARGET} ${LIBS})
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication2/expected_src/Capsule1.cc b/models/tests/codepattern/structure/SymbolicReplication2/expected_src/Capsule1.cc
new file mode 100644
index 0000000..d2fd3b5
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication2/expected_src/Capsule1.cc
@@ -0,0 +1,50 @@
+
+#include "Capsule1.hh"
+
+#include "umlrtslot.hh"
+#include <cstddef>
+#include "umlrtcapsuleclass.hh"
+class UMLRTRtsInterface;
+struct UMLRTCommsPort;
+
+Capsule_Capsule1::Capsule_Capsule1( const UMLRTCapsuleClass * cd, UMLRTSlot * st, const UMLRTCommsPort * * border, const UMLRTCommsPort * * internal, bool isStat )
+: UMLRTCapsule( NULL, cd, st, border, internal, isStat )
+{
+}
+
+
+void Capsule_Capsule1::bindPort( bool isBorder, int portId, int index )
+{
+}
+
+void Capsule_Capsule1::unbindPort( bool isBorder, int portId, int index )
+{
+}
+
+void Capsule_Capsule1::initialize( const UMLRTMessage & msg )
+{
+}
+
+void Capsule_Capsule1::inject( const UMLRTMessage & msg )
+{
+}
+
+
+static void instantiate_Capsule1( const UMLRTRtsInterface * rts, UMLRTSlot * slot, const UMLRTCommsPort * * borderPorts )
+{
+    slot->capsule = new Capsule_Capsule1( &Capsule1, slot, borderPorts, NULL, false );
+}
+
+const UMLRTCapsuleClass Capsule1 = 
+{
+    "Capsule1",
+    NULL,
+    instantiate_Capsule1,
+    0,
+    NULL,
+    0,
+    NULL,
+    0,
+    NULL
+};
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication2/expected_src/Capsule1.hh b/models/tests/codepattern/structure/SymbolicReplication2/expected_src/Capsule1.hh
new file mode 100644
index 0000000..e94ed01
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication2/expected_src/Capsule1.hh
@@ -0,0 +1,26 @@
+
+#ifndef CAPSULE1_HH
+#define CAPSULE1_HH
+
+#include "umlrtcapsule.hh"
+#include "umlrtcapsuleclass.hh"
+#include "umlrtmessage.hh"
+struct UMLRTCommsPort;
+struct UMLRTSlot;
+
+class Capsule_Capsule1 : public UMLRTCapsule
+{
+public:
+    Capsule_Capsule1( const UMLRTCapsuleClass * cd, UMLRTSlot * st, const UMLRTCommsPort * * border, const UMLRTCommsPort * * internal, bool isStat );
+    enum PartId
+    {
+    };
+    virtual void bindPort( bool isBorder, int portId, int index );
+    virtual void unbindPort( bool isBorder, int portId, int index );
+    virtual void initialize( const UMLRTMessage & msg );
+    virtual void inject( const UMLRTMessage & msg );
+};
+extern const UMLRTCapsuleClass Capsule1;
+
+#endif
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication2/expected_src/Makefile b/models/tests/codepattern/structure/SymbolicReplication2/expected_src/Makefile
new file mode 100644
index 0000000..0bcbd22
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication2/expected_src/Makefile
@@ -0,0 +1,11 @@
+##################################################
+# Default makefile
+# Redirect make to target makefile
+##################################################
+
+all:
+	make -f MakefileTop.mk all
+clean:
+	make -f MakefileTop.mk clean
+.PHONY: 
+	make -f MakefileTop.mk all clean
diff --git a/models/tests/codepattern/structure/SymbolicReplication2/expected_src/MakefileTop.mk b/models/tests/codepattern/structure/SymbolicReplication2/expected_src/MakefileTop.mk
new file mode 100644
index 0000000..0aacf43
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication2/expected_src/MakefileTop.mk
@@ -0,0 +1,49 @@
+# set default value for TARGETOS if is it not defined
+ifeq ($(TARGETOS), )
+$(warning warning: TARGETOS not defined. Choosing linux)
+TARGETOS=linux
+endif
+
+# set default value for BUILDTOOLS if is it not defined
+ifeq ($(BUILDTOOLS), )
+$(warning warning: BUILDTOOLS not defined. Choosing x86-gcc-4.6.3)
+BUILDTOOLS=x86-gcc-4.6.3
+endif
+
+# Location of RTS root.
+UMLRTS_ROOT ?= ./umlrt.rts
+
+CONFIG=$(TARGETOS).$(BUILDTOOLS)
+
+# Destination directory for the RTS services library.
+LIBDEST=$(UMLRTS_ROOT)/lib/$(CONFIG)
+
+include $(UMLRTS_ROOT)/build/host/host.mk
+include $(UMLRTS_ROOT)/build/buildtools/$(BUILDTOOLS)/buildtools.mk
+
+LD_PATHS=$(LIBDEST)
+CC_INCLUDES+=$(UMLRTS_ROOT)/include
+
+CC_DEFINES:=$(foreach d, $(CC_DEFINES), $(CC_DEF)$d)
+CC_INCLUDES:=$(foreach i, $(CC_INCLUDES), $(CC_INC)$i)
+LD_LIBS:=$(foreach i, $(LD_LIBS), $(LD_LIB)$i)
+LD_PATHS:=$(foreach i, $(LD_PATHS), $(LD_LIBPATH)$i)
+
+SRCS = TopMain.cc Capsule1.cc Top.cc TopControllers.cc 
+OBJS = $(subst $(CC_EXT),$(OBJ_EXT),$(SRCS))
+
+MAIN = TopMain$(EXE_EXT)
+
+all: $(MAIN)
+
+$(MAIN): $(OBJS) $(UMLRTS_ROOT)/lib/$(CONFIG)/$(LIB_PRFX)rts$(LIB_EXT)
+	$(LD) $(LD_FLAGS) $(OBJS) $(LD_PATHS) $(LD_LIBS) $(LD_OUT)$@
+
+%$(OBJ_EXT) : %$(CC_EXT)
+	$(CC) $< $(CC_FLAGS) $(CC_DEFINES) $(CC_INCLUDES) $(CC_OUT)$@
+
+clean :
+	@echo $(RM) main$(EXE_EXT) *$(OBJ_EXT) *$(DEP_EXT) $(DBG_FILES)
+	@$(RM) main$(EXE_EXT) *$(OBJ_EXT) *$(DEP_EXT) $(DBG_FILES)
+
+.PHONY: all clean
diff --git a/models/tests/codepattern/structure/SymbolicReplication2/expected_src/Top-connections.log b/models/tests/codepattern/structure/SymbolicReplication2/expected_src/Top-connections.log
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication2/expected_src/Top-connections.log
diff --git a/models/tests/codepattern/structure/SymbolicReplication2/expected_src/Top.cc b/models/tests/codepattern/structure/SymbolicReplication2/expected_src/Top.cc
new file mode 100644
index 0000000..971beed
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication2/expected_src/Top.cc
@@ -0,0 +1,73 @@
+
+#include "Top.hh"
+
+#include "Capsule1.hh"
+#include "umlrtcapsuleclass.hh"
+#include "umlrtcapsulepart.hh"
+#include "umlrtslot.hh"
+#include <cstddef>
+#include "umlrtcapsulerole.hh"
+#include "umlrtframeservice.hh"
+class UMLRTRtsInterface;
+struct UMLRTCommsPort;
+
+Capsule_Top::Capsule_Top( const UMLRTCapsuleClass * cd, UMLRTSlot * st, const UMLRTCommsPort * * border, const UMLRTCommsPort * * internal, bool isStat )
+: UMLRTCapsule( NULL, cd, st, border, internal, isStat )
+, capsule1( &slot->parts[part_capsule1] )
+, SIZE( 2 )
+{
+}
+
+
+
+void Capsule_Top::bindPort( bool isBorder, int portId, int index )
+{
+}
+
+void Capsule_Top::unbindPort( bool isBorder, int portId, int index )
+{
+}
+
+
+void Capsule_Top::initialize( const UMLRTMessage & msg )
+{
+}
+
+void Capsule_Top::inject( const UMLRTMessage & msg )
+{
+}
+
+
+static const UMLRTCapsuleRole roles[] = 
+{
+    {
+        "capsule1",
+        &Capsule1,
+        3,
+        3,
+        false,
+        false
+    }
+};
+
+static void instantiate_Top( const UMLRTRtsInterface * rts, UMLRTSlot * slot, const UMLRTCommsPort * * borderPorts )
+{
+    Capsule1.instantiate( NULL, slot->parts[Capsule_Top::part_capsule1].slots[0], UMLRTFrameService::createBorderPorts( slot->parts[Capsule_Top::part_capsule1].slots[0], Capsule1.numPortRolesBorder ) );
+    Capsule1.instantiate( NULL, slot->parts[Capsule_Top::part_capsule1].slots[1], UMLRTFrameService::createBorderPorts( slot->parts[Capsule_Top::part_capsule1].slots[1], Capsule1.numPortRolesBorder ) );
+    Capsule1.instantiate( NULL, slot->parts[Capsule_Top::part_capsule1].slots[2], UMLRTFrameService::createBorderPorts( slot->parts[Capsule_Top::part_capsule1].slots[2], Capsule1.numPortRolesBorder ) );
+    slot->capsule = new Capsule_Top( &Top, slot, borderPorts, NULL, false );
+}
+
+const UMLRTCapsuleClass Top = 
+{
+    "Top",
+    NULL,
+    instantiate_Top,
+    1,
+    roles,
+    0,
+    NULL,
+    0,
+    NULL
+};
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication2/expected_src/Top.hh b/models/tests/codepattern/structure/SymbolicReplication2/expected_src/Top.hh
new file mode 100644
index 0000000..f3a67e1
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication2/expected_src/Top.hh
@@ -0,0 +1,32 @@
+
+#ifndef TOP_HH
+#define TOP_HH
+
+#include "umlrtcapsule.hh"
+#include "umlrtcapsuleclass.hh"
+#include "umlrtmessage.hh"
+struct UMLRTCapsulePart;
+struct UMLRTCommsPort;
+struct UMLRTSlot;
+
+class Capsule_Top : public UMLRTCapsule
+{
+public:
+    Capsule_Top( const UMLRTCapsuleClass * cd, UMLRTSlot * st, const UMLRTCommsPort * * border, const UMLRTCommsPort * * internal, bool isStat );
+    enum PartId
+    {
+        part_capsule1
+    };
+protected:
+    const UMLRTCapsulePart * const capsule1;
+public:
+    virtual void bindPort( bool isBorder, int portId, int index );
+    virtual void unbindPort( bool isBorder, int portId, int index );
+    int SIZE;
+    virtual void initialize( const UMLRTMessage & msg );
+    virtual void inject( const UMLRTMessage & msg );
+};
+extern const UMLRTCapsuleClass Top;
+
+#endif
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication2/expected_src/TopControllers.cc b/models/tests/codepattern/structure/SymbolicReplication2/expected_src/TopControllers.cc
new file mode 100644
index 0000000..9ee3bec
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication2/expected_src/TopControllers.cc
@@ -0,0 +1,109 @@
+
+#include "TopControllers.hh"
+
+#include "Capsule1.hh"
+#include "Top.hh"
+#include "umlrtcapsuleclass.hh"
+#include "umlrtcapsulepart.hh"
+#include "umlrtcontroller.hh"
+#include "umlrtslot.hh"
+#include <cstddef>
+
+
+static UMLRTController DefaultController_( "DefaultController" );
+
+UMLRTController * DefaultController = &DefaultController_;
+
+static Capsule_Top top( &Top, &Top_slots[InstId_Top], NULL, NULL, true );
+
+static UMLRTSlot * slots_Top[] = 
+{
+    &Top_slots[InstId_Top_capsule1_0],
+    &Top_slots[InstId_Top_capsule1_1],
+    &Top_slots[InstId_Top_capsule1_2]
+};
+
+static UMLRTCapsulePart parts_Top[] = 
+{
+    {
+        &Top,
+        Capsule_Top::part_capsule1,
+        3,
+        &slots_Top[0]
+    }
+};
+
+static Capsule_Capsule1 top_capsule1_0( &Capsule1, &Top_slots[InstId_Top_capsule1_0], NULL, NULL, true );
+
+static Capsule_Capsule1 top_capsule1_1( &Capsule1, &Top_slots[InstId_Top_capsule1_1], NULL, NULL, true );
+
+static Capsule_Capsule1 top_capsule1_2( &Capsule1, &Top_slots[InstId_Top_capsule1_2], NULL, NULL, true );
+
+UMLRTSlot Top_slots[] = 
+{
+    {
+        "Top",
+        0,
+        &Top,
+        NULL,
+        0,
+        &top,
+        &DefaultController_,
+        1,
+        parts_Top,
+        0,
+        NULL,
+        NULL,
+        true,
+        false
+    },
+    {
+        "Top.capsule1[0]",
+        0,
+        &Capsule1,
+        &Top,
+        Capsule_Top::part_capsule1,
+        &top_capsule1_0,
+        &DefaultController_,
+        0,
+        NULL,
+        0,
+        NULL,
+        NULL,
+        true,
+        false
+    },
+    {
+        "Top.capsule1[1]",
+        1,
+        &Capsule1,
+        &Top,
+        Capsule_Top::part_capsule1,
+        &top_capsule1_1,
+        &DefaultController_,
+        0,
+        NULL,
+        0,
+        NULL,
+        NULL,
+        true,
+        false
+    },
+    {
+        "Top.capsule1[2]",
+        2,
+        &Capsule1,
+        &Top,
+        Capsule_Top::part_capsule1,
+        &top_capsule1_2,
+        &DefaultController_,
+        0,
+        NULL,
+        0,
+        NULL,
+        NULL,
+        true,
+        false
+    }
+};
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication2/expected_src/TopControllers.hh b/models/tests/codepattern/structure/SymbolicReplication2/expected_src/TopControllers.hh
new file mode 100644
index 0000000..b150ab4
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication2/expected_src/TopControllers.hh
@@ -0,0 +1,19 @@
+
+#ifndef TOPCONTROLLERS_HH
+#define TOPCONTROLLERS_HH
+
+class UMLRTController;
+struct UMLRTSlot;
+
+enum CapsuleInstanceId
+{
+    InstId_Top,
+    InstId_Top_capsule1_0,
+    InstId_Top_capsule1_1,
+    InstId_Top_capsule1_2
+};
+extern UMLRTController * DefaultController;
+extern UMLRTSlot Top_slots[];
+
+#endif
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication2/expected_src/TopMain.cc b/models/tests/codepattern/structure/SymbolicReplication2/expected_src/TopMain.cc
new file mode 100644
index 0000000..b465f00
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication2/expected_src/TopMain.cc
@@ -0,0 +1,38 @@
+#include "umlrtmain.hh"
+
+#include "umlrtcontroller.hh"
+#include "TopControllers.hh"
+#include "umlrtcapsuletocontrollermap.hh"
+#include "umlrtmessagepool.hh"
+#include "umlrtsignalelementpool.hh"
+#include "umlrttimerpool.hh"
+#include "umlrtuserconfig.hh"
+#include <stdio.h>
+
+static UMLRTSignalElement signalElementBuffer[USER_CONFIG_SIGNAL_ELEMENT_POOL_SIZE];
+static UMLRTSignalElementPool signalElementPool( signalElementBuffer, USER_CONFIG_SIGNAL_ELEMENT_POOL_SIZE );
+
+static UMLRTMessage messageBuffer[USER_CONFIG_MESSAGE_POOL_SIZE];
+static UMLRTMessagePool messagePool( messageBuffer, USER_CONFIG_MESSAGE_POOL_SIZE );
+
+static UMLRTTimer timers[USER_CONFIG_TIMER_POOL_SIZE];
+static UMLRTTimerPool timerPool( timers, USER_CONFIG_TIMER_POOL_SIZE );
+
+int main( int argc, char * argv[] )
+{
+    UMLRTController::initializePools( &signalElementPool, &messagePool, &timerPool );
+    UMLRTMain::setArgs( argc, argv );
+    UMLRTCapsuleToControllerMap::setDefaultSlotList( Top_slots, 4 );
+
+    if( ! UMLRTMain::targetStartup() )
+        return EXIT_FAILURE;
+
+    DefaultController->spawn();
+
+    if( ! UMLRTMain::mainLoop() )
+        return UMLRTMain::targetShutdown( false );
+
+    DefaultController->join();
+
+    return UMLRTMain::targetShutdown( true );
+}
diff --git a/models/tests/codepattern/structure/SymbolicReplication3/.project b/models/tests/codepattern/structure/SymbolicReplication3/.project
new file mode 100644
index 0000000..d3221f4
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication3/.project
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>SymbolicReplication3</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+	</natures>
+</projectDescription>
diff --git a/models/tests/codepattern/structure/SymbolicReplication3/SymbolicReplication3.di b/models/tests/codepattern/structure/SymbolicReplication3/SymbolicReplication3.di
new file mode 100644
index 0000000..bf9abab
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication3/SymbolicReplication3.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/models/tests/codepattern/structure/SymbolicReplication3/SymbolicReplication3.notation b/models/tests/codepattern/structure/SymbolicReplication3/SymbolicReplication3.notation
new file mode 100644
index 0000000..769c667
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication3/SymbolicReplication3.notation
@@ -0,0 +1,418 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+  <notation:Diagram xmi:id="_ebBMgNkQEea_Gs1dMaVMnw" type="CompositeStructure" measurementUnit="Pixel">
+    <children xmi:type="notation:Shape" xmi:id="_ebBzkNkQEea_Gs1dMaVMnw" type="Class_Shape">
+      <children xmi:type="notation:DecorationNode" xmi:id="_ebBzktkQEea_Gs1dMaVMnw" type="Class_NameLabel"/>
+      <children xmi:type="notation:DecorationNode" xmi:id="_ebBzk9kQEea_Gs1dMaVMnw" type="Class_FloatingNameLabel">
+        <layoutConstraint xmi:type="notation:Location" xmi:id="_ebBzlNkQEea_Gs1dMaVMnw" y="5"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_ebCaoNkQEea_Gs1dMaVMnw" type="Class_StructureCompartment">
+        <children xmi:type="notation:Shape" xmi:id="_g9a30NkQEea_Gs1dMaVMnw" type="Property_Shape">
+          <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_k7pA4NkQEea_Gs1dMaVMnw" source="PapyrusCSSForceValue">
+            <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_k7pA4dkQEea_Gs1dMaVMnw" key="mutable" value="true"/>
+          </eAnnotations>
+          <children xmi:type="notation:DecorationNode" xmi:id="_g9be4NkQEea_Gs1dMaVMnw" type="Property_NameLabel"/>
+          <children xmi:type="notation:DecorationNode" xmi:id="_g9be4dkQEea_Gs1dMaVMnw" type="Property_FloatingNameLabel">
+            <layoutConstraint xmi:type="notation:Location" xmi:id="_g9cF8NkQEea_Gs1dMaVMnw" y="5"/>
+          </children>
+          <children xmi:type="notation:BasicCompartment" xmi:id="_g9cF8dkQEea_Gs1dMaVMnw" type="Property_StructureCompartment">
+            <styles xmi:type="notation:TitleStyle" xmi:id="_g9cF8tkQEea_Gs1dMaVMnw"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_g9cF89kQEea_Gs1dMaVMnw"/>
+          </children>
+          <children xmi:type="notation:DecorationNode" xmi:id="_g9lP4NkQEea_Gs1dMaVMnw" type="StereotypeLabel">
+            <styles xmi:type="notation:StringValueStyle" xmi:id="_g9lP4dkQEea_Gs1dMaVMnw" name="stereotype" stringValue="UMLRealTime::CapsulePart"/>
+            <element xmi:type="uml:Stereotype" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_EQwT4EhOEeO0lv5O1DTHOQ"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_g9lP4tkQEea_Gs1dMaVMnw"/>
+          </children>
+          <children xmi:type="notation:BasicCompartment" xmi:id="_g9lP49kQEea_Gs1dMaVMnw" type="StereotypeBrace">
+            <styles xmi:type="notation:TitleStyle" xmi:id="_g9lP5NkQEea_Gs1dMaVMnw"/>
+            <styles xmi:type="notation:StringValueStyle" xmi:id="_g9lP5dkQEea_Gs1dMaVMnw" name="stereotype" stringValue="UMLRealTime::CapsulePart"/>
+            <element xmi:type="uml:Stereotype" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_EQwT4EhOEeO0lv5O1DTHOQ"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_g9lP5tkQEea_Gs1dMaVMnw"/>
+          </children>
+          <children xmi:type="notation:BasicCompartment" xmi:id="_g9l28NkQEea_Gs1dMaVMnw" type="compartment_shape_display">
+            <styles xmi:type="notation:TitleStyle" xmi:id="_g9l28dkQEea_Gs1dMaVMnw"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_g9l28tkQEea_Gs1dMaVMnw"/>
+          </children>
+          <children xmi:type="notation:BasicCompartment" xmi:id="_g9nFENkQEea_Gs1dMaVMnw" type="StereotypeCompartment">
+            <styles xmi:type="notation:TitleStyle" xmi:id="_g9nFEdkQEea_Gs1dMaVMnw"/>
+            <styles xmi:type="notation:StringValueStyle" xmi:id="_g9nFEtkQEea_Gs1dMaVMnw" name="stereotype" stringValue="UMLRealTime::CapsulePart"/>
+            <element xmi:type="uml:Stereotype" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_EQwT4EhOEeO0lv5O1DTHOQ"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_g9nFE9kQEea_Gs1dMaVMnw"/>
+          </children>
+          <children xmi:type="notation:Shape" xmi:id="_k5CY0NkQEea_Gs1dMaVMnw" type="Port_Shape">
+            <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_k7pA4tkQEea_Gs1dMaVMnw" source="PapyrusCSSForceValue">
+              <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_k7pA49kQEea_Gs1dMaVMnw" key="mutable" value="true"/>
+            </eAnnotations>
+            <children xmi:type="notation:DecorationNode" xmi:id="_k5CY0tkQEea_Gs1dMaVMnw" type="Port_NameLabel">
+              <layoutConstraint xmi:type="notation:Location" xmi:id="_k5CY09kQEea_Gs1dMaVMnw" x="9" y="-18"/>
+            </children>
+            <children xmi:type="notation:DecorationNode" xmi:id="_k5C_4NkQEea_Gs1dMaVMnw" type="Port_StereotypeLabel">
+              <layoutConstraint xmi:type="notation:Location" xmi:id="_k5C_4dkQEea_Gs1dMaVMnw" x="25" y="-10"/>
+            </children>
+            <element xmi:type="uml:Port" href="SymbolicReplication3.uml#_ka5rUNkQEea_Gs1dMaVMnw"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k5CY0dkQEea_Gs1dMaVMnw" x="110" y="33" width="11" height="11"/>
+          </children>
+          <element xmi:type="uml:Property" href="SymbolicReplication3.uml#_gd2m8NkQEea_Gs1dMaVMnw"/>
+          <layoutConstraint xmi:type="notation:Bounds" xmi:id="_g9a30dkQEea_Gs1dMaVMnw" x="55" y="77" height="72"/>
+        </children>
+        <children xmi:type="notation:Shape" xmi:id="_g9l289kQEea_Gs1dMaVMnw" type="StereotypeComment">
+          <styles xmi:type="notation:TitleStyle" xmi:id="_g9l29NkQEea_Gs1dMaVMnw"/>
+          <styles xmi:type="notation:EObjectValueStyle" xmi:id="_g9meANkQEea_Gs1dMaVMnw" name="BASE_ELEMENT">
+            <eObjectValue xmi:type="uml:Property" href="SymbolicReplication3.uml#_gd2m8NkQEea_Gs1dMaVMnw"/>
+          </styles>
+          <element xsi:nil="true"/>
+          <layoutConstraint xmi:type="notation:Bounds" xmi:id="_g9l29dkQEea_Gs1dMaVMnw" x="200"/>
+        </children>
+        <children xmi:type="notation:Shape" xmi:id="_iBHJcNkQEea_Gs1dMaVMnw" type="Property_Shape">
+          <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_754eQNkQEea_Gs1dMaVMnw" source="PapyrusCSSForceValue">
+            <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_755FUNkQEea_Gs1dMaVMnw" key="mutable" value="true"/>
+          </eAnnotations>
+          <children xmi:type="notation:DecorationNode" xmi:id="_iBHwgNkQEea_Gs1dMaVMnw" type="Property_NameLabel"/>
+          <children xmi:type="notation:DecorationNode" xmi:id="_iBHwgdkQEea_Gs1dMaVMnw" type="Property_FloatingNameLabel">
+            <layoutConstraint xmi:type="notation:Location" xmi:id="_iBHwgtkQEea_Gs1dMaVMnw" y="5"/>
+          </children>
+          <children xmi:type="notation:BasicCompartment" xmi:id="_iBHwg9kQEea_Gs1dMaVMnw" type="Property_StructureCompartment">
+            <styles xmi:type="notation:TitleStyle" xmi:id="_iBHwhNkQEea_Gs1dMaVMnw"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iBHwhdkQEea_Gs1dMaVMnw"/>
+          </children>
+          <children xmi:type="notation:DecorationNode" xmi:id="_iBQ6cNkQEea_Gs1dMaVMnw" type="StereotypeLabel">
+            <styles xmi:type="notation:StringValueStyle" xmi:id="_iBQ6cdkQEea_Gs1dMaVMnw" name="stereotype" stringValue="UMLRealTime::CapsulePart"/>
+            <element xmi:type="uml:Stereotype" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_EQwT4EhOEeO0lv5O1DTHOQ"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iBQ6ctkQEea_Gs1dMaVMnw"/>
+          </children>
+          <children xmi:type="notation:BasicCompartment" xmi:id="_iBQ6c9kQEea_Gs1dMaVMnw" type="StereotypeBrace">
+            <styles xmi:type="notation:TitleStyle" xmi:id="_iBQ6dNkQEea_Gs1dMaVMnw"/>
+            <styles xmi:type="notation:StringValueStyle" xmi:id="_iBQ6ddkQEea_Gs1dMaVMnw" name="stereotype" stringValue="UMLRealTime::CapsulePart"/>
+            <element xmi:type="uml:Stereotype" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_EQwT4EhOEeO0lv5O1DTHOQ"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iBQ6dtkQEea_Gs1dMaVMnw"/>
+          </children>
+          <children xmi:type="notation:BasicCompartment" xmi:id="_iBRhgNkQEea_Gs1dMaVMnw" type="compartment_shape_display">
+            <styles xmi:type="notation:TitleStyle" xmi:id="_iBRhgdkQEea_Gs1dMaVMnw"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iBRhgtkQEea_Gs1dMaVMnw"/>
+          </children>
+          <children xmi:type="notation:BasicCompartment" xmi:id="_iBSvp9kQEea_Gs1dMaVMnw" type="StereotypeCompartment">
+            <styles xmi:type="notation:TitleStyle" xmi:id="_iBSvqNkQEea_Gs1dMaVMnw"/>
+            <styles xmi:type="notation:StringValueStyle" xmi:id="_iBSvqdkQEea_Gs1dMaVMnw" name="stereotype" stringValue="UMLRealTime::CapsulePart"/>
+            <element xmi:type="uml:Stereotype" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_EQwT4EhOEeO0lv5O1DTHOQ"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iBSvqtkQEea_Gs1dMaVMnw"/>
+          </children>
+          <children xmi:type="notation:Shape" xmi:id="_739ysNkQEea_Gs1dMaVMnw" type="Port_Shape">
+            <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_755FUdkQEea_Gs1dMaVMnw" source="PapyrusCSSForceValue">
+              <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_755FUtkQEea_Gs1dMaVMnw" key="mutable" value="true"/>
+            </eAnnotations>
+            <children xmi:type="notation:DecorationNode" xmi:id="_739ystkQEea_Gs1dMaVMnw" type="Port_NameLabel">
+              <layoutConstraint xmi:type="notation:Location" xmi:id="_739ys9kQEea_Gs1dMaVMnw" x="-46" y="18"/>
+            </children>
+            <children xmi:type="notation:DecorationNode" xmi:id="_739ytNkQEea_Gs1dMaVMnw" type="Port_StereotypeLabel">
+              <layoutConstraint xmi:type="notation:Location" xmi:id="_739ytdkQEea_Gs1dMaVMnw" x="25" y="-10"/>
+            </children>
+            <element xmi:type="uml:Port" href="SymbolicReplication3.uml#_69STINkQEea_Gs1dMaVMnw"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_739ysdkQEea_Gs1dMaVMnw" x="-5" y="34" width="11" height="11"/>
+          </children>
+          <element xmi:type="uml:Property" href="SymbolicReplication3.uml#_hnJKQNkQEea_Gs1dMaVMnw"/>
+          <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iBHJcdkQEea_Gs1dMaVMnw" x="336" y="77" height="72"/>
+        </children>
+        <children xmi:type="notation:Shape" xmi:id="_iBSIkNkQEea_Gs1dMaVMnw" type="StereotypeComment">
+          <styles xmi:type="notation:TitleStyle" xmi:id="_iBSIkdkQEea_Gs1dMaVMnw"/>
+          <styles xmi:type="notation:EObjectValueStyle" xmi:id="_iBSIk9kQEea_Gs1dMaVMnw" name="BASE_ELEMENT">
+            <eObjectValue xmi:type="uml:Property" href="SymbolicReplication3.uml#_hnJKQNkQEea_Gs1dMaVMnw"/>
+          </styles>
+          <element xsi:nil="true"/>
+          <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iBSIktkQEea_Gs1dMaVMnw" x="200"/>
+        </children>
+        <children xmi:type="notation:Shape" xmi:id="_k5MJ0NkQEea_Gs1dMaVMnw" type="StereotypeComment">
+          <styles xmi:type="notation:TitleStyle" xmi:id="_k5MJ0dkQEea_Gs1dMaVMnw"/>
+          <styles xmi:type="notation:EObjectValueStyle" xmi:id="_k5MJ09kQEea_Gs1dMaVMnw" name="BASE_ELEMENT">
+            <eObjectValue xmi:type="uml:Port" href="SymbolicReplication3.uml#_ka5rUNkQEea_Gs1dMaVMnw"/>
+          </styles>
+          <element xsi:nil="true"/>
+          <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k5MJ0tkQEea_Gs1dMaVMnw" x="194" y="-6"/>
+        </children>
+        <children xmi:type="notation:Shape" xmi:id="_74D5UNkQEea_Gs1dMaVMnw" type="StereotypeComment">
+          <styles xmi:type="notation:TitleStyle" xmi:id="_74D5UdkQEea_Gs1dMaVMnw"/>
+          <styles xmi:type="notation:EObjectValueStyle" xmi:id="_74D5U9kQEea_Gs1dMaVMnw" name="BASE_ELEMENT">
+            <eObjectValue xmi:type="uml:Port" href="SymbolicReplication3.uml#_69STINkQEea_Gs1dMaVMnw"/>
+          </styles>
+          <element xsi:nil="true"/>
+          <layoutConstraint xmi:type="notation:Bounds" xmi:id="_74D5UtkQEea_Gs1dMaVMnw" x="194" y="-6"/>
+        </children>
+        <children xmi:type="notation:Shape" xmi:id="_LjurgNkSEea_Gs1dMaVMnw" type="StereotypeComment">
+          <styles xmi:type="notation:TitleStyle" xmi:id="_LjurgdkSEea_Gs1dMaVMnw"/>
+          <styles xmi:type="notation:EObjectValueStyle" xmi:id="_Ljurg9kSEea_Gs1dMaVMnw" name="BASE_ELEMENT">
+            <eObjectValue xmi:type="uml:Connector" href="SymbolicReplication3.uml#_Lhw8oNkSEea_Gs1dMaVMnw"/>
+          </styles>
+          <element xsi:nil="true"/>
+          <layoutConstraint xmi:type="notation:Bounds" xmi:id="_LjurgtkSEea_Gs1dMaVMnw" x="100" y="100"/>
+        </children>
+        <styles xmi:type="notation:TitleStyle" xmi:id="_ebCaodkQEea_Gs1dMaVMnw"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ebCaotkQEea_Gs1dMaVMnw"/>
+      </children>
+      <element xmi:type="uml:Class" href="SymbolicReplication3.uml#_eaoyANkQEea_Gs1dMaVMnw"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ebBzkdkQEea_Gs1dMaVMnw" x="40" y="35" width="555" height="249"/>
+    </children>
+    <children xmi:type="notation:Shape" xmi:id="_fTzOoNkQEea_Gs1dMaVMnw" type="StereotypeComment">
+      <styles xmi:type="notation:TitleStyle" xmi:id="_fTzOodkQEea_Gs1dMaVMnw"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_fTz1sNkQEea_Gs1dMaVMnw" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Class" href="SymbolicReplication3.uml#_eaoyANkQEea_Gs1dMaVMnw"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fTzOotkQEea_Gs1dMaVMnw" x="240" y="40"/>
+    </children>
+    <styles xmi:type="notation:StringValueStyle" xmi:id="_ebBMgdkQEea_Gs1dMaVMnw" name="diagram_compatibility_version" stringValue="1.2.0"/>
+    <styles xmi:type="notation:DiagramStyle" xmi:id="_ebBMgtkQEea_Gs1dMaVMnw"/>
+    <styles xmi:type="style:PapyrusViewStyle" xmi:id="_ebBMg9kQEea_Gs1dMaVMnw">
+      <owner xmi:type="uml:Class" href="SymbolicReplication3.uml#_eaoyANkQEea_Gs1dMaVMnw"/>
+      <configuration xmi:type="configuration:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/configuration/UMLRT.configuration#_Z79eQHcZEeSnWeKqQOfW2A"/>
+    </styles>
+    <element xmi:type="uml:Class" href="SymbolicReplication3.uml#_eaoyANkQEea_Gs1dMaVMnw"/>
+    <edges xmi:type="notation:Connector" xmi:id="_fTz1sdkQEea_Gs1dMaVMnw" type="StereotypeCommentLink" source="_ebBzkNkQEea_Gs1dMaVMnw" target="_fTzOoNkQEea_Gs1dMaVMnw">
+      <styles xmi:type="notation:FontStyle" xmi:id="_fTz1stkQEea_Gs1dMaVMnw"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_fTz1ttkQEea_Gs1dMaVMnw" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Class" href="SymbolicReplication3.uml#_eaoyANkQEea_Gs1dMaVMnw"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_fTz1s9kQEea_Gs1dMaVMnw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+      <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_fTz1tNkQEea_Gs1dMaVMnw"/>
+      <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_fTz1tdkQEea_Gs1dMaVMnw"/>
+    </edges>
+    <edges xmi:type="notation:Connector" xmi:id="_g9meAdkQEea_Gs1dMaVMnw" type="StereotypeCommentLink" source="_g9a30NkQEea_Gs1dMaVMnw" target="_g9l289kQEea_Gs1dMaVMnw">
+      <styles xmi:type="notation:FontStyle" xmi:id="_g9meAtkQEea_Gs1dMaVMnw"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_g9meBtkQEea_Gs1dMaVMnw" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Property" href="SymbolicReplication3.uml#_gd2m8NkQEea_Gs1dMaVMnw"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_g9meA9kQEea_Gs1dMaVMnw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+      <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_g9meBNkQEea_Gs1dMaVMnw"/>
+      <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_g9meBdkQEea_Gs1dMaVMnw"/>
+    </edges>
+    <edges xmi:type="notation:Connector" xmi:id="_iBSIlNkQEea_Gs1dMaVMnw" type="StereotypeCommentLink" source="_iBHJcNkQEea_Gs1dMaVMnw" target="_iBSIkNkQEea_Gs1dMaVMnw">
+      <styles xmi:type="notation:FontStyle" xmi:id="_iBSIldkQEea_Gs1dMaVMnw"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_iBSvotkQEea_Gs1dMaVMnw" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Property" href="SymbolicReplication3.uml#_hnJKQNkQEea_Gs1dMaVMnw"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_iBSIltkQEea_Gs1dMaVMnw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+      <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_iBSvoNkQEea_Gs1dMaVMnw"/>
+      <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_iBSvodkQEea_Gs1dMaVMnw"/>
+    </edges>
+    <edges xmi:type="notation:Connector" xmi:id="_k5MJ1NkQEea_Gs1dMaVMnw" type="StereotypeCommentLink" source="_k5CY0NkQEea_Gs1dMaVMnw" target="_k5MJ0NkQEea_Gs1dMaVMnw">
+      <styles xmi:type="notation:FontStyle" xmi:id="_k5MJ1dkQEea_Gs1dMaVMnw"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_k5MJ2dkQEea_Gs1dMaVMnw" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Port" href="SymbolicReplication3.uml#_ka5rUNkQEea_Gs1dMaVMnw"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_k5MJ1tkQEea_Gs1dMaVMnw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+      <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_k5MJ19kQEea_Gs1dMaVMnw"/>
+      <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_k5MJ2NkQEea_Gs1dMaVMnw"/>
+    </edges>
+    <edges xmi:type="notation:Connector" xmi:id="_74D5VNkQEea_Gs1dMaVMnw" type="StereotypeCommentLink" source="_739ysNkQEea_Gs1dMaVMnw" target="_74D5UNkQEea_Gs1dMaVMnw">
+      <styles xmi:type="notation:FontStyle" xmi:id="_74D5VdkQEea_Gs1dMaVMnw"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_74D5WdkQEea_Gs1dMaVMnw" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Port" href="SymbolicReplication3.uml#_69STINkQEea_Gs1dMaVMnw"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_74D5VtkQEea_Gs1dMaVMnw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+      <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_74D5V9kQEea_Gs1dMaVMnw"/>
+      <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_74D5WNkQEea_Gs1dMaVMnw"/>
+    </edges>
+    <edges xmi:type="notation:Connector" xmi:id="_LigjgNkSEea_Gs1dMaVMnw" type="Connector_Edge" source="_k5CY0NkQEea_Gs1dMaVMnw" target="_739ysNkQEea_Gs1dMaVMnw">
+      <children xmi:type="notation:DecorationNode" xmi:id="_LihKkNkSEea_Gs1dMaVMnw" type="Connector_StereotypeLabel">
+        <layoutConstraint xmi:type="notation:Location" xmi:id="_LihxoNkSEea_Gs1dMaVMnw" y="60"/>
+      </children>
+      <children xmi:type="notation:DecorationNode" xmi:id="_LihxodkSEea_Gs1dMaVMnw" type="Connector_NameLabel">
+        <layoutConstraint xmi:type="notation:Location" xmi:id="_LihxotkSEea_Gs1dMaVMnw" y="-20"/>
+      </children>
+      <styles xmi:type="notation:FontStyle" xmi:id="_LigjgdkSEea_Gs1dMaVMnw"/>
+      <element xmi:type="uml:Connector" href="SymbolicReplication3.uml#_Lhw8oNkSEea_Gs1dMaVMnw"/>
+      <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_LigjgtkSEea_Gs1dMaVMnw" points="[222, 175, -643984, -643984]$[380, 172, -643984, -643984]"/>
+      <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_LkjK4NkSEea_Gs1dMaVMnw" id="(0.18181818181818182,0.36363636363636365)"/>
+    </edges>
+    <edges xmi:type="notation:Connector" xmi:id="_LjurhNkSEea_Gs1dMaVMnw" type="StereotypeCommentLink" source="_LigjgNkSEea_Gs1dMaVMnw" target="_LjurgNkSEea_Gs1dMaVMnw">
+      <styles xmi:type="notation:FontStyle" xmi:id="_LjurhdkSEea_Gs1dMaVMnw"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_LjvSkNkSEea_Gs1dMaVMnw" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Connector" href="SymbolicReplication3.uml#_Lhw8oNkSEea_Gs1dMaVMnw"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_LjurhtkSEea_Gs1dMaVMnw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+      <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Ljurh9kSEea_Gs1dMaVMnw"/>
+      <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_LjuriNkSEea_Gs1dMaVMnw"/>
+    </edges>
+  </notation:Diagram>
+  <notation:Diagram xmi:id="_gu-zMNkQEea_Gs1dMaVMnw" type="CompositeStructure" measurementUnit="Pixel">
+    <children xmi:type="notation:Shape" xmi:id="_gu_aQNkQEea_Gs1dMaVMnw" type="Class_Shape">
+      <children xmi:type="notation:DecorationNode" xmi:id="_gu_aQtkQEea_Gs1dMaVMnw" type="Class_NameLabel"/>
+      <children xmi:type="notation:DecorationNode" xmi:id="_gu_aQ9kQEea_Gs1dMaVMnw" type="Class_FloatingNameLabel">
+        <layoutConstraint xmi:type="notation:Location" xmi:id="_gu_aRNkQEea_Gs1dMaVMnw" y="5"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_gu_aRdkQEea_Gs1dMaVMnw" type="Class_StructureCompartment">
+        <styles xmi:type="notation:TitleStyle" xmi:id="_gu_aRtkQEea_Gs1dMaVMnw"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_gu_aR9kQEea_Gs1dMaVMnw"/>
+      </children>
+      <children xmi:type="notation:DecorationNode" xmi:id="_j00iwNkQEea_Gs1dMaVMnw" type="StereotypeLabel">
+        <styles xmi:type="notation:StringValueStyle" xmi:id="_j00iwdkQEea_Gs1dMaVMnw" name="stereotype" stringValue="UMLRealTime::Capsule"/>
+        <element xmi:type="uml:Stereotype" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_hcMIwEhNEeO0lv5O1DTHOQ"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_j00iwtkQEea_Gs1dMaVMnw"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_j01J0NkQEea_Gs1dMaVMnw" type="StereotypeBrace">
+        <styles xmi:type="notation:TitleStyle" xmi:id="_j01J0dkQEea_Gs1dMaVMnw"/>
+        <styles xmi:type="notation:StringValueStyle" xmi:id="_j01J0tkQEea_Gs1dMaVMnw" name="stereotype" stringValue="UMLRealTime::Capsule"/>
+        <element xmi:type="uml:Stereotype" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_hcMIwEhNEeO0lv5O1DTHOQ"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_j01J09kQEea_Gs1dMaVMnw"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_j02X8NkQEea_Gs1dMaVMnw" type="compartment_shape_display">
+        <styles xmi:type="notation:TitleStyle" xmi:id="_j02X8dkQEea_Gs1dMaVMnw"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_j02X8tkQEea_Gs1dMaVMnw"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_j04NJNkQEea_Gs1dMaVMnw" type="StereotypeCompartment">
+        <styles xmi:type="notation:TitleStyle" xmi:id="_j04NJdkQEea_Gs1dMaVMnw"/>
+        <styles xmi:type="notation:StringValueStyle" xmi:id="_j04NJtkQEea_Gs1dMaVMnw" name="stereotype" stringValue="UMLRealTime::Capsule"/>
+        <element xmi:type="uml:Stereotype" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_hcMIwEhNEeO0lv5O1DTHOQ"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_j04NJ9kQEea_Gs1dMaVMnw"/>
+      </children>
+      <children xmi:type="notation:Shape" xmi:id="_k5g58NkQEea_Gs1dMaVMnw" type="Port_Shape">
+        <children xmi:type="notation:DecorationNode" xmi:id="_k5g58tkQEea_Gs1dMaVMnw" type="Port_NameLabel">
+          <layoutConstraint xmi:type="notation:Location" xmi:id="_k5g589kQEea_Gs1dMaVMnw" x="25" y="3"/>
+        </children>
+        <children xmi:type="notation:DecorationNode" xmi:id="_k5g59NkQEea_Gs1dMaVMnw" type="Port_StereotypeLabel">
+          <layoutConstraint xmi:type="notation:Location" xmi:id="_k5g59dkQEea_Gs1dMaVMnw" x="25" y="-10"/>
+        </children>
+        <element xmi:type="uml:Port" href="SymbolicReplication3.uml#_ka5rUNkQEea_Gs1dMaVMnw"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k5g58dkQEea_Gs1dMaVMnw" x="492" y="128" width="16" height="16"/>
+      </children>
+      <element xmi:type="uml:Class" href="SymbolicReplication3.uml#_gutGYNkQEea_Gs1dMaVMnw"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_gu_aQdkQEea_Gs1dMaVMnw" x="40" y="40" width="500" height="250"/>
+    </children>
+    <children xmi:type="notation:Shape" xmi:id="_j02_ANkQEea_Gs1dMaVMnw" type="StereotypeComment">
+      <styles xmi:type="notation:TitleStyle" xmi:id="_j02_AdkQEea_Gs1dMaVMnw"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_j02_A9kQEea_Gs1dMaVMnw" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Class" href="SymbolicReplication3.uml#_gutGYNkQEea_Gs1dMaVMnw"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_j02_AtkQEea_Gs1dMaVMnw" x="240" y="40"/>
+    </children>
+    <children xmi:type="notation:Shape" xmi:id="_k5o1wNkQEea_Gs1dMaVMnw" type="StereotypeComment">
+      <styles xmi:type="notation:TitleStyle" xmi:id="_k5o1wdkQEea_Gs1dMaVMnw"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_k5o1w9kQEea_Gs1dMaVMnw" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Port" href="SymbolicReplication3.uml#_ka5rUNkQEea_Gs1dMaVMnw"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k5o1wtkQEea_Gs1dMaVMnw" x="692" y="128"/>
+    </children>
+    <styles xmi:type="notation:StringValueStyle" xmi:id="_gu-zMdkQEea_Gs1dMaVMnw" name="diagram_compatibility_version" stringValue="1.2.0"/>
+    <styles xmi:type="notation:DiagramStyle" xmi:id="_gu-zMtkQEea_Gs1dMaVMnw"/>
+    <styles xmi:type="style:PapyrusViewStyle" xmi:id="_gu-zM9kQEea_Gs1dMaVMnw">
+      <owner xmi:type="uml:Class" href="SymbolicReplication3.uml#_gutGYNkQEea_Gs1dMaVMnw"/>
+      <configuration xmi:type="configuration:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/configuration/UMLRT.configuration#_Z79eQHcZEeSnWeKqQOfW2A"/>
+    </styles>
+    <element xmi:type="uml:Class" href="SymbolicReplication3.uml#_gutGYNkQEea_Gs1dMaVMnw"/>
+    <edges xmi:type="notation:Connector" xmi:id="_j03mENkQEea_Gs1dMaVMnw" type="StereotypeCommentLink" source="_gu_aQNkQEea_Gs1dMaVMnw" target="_j02_ANkQEea_Gs1dMaVMnw">
+      <styles xmi:type="notation:FontStyle" xmi:id="_j03mEdkQEea_Gs1dMaVMnw"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_j03mFdkQEea_Gs1dMaVMnw" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Class" href="SymbolicReplication3.uml#_gutGYNkQEea_Gs1dMaVMnw"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_j03mEtkQEea_Gs1dMaVMnw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+      <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_j03mE9kQEea_Gs1dMaVMnw"/>
+      <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_j03mFNkQEea_Gs1dMaVMnw"/>
+    </edges>
+    <edges xmi:type="notation:Connector" xmi:id="_k5o1xNkQEea_Gs1dMaVMnw" type="StereotypeCommentLink" source="_k5g58NkQEea_Gs1dMaVMnw" target="_k5o1wNkQEea_Gs1dMaVMnw">
+      <styles xmi:type="notation:FontStyle" xmi:id="_k5o1xdkQEea_Gs1dMaVMnw"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_k5pc0NkQEea_Gs1dMaVMnw" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Port" href="SymbolicReplication3.uml#_ka5rUNkQEea_Gs1dMaVMnw"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_k5o1xtkQEea_Gs1dMaVMnw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+      <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_k5o1x9kQEea_Gs1dMaVMnw"/>
+      <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_k5o1yNkQEea_Gs1dMaVMnw"/>
+    </edges>
+  </notation:Diagram>
+  <notation:Diagram xmi:id="_h127sNkQEea_Gs1dMaVMnw" type="CompositeStructure" measurementUnit="Pixel">
+    <children xmi:type="notation:Shape" xmi:id="_h13iwNkQEea_Gs1dMaVMnw" type="Class_Shape">
+      <children xmi:type="notation:DecorationNode" xmi:id="_h13iwtkQEea_Gs1dMaVMnw" type="Class_NameLabel"/>
+      <children xmi:type="notation:DecorationNode" xmi:id="_h13iw9kQEea_Gs1dMaVMnw" type="Class_FloatingNameLabel">
+        <layoutConstraint xmi:type="notation:Location" xmi:id="_h13ixNkQEea_Gs1dMaVMnw" y="5"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_h13ixdkQEea_Gs1dMaVMnw" type="Class_StructureCompartment">
+        <styles xmi:type="notation:TitleStyle" xmi:id="_h13ixtkQEea_Gs1dMaVMnw"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_h13ix9kQEea_Gs1dMaVMnw"/>
+      </children>
+      <children xmi:type="notation:DecorationNode" xmi:id="_6X7jUNkQEea_Gs1dMaVMnw" type="StereotypeLabel">
+        <styles xmi:type="notation:StringValueStyle" xmi:id="_6X7jUdkQEea_Gs1dMaVMnw" name="stereotype" stringValue="UMLRealTime::Capsule"/>
+        <element xmi:type="uml:Stereotype" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_hcMIwEhNEeO0lv5O1DTHOQ"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6X7jUtkQEea_Gs1dMaVMnw"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_6X8KYNkQEea_Gs1dMaVMnw" type="StereotypeBrace">
+        <styles xmi:type="notation:TitleStyle" xmi:id="_6X8KYdkQEea_Gs1dMaVMnw"/>
+        <styles xmi:type="notation:StringValueStyle" xmi:id="_6X8KYtkQEea_Gs1dMaVMnw" name="stereotype" stringValue="UMLRealTime::Capsule"/>
+        <element xmi:type="uml:Stereotype" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_hcMIwEhNEeO0lv5O1DTHOQ"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6X8KY9kQEea_Gs1dMaVMnw"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_6X8xcNkQEea_Gs1dMaVMnw" type="compartment_shape_display">
+        <styles xmi:type="notation:TitleStyle" xmi:id="_6X8xcdkQEea_Gs1dMaVMnw"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6X8xctkQEea_Gs1dMaVMnw"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_6X-moNkQEea_Gs1dMaVMnw" type="StereotypeCompartment">
+        <styles xmi:type="notation:TitleStyle" xmi:id="_6X-modkQEea_Gs1dMaVMnw"/>
+        <styles xmi:type="notation:StringValueStyle" xmi:id="_6X-motkQEea_Gs1dMaVMnw" name="stereotype" stringValue="UMLRealTime::Capsule"/>
+        <element xmi:type="uml:Stereotype" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_hcMIwEhNEeO0lv5O1DTHOQ"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6X-mo9kQEea_Gs1dMaVMnw"/>
+      </children>
+      <children xmi:type="notation:Shape" xmi:id="_74O4cNkQEea_Gs1dMaVMnw" type="Port_Shape">
+        <children xmi:type="notation:DecorationNode" xmi:id="_74O4ctkQEea_Gs1dMaVMnw" type="Port_NameLabel">
+          <layoutConstraint xmi:type="notation:Location" xmi:id="_74O4c9kQEea_Gs1dMaVMnw" x="25" y="3"/>
+        </children>
+        <children xmi:type="notation:DecorationNode" xmi:id="_74O4dNkQEea_Gs1dMaVMnw" type="Port_StereotypeLabel">
+          <layoutConstraint xmi:type="notation:Location" xmi:id="_74O4ddkQEea_Gs1dMaVMnw" x="25" y="-10"/>
+        </children>
+        <element xmi:type="uml:Port" href="SymbolicReplication3.uml#_69STINkQEea_Gs1dMaVMnw"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_74O4cdkQEea_Gs1dMaVMnw" x="-8" y="129" width="16" height="16"/>
+      </children>
+      <element xmi:type="uml:Class" href="SymbolicReplication3.uml#_h1kn0NkQEea_Gs1dMaVMnw"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_h13iwdkQEea_Gs1dMaVMnw" x="40" y="40" width="500" height="250"/>
+    </children>
+    <children xmi:type="notation:Shape" xmi:id="_6X9YgNkQEea_Gs1dMaVMnw" type="StereotypeComment">
+      <styles xmi:type="notation:TitleStyle" xmi:id="_6X9YgdkQEea_Gs1dMaVMnw"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_6X9Yg9kQEea_Gs1dMaVMnw" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Class" href="SymbolicReplication3.uml#_h1kn0NkQEea_Gs1dMaVMnw"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6X9YgtkQEea_Gs1dMaVMnw" x="240" y="40"/>
+    </children>
+    <children xmi:type="notation:Shape" xmi:id="_74WNMtkQEea_Gs1dMaVMnw" type="StereotypeComment">
+      <styles xmi:type="notation:TitleStyle" xmi:id="_74WNM9kQEea_Gs1dMaVMnw"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_74W0QNkQEea_Gs1dMaVMnw" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Port" href="SymbolicReplication3.uml#_69STINkQEea_Gs1dMaVMnw"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_74WNNNkQEea_Gs1dMaVMnw" x="192" y="129"/>
+    </children>
+    <styles xmi:type="notation:StringValueStyle" xmi:id="_h127sdkQEea_Gs1dMaVMnw" name="diagram_compatibility_version" stringValue="1.2.0"/>
+    <styles xmi:type="notation:DiagramStyle" xmi:id="_h127stkQEea_Gs1dMaVMnw"/>
+    <styles xmi:type="style:PapyrusViewStyle" xmi:id="_h127s9kQEea_Gs1dMaVMnw">
+      <owner xmi:type="uml:Class" href="SymbolicReplication3.uml#_h1kn0NkQEea_Gs1dMaVMnw"/>
+      <configuration xmi:type="configuration:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/configuration/UMLRT.configuration#_Z79eQHcZEeSnWeKqQOfW2A"/>
+    </styles>
+    <element xmi:type="uml:Class" href="SymbolicReplication3.uml#_h1kn0NkQEea_Gs1dMaVMnw"/>
+    <edges xmi:type="notation:Connector" xmi:id="_6X9YhNkQEea_Gs1dMaVMnw" type="StereotypeCommentLink" source="_h13iwNkQEea_Gs1dMaVMnw" target="_6X9YgNkQEea_Gs1dMaVMnw">
+      <styles xmi:type="notation:FontStyle" xmi:id="_6X9YhdkQEea_Gs1dMaVMnw"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_6X9YidkQEea_Gs1dMaVMnw" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Class" href="SymbolicReplication3.uml#_h1kn0NkQEea_Gs1dMaVMnw"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_6X9YhtkQEea_Gs1dMaVMnw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+      <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6X9Yh9kQEea_Gs1dMaVMnw"/>
+      <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6X9YiNkQEea_Gs1dMaVMnw"/>
+    </edges>
+    <edges xmi:type="notation:Connector" xmi:id="_74W0QdkQEea_Gs1dMaVMnw" type="StereotypeCommentLink" source="_74O4cNkQEea_Gs1dMaVMnw" target="_74WNMtkQEea_Gs1dMaVMnw">
+      <styles xmi:type="notation:FontStyle" xmi:id="_74W0QtkQEea_Gs1dMaVMnw"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_74W0RtkQEea_Gs1dMaVMnw" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Port" href="SymbolicReplication3.uml#_69STINkQEea_Gs1dMaVMnw"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_74W0Q9kQEea_Gs1dMaVMnw" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+      <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_74W0RNkQEea_Gs1dMaVMnw"/>
+      <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_74W0RdkQEea_Gs1dMaVMnw"/>
+    </edges>
+  </notation:Diagram>
+</xmi:XMI>
diff --git a/models/tests/codepattern/structure/SymbolicReplication3/SymbolicReplication3.uml b/models/tests/codepattern/structure/SymbolicReplication3/SymbolicReplication3.uml
new file mode 100644
index 0000000..4ae22ed
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication3/SymbolicReplication3.uml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:UMLRealTime="http://www.eclipse.org/papyrus/umlrt" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+  <uml:Model xmi:id="_atbgcNkQEea_Gs1dMaVMnw" name="SymbolicReplication3">
+    <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_dqa2ANkQEea_Gs1dMaVMnw" source="http://www.eclipse.org/papyrus-rt/language/1.0.0">
+      <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_dqa2AdkQEea_Gs1dMaVMnw" key="language" value="umlrt-cpp"/>
+    </eAnnotations>
+    <packagedElement xmi:type="uml:Class" xmi:id="_eaoyANkQEea_Gs1dMaVMnw" name="Top" isActive="true">
+      <ownedAttribute xmi:type="uml:Property" xmi:id="_gd2m8NkQEea_Gs1dMaVMnw" name="capsule1" visibility="protected" type="_gutGYNkQEea_Gs1dMaVMnw" isOrdered="true" aggregation="composite"/>
+      <ownedAttribute xmi:type="uml:Property" xmi:id="_hnJKQNkQEea_Gs1dMaVMnw" name="capsule2" visibility="protected" type="_h1kn0NkQEea_Gs1dMaVMnw" isOrdered="true" aggregation="composite">
+        <lowerValue xmi:type="uml:OpaqueExpression" xmi:id="_GNEv4NkSEea_Gs1dMaVMnw" name="OpaqueExpression2">
+          <language>C++</language>
+          <body>K*(M-1)/2</body>
+        </lowerValue>
+        <upperValue xmi:type="uml:OpaqueExpression" xmi:id="_GMs8cNkSEea_Gs1dMaVMnw" name="OpaqueExpression1">
+          <language>C++</language>
+          <body>K*(M-1)/2</body>
+        </upperValue>
+      </ownedAttribute>
+      <ownedAttribute xmi:type="uml:Property" xmi:id="_REAdMNkSEea_Gs1dMaVMnw" name="K">
+        <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+        <defaultValue xmi:type="uml:LiteralInteger" xmi:id="_fWwKENkSEea_Gs1dMaVMnw" value="2"/>
+      </ownedAttribute>
+      <ownedAttribute xmi:type="uml:Property" xmi:id="_PwmUkNkSEea_Gs1dMaVMnw" name="M">
+        <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+        <defaultValue xmi:type="uml:LiteralInteger" xmi:id="_cjJaANkSEea_Gs1dMaVMnw" value="4"/>
+      </ownedAttribute>
+      <ownedConnector xmi:type="uml:Connector" xmi:id="_Lhw8oNkSEea_Gs1dMaVMnw" name="RTConnector1">
+        <end xmi:type="uml:ConnectorEnd" xmi:id="_LiIwENkSEea_Gs1dMaVMnw" partWithPort="_gd2m8NkQEea_Gs1dMaVMnw" role="_ka5rUNkQEea_Gs1dMaVMnw"/>
+        <end xmi:type="uml:ConnectorEnd" xmi:id="_LiJ-MNkSEea_Gs1dMaVMnw" partWithPort="_hnJKQNkQEea_Gs1dMaVMnw" role="_69STINkQEea_Gs1dMaVMnw"/>
+      </ownedConnector>
+    </packagedElement>
+    <packagedElement xmi:type="uml:Class" xmi:id="_gutGYNkQEea_Gs1dMaVMnw" name="Capsule1" isActive="true">
+      <ownedAttribute xmi:type="uml:Port" xmi:id="_ka5rUNkQEea_Gs1dMaVMnw" name="protocol1" visibility="public" type="_krqrMNkQEea_Gs1dMaVMnw" isOrdered="true" aggregation="composite" isBehavior="true" isService="true">
+        <lowerValue xmi:type="uml:OpaqueExpression" xmi:id="_2Q-VANkQEea_Gs1dMaVMnw" name="OpaqueExpression2">
+          <language>C++</language>
+          <body>(N+1)/2</body>
+        </lowerValue>
+        <upperValue xmi:type="uml:OpaqueExpression" xmi:id="_2QnvsNkQEea_Gs1dMaVMnw" name="OpaqueExpression1">
+          <language>C++</language>
+          <body>(N+1)/2</body>
+        </upperValue>
+      </ownedAttribute>
+      <ownedAttribute xmi:type="uml:Property" xmi:id="_OYrfYNkSEea_Gs1dMaVMnw" name="N">
+        <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+        <defaultValue xmi:type="uml:LiteralInteger" xmi:id="_Z-Li4NkSEea_Gs1dMaVMnw" value="5"/>
+      </ownedAttribute>
+    </packagedElement>
+    <packagedElement xmi:type="uml:Class" xmi:id="_h1kn0NkQEea_Gs1dMaVMnw" name="Capsule2" isActive="true">
+      <ownedAttribute xmi:type="uml:Port" xmi:id="_69STINkQEea_Gs1dMaVMnw" name="protocol1" visibility="public" type="_krqrMNkQEea_Gs1dMaVMnw" isOrdered="true" aggregation="composite" isBehavior="true" isConjugated="true" isService="true"/>
+    </packagedElement>
+    <packagedElement xmi:type="uml:Package" xmi:id="_kr4toNkQEea_Gs1dMaVMnw" name="Protocol1">
+      <packagedElement xmi:type="uml:Collaboration" xmi:id="_krqrMNkQEea_Gs1dMaVMnw" name="Protocol1">
+        <interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_ksApcNkQEea_Gs1dMaVMnw" client="_krqrMNkQEea_Gs1dMaVMnw" supplier="_kr8_ENkQEea_Gs1dMaVMnw" contract="_kr8_ENkQEea_Gs1dMaVMnw"/>
+        <interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_ksJMUNkQEea_Gs1dMaVMnw" client="_krqrMNkQEea_Gs1dMaVMnw" supplier="_ksGJANkQEea_Gs1dMaVMnw" contract="_ksGJANkQEea_Gs1dMaVMnw"/>
+      </packagedElement>
+      <packagedElement xmi:type="uml:Interface" xmi:id="_kr8_ENkQEea_Gs1dMaVMnw" name="Protocol1"/>
+      <packagedElement xmi:type="uml:Interface" xmi:id="_ksCeoNkQEea_Gs1dMaVMnw" name="Protocol1~"/>
+      <packagedElement xmi:type="uml:Usage" xmi:id="_ksE64NkQEea_Gs1dMaVMnw" client="_krqrMNkQEea_Gs1dMaVMnw" supplier="_ksCeoNkQEea_Gs1dMaVMnw"/>
+      <packagedElement xmi:type="uml:AnyReceiveEvent" xmi:id="_ksFh8NkQEea_Gs1dMaVMnw" name="*"/>
+      <packagedElement xmi:type="uml:Interface" xmi:id="_ksGJANkQEea_Gs1dMaVMnw" name="Protocol1IO"/>
+      <packagedElement xmi:type="uml:Usage" xmi:id="_ksJzYNkQEea_Gs1dMaVMnw" client="_krqrMNkQEea_Gs1dMaVMnw" supplier="_ksGJANkQEea_Gs1dMaVMnw"/>
+    </packagedElement>
+    <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_at4MYNkQEea_Gs1dMaVMnw">
+      <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_at4MYdkQEea_Gs1dMaVMnw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+        <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/umlrt#/"/>
+      </eAnnotations>
+      <appliedProfile xmi:type="uml:Profile" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_1h74oEeVEeO0lv5O1DTHOQ"/>
+    </profileApplication>
+    <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_dryH8NkQEea_Gs1dMaVMnw">
+      <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_dryH8dkQEea_Gs1dMaVMnw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+        <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/umlrt/cppproperties#/"/>
+      </eAnnotations>
+      <appliedProfile xmi:type="uml:Profile" href="pathmap://UMLRT_CPP/RTCppProperties.profile.uml#_vl5LALs8EeSTjNEQkASznQ"/>
+    </profileApplication>
+  </uml:Model>
+  <UMLRealTime:Capsule xmi:id="_ebDBsNkQEea_Gs1dMaVMnw" base_Class="_eaoyANkQEea_Gs1dMaVMnw"/>
+  <UMLRealTime:CapsulePart xmi:id="_gd5qQNkQEea_Gs1dMaVMnw" base_Property="_gd2m8NkQEea_Gs1dMaVMnw"/>
+  <UMLRealTime:Capsule xmi:id="_gvABUNkQEea_Gs1dMaVMnw" base_Class="_gutGYNkQEea_Gs1dMaVMnw"/>
+  <UMLRealTime:CapsulePart xmi:id="_hnMNkNkQEea_Gs1dMaVMnw" base_Property="_hnJKQNkQEea_Gs1dMaVMnw"/>
+  <UMLRealTime:Capsule xmi:id="_h14J0NkQEea_Gs1dMaVMnw" base_Class="_h1kn0NkQEea_Gs1dMaVMnw"/>
+  <UMLRealTime:RTPort xmi:id="_kbGfoNkQEea_Gs1dMaVMnw" isPublish="false" isWired="true" base_Port="_ka5rUNkQEea_Gs1dMaVMnw"/>
+  <UMLRealTime:ProtocolContainer xmi:id="_kr7J4NkQEea_Gs1dMaVMnw" base_Package="_kr4toNkQEea_Gs1dMaVMnw"/>
+  <UMLRealTime:RTMessageSet xmi:id="_kr_bUNkQEea_Gs1dMaVMnw" base_Interface="_kr8_ENkQEea_Gs1dMaVMnw"/>
+  <UMLRealTime:RTMessageSet xmi:id="_ksDswNkQEea_Gs1dMaVMnw" base_Interface="_ksCeoNkQEea_Gs1dMaVMnw" rtMsgKind="out"/>
+  <UMLRealTime:RTMessageSet xmi:id="_ksH-MNkQEea_Gs1dMaVMnw" base_Interface="_ksGJANkQEea_Gs1dMaVMnw" rtMsgKind="inOut"/>
+  <UMLRealTime:Protocol xmi:id="_ksKacNkQEea_Gs1dMaVMnw" base_Collaboration="_krqrMNkQEea_Gs1dMaVMnw"/>
+  <UMLRealTime:RTPort xmi:id="_69VWcNkQEea_Gs1dMaVMnw" isPublish="false" isWired="true" base_Port="_69STINkQEea_Gs1dMaVMnw"/>
+  <UMLRealTime:RTConnector xmi:id="_LiPdwNkSEea_Gs1dMaVMnw" base_Connector="_Lhw8oNkSEea_Gs1dMaVMnw"/>
+</xmi:XMI>
diff --git a/models/tests/codepattern/structure/SymbolicReplication3/expected_src/CMakeLists.txt b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/CMakeLists.txt
new file mode 100644
index 0000000..6e05f26
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/CMakeLists.txt
@@ -0,0 +1,36 @@
+# Generated 2017-01-12 18:26:12
+
+cmake_minimum_required(VERSION 2.8.7)
+set(TARGET TopMain)
+project(${TARGET})
+
+# require location of supporting RTS
+if (NOT UMLRTS_ROOT)
+  if (DEFINED ENV{UMLRTS_ROOT})
+    set(UMLRTS_ROOT $ENV{UMLRTS_ROOT})
+  else ()
+    set(UMLRTS_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/umlrt.rts)
+  endif ()
+endif ()
+
+# setup primary envars - provides tooling config
+include(${UMLRTS_ROOT}/build/buildenv.cmake)
+
+# model sources
+set(SRCS TopMain.cc Protocol1.cc Capsule1.cc Capsule2.cc Top.cc TopControllers.cc )
+
+# specify target
+add_executable(${TARGET} ${SRCS})
+
+# setup lib dependency support after defining TARGET
+include(${UMLRTS_ROOT}/build/rtslib.cmake)
+
+# compiler parameters
+set_target_properties(${TARGET} PROPERTIES COMPILE_OPTIONS "${COPTS}")
+set_target_properties(${TARGET} PROPERTIES COMPILE_DEFINITIONS "${CDEFS}")
+include_directories(${INCS})
+
+# linker parameters
+set_target_properties(${TARGET} PROPERTIES CMAKE_EXE_LINKER_FLAGS "${LOPTS}")
+target_link_libraries(${TARGET} ${LIBS})
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Capsule1.cc b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Capsule1.cc
new file mode 100644
index 0000000..197639b
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Capsule1.cc
@@ -0,0 +1,91 @@
+
+#include "Capsule1.hh"
+
+#include <cstddef>
+#include "umlrtcapsuleclass.hh"
+#include "umlrtcommsportrole.hh"
+#include "umlrtframeservice.hh"
+#include "umlrtslot.hh"
+class UMLRTRtsInterface;
+struct UMLRTCommsPort;
+
+Capsule_Capsule1::Capsule_Capsule1( const UMLRTCapsuleClass * cd, UMLRTSlot * st, const UMLRTCommsPort * * border, const UMLRTCommsPort * * internal, bool isStat )
+: UMLRTCapsule( NULL, cd, st, border, internal, isStat )
+, protocol1( borderPorts[borderport_protocol1] )
+, N( 5 )
+{
+}
+
+
+
+
+
+void Capsule_Capsule1::bindPort( bool isBorder, int portId, int index )
+{
+    if( isBorder )
+        switch( portId )
+        {
+        case borderport_protocol1:
+            UMLRTFrameService::sendBoundUnbound( borderPorts, borderport_protocol1, index, true );
+            break;
+        }
+}
+
+void Capsule_Capsule1::unbindPort( bool isBorder, int portId, int index )
+{
+    if( isBorder )
+        switch( portId )
+        {
+        case borderport_protocol1:
+            UMLRTFrameService::sendBoundUnbound( borderPorts, borderport_protocol1, index, false );
+            UMLRTFrameService::disconnectPort( borderPorts[borderport_protocol1], index );
+            break;
+        }
+}
+
+
+void Capsule_Capsule1::initialize( const UMLRTMessage & msg )
+{
+}
+
+void Capsule_Capsule1::inject( const UMLRTMessage & msg )
+{
+}
+
+
+static const UMLRTCommsPortRole portroles_border[] = 
+{
+    {
+        Capsule_Capsule1::port_protocol1,
+        "Protocol1",
+        "protocol1",
+        "",
+        3,
+        true,
+        false,
+        false,
+        false,
+        false,
+        false,
+        true
+    }
+};
+
+static void instantiate_Capsule1( const UMLRTRtsInterface * rts, UMLRTSlot * slot, const UMLRTCommsPort * * borderPorts )
+{
+    slot->capsule = new Capsule_Capsule1( &Capsule1, slot, borderPorts, NULL, false );
+}
+
+const UMLRTCapsuleClass Capsule1 = 
+{
+    "Capsule1",
+    NULL,
+    instantiate_Capsule1,
+    0,
+    NULL,
+    1,
+    portroles_border,
+    0,
+    NULL
+};
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Capsule1.hh b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Capsule1.hh
new file mode 100644
index 0000000..1841ca0
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Capsule1.hh
@@ -0,0 +1,39 @@
+
+#ifndef CAPSULE1_HH
+#define CAPSULE1_HH
+
+#include "Protocol1.hh"
+#include "umlrtcapsule.hh"
+#include "umlrtcapsuleclass.hh"
+#include "umlrtmessage.hh"
+struct UMLRTCommsPort;
+struct UMLRTSlot;
+
+class Capsule_Capsule1 : public UMLRTCapsule
+{
+public:
+    Capsule_Capsule1( const UMLRTCapsuleClass * cd, UMLRTSlot * st, const UMLRTCommsPort * * border, const UMLRTCommsPort * * internal, bool isStat );
+protected:
+    Protocol1::Base protocol1;
+public:
+    enum BorderPortId
+    {
+        borderport_protocol1
+    };
+    enum PartId
+    {
+    };
+    enum PortId
+    {
+        port_protocol1
+    };
+    virtual void bindPort( bool isBorder, int portId, int index );
+    virtual void unbindPort( bool isBorder, int portId, int index );
+    int N;
+    virtual void initialize( const UMLRTMessage & msg );
+    virtual void inject( const UMLRTMessage & msg );
+};
+extern const UMLRTCapsuleClass Capsule1;
+
+#endif
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Capsule2.cc b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Capsule2.cc
new file mode 100644
index 0000000..20fbeb9
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Capsule2.cc
@@ -0,0 +1,89 @@
+
+#include "Capsule2.hh"
+
+#include <cstddef>
+#include "umlrtcapsuleclass.hh"
+#include "umlrtcommsportrole.hh"
+#include "umlrtframeservice.hh"
+#include "umlrtslot.hh"
+class UMLRTRtsInterface;
+struct UMLRTCommsPort;
+
+Capsule_Capsule2::Capsule_Capsule2( const UMLRTCapsuleClass * cd, UMLRTSlot * st, const UMLRTCommsPort * * border, const UMLRTCommsPort * * internal, bool isStat )
+: UMLRTCapsule( NULL, cd, st, border, internal, isStat )
+, protocol1( borderPorts[borderport_protocol1] )
+{
+}
+
+
+
+
+
+void Capsule_Capsule2::bindPort( bool isBorder, int portId, int index )
+{
+    if( isBorder )
+        switch( portId )
+        {
+        case borderport_protocol1:
+            UMLRTFrameService::sendBoundUnbound( borderPorts, borderport_protocol1, index, true );
+            break;
+        }
+}
+
+void Capsule_Capsule2::unbindPort( bool isBorder, int portId, int index )
+{
+    if( isBorder )
+        switch( portId )
+        {
+        case borderport_protocol1:
+            UMLRTFrameService::sendBoundUnbound( borderPorts, borderport_protocol1, index, false );
+            UMLRTFrameService::disconnectPort( borderPorts[borderport_protocol1], index );
+            break;
+        }
+}
+
+void Capsule_Capsule2::initialize( const UMLRTMessage & msg )
+{
+}
+
+void Capsule_Capsule2::inject( const UMLRTMessage & msg )
+{
+}
+
+
+static const UMLRTCommsPortRole portroles_border[] = 
+{
+    {
+        Capsule_Capsule2::port_protocol1,
+        "Protocol1",
+        "protocol1",
+        "",
+        1,
+        true,
+        true,
+        false,
+        false,
+        false,
+        false,
+        true
+    }
+};
+
+static void instantiate_Capsule2( const UMLRTRtsInterface * rts, UMLRTSlot * slot, const UMLRTCommsPort * * borderPorts )
+{
+    slot->capsule = new Capsule_Capsule2( &Capsule2, slot, borderPorts, NULL, false );
+}
+
+const UMLRTCapsuleClass Capsule2 = 
+{
+    "Capsule2",
+    NULL,
+    instantiate_Capsule2,
+    0,
+    NULL,
+    1,
+    portroles_border,
+    0,
+    NULL
+};
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Capsule2.hh b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Capsule2.hh
new file mode 100644
index 0000000..2d8695a
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Capsule2.hh
@@ -0,0 +1,38 @@
+
+#ifndef CAPSULE2_HH
+#define CAPSULE2_HH
+
+#include "Protocol1.hh"
+#include "umlrtcapsule.hh"
+#include "umlrtcapsuleclass.hh"
+#include "umlrtmessage.hh"
+struct UMLRTCommsPort;
+struct UMLRTSlot;
+
+class Capsule_Capsule2 : public UMLRTCapsule
+{
+public:
+    Capsule_Capsule2( const UMLRTCapsuleClass * cd, UMLRTSlot * st, const UMLRTCommsPort * * border, const UMLRTCommsPort * * internal, bool isStat );
+protected:
+    Protocol1::Conj protocol1;
+public:
+    enum BorderPortId
+    {
+        borderport_protocol1
+    };
+    enum PartId
+    {
+    };
+    enum PortId
+    {
+        port_protocol1
+    };
+    virtual void bindPort( bool isBorder, int portId, int index );
+    virtual void unbindPort( bool isBorder, int portId, int index );
+    virtual void initialize( const UMLRTMessage & msg );
+    virtual void inject( const UMLRTMessage & msg );
+};
+extern const UMLRTCapsuleClass Capsule2;
+
+#endif
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Makefile b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Makefile
new file mode 100644
index 0000000..0bcbd22
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Makefile
@@ -0,0 +1,11 @@
+##################################################
+# Default makefile
+# Redirect make to target makefile
+##################################################
+
+all:
+	make -f MakefileTop.mk all
+clean:
+	make -f MakefileTop.mk clean
+.PHONY: 
+	make -f MakefileTop.mk all clean
diff --git a/models/tests/codepattern/structure/SymbolicReplication3/expected_src/MakefileTop.mk b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/MakefileTop.mk
new file mode 100644
index 0000000..5cbedfb
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/MakefileTop.mk
@@ -0,0 +1,49 @@
+# set default value for TARGETOS if is it not defined
+ifeq ($(TARGETOS), )
+$(warning warning: TARGETOS not defined. Choosing linux)
+TARGETOS=linux
+endif
+
+# set default value for BUILDTOOLS if is it not defined
+ifeq ($(BUILDTOOLS), )
+$(warning warning: BUILDTOOLS not defined. Choosing x86-gcc-4.6.3)
+BUILDTOOLS=x86-gcc-4.6.3
+endif
+
+# Location of RTS root.
+UMLRTS_ROOT ?= ./umlrt.rts
+
+CONFIG=$(TARGETOS).$(BUILDTOOLS)
+
+# Destination directory for the RTS services library.
+LIBDEST=$(UMLRTS_ROOT)/lib/$(CONFIG)
+
+include $(UMLRTS_ROOT)/build/host/host.mk
+include $(UMLRTS_ROOT)/build/buildtools/$(BUILDTOOLS)/buildtools.mk
+
+LD_PATHS=$(LIBDEST)
+CC_INCLUDES+=$(UMLRTS_ROOT)/include
+
+CC_DEFINES:=$(foreach d, $(CC_DEFINES), $(CC_DEF)$d)
+CC_INCLUDES:=$(foreach i, $(CC_INCLUDES), $(CC_INC)$i)
+LD_LIBS:=$(foreach i, $(LD_LIBS), $(LD_LIB)$i)
+LD_PATHS:=$(foreach i, $(LD_PATHS), $(LD_LIBPATH)$i)
+
+SRCS = TopMain.cc Protocol1.cc Capsule1.cc Capsule2.cc Top.cc TopControllers.cc 
+OBJS = $(subst $(CC_EXT),$(OBJ_EXT),$(SRCS))
+
+MAIN = TopMain$(EXE_EXT)
+
+all: $(MAIN)
+
+$(MAIN): $(OBJS) $(UMLRTS_ROOT)/lib/$(CONFIG)/$(LIB_PRFX)rts$(LIB_EXT)
+	$(LD) $(LD_FLAGS) $(OBJS) $(LD_PATHS) $(LD_LIBS) $(LD_OUT)$@
+
+%$(OBJ_EXT) : %$(CC_EXT)
+	$(CC) $< $(CC_FLAGS) $(CC_DEFINES) $(CC_INCLUDES) $(CC_OUT)$@
+
+clean :
+	@echo $(RM) main$(EXE_EXT) *$(OBJ_EXT) *$(DEP_EXT) $(DBG_FILES)
+	@$(RM) main$(EXE_EXT) *$(OBJ_EXT) *$(DEP_EXT) $(DBG_FILES)
+
+.PHONY: all clean
diff --git a/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Protocol1.cc b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Protocol1.cc
new file mode 100644
index 0000000..08595db
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Protocol1.cc
@@ -0,0 +1,16 @@
+
+#include "Protocol1.hh"
+
+struct UMLRTCommsPort;
+
+Protocol1::Base::Base( const UMLRTCommsPort * & srcPort )
+: UMLRTProtocol( srcPort )
+{
+}
+
+Protocol1::Conj::Conj( const UMLRTCommsPort * & srcPort )
+: UMLRTProtocol( srcPort )
+{
+}
+
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Protocol1.hh b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Protocol1.hh
new file mode 100644
index 0000000..f917c8f
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Protocol1.hh
@@ -0,0 +1,23 @@
+
+#ifndef PROTOCOL1_HH
+#define PROTOCOL1_HH
+
+#include "umlrtprotocol.hh"
+struct UMLRTCommsPort;
+
+namespace Protocol1
+{
+    class Base : public UMLRTProtocol
+    {
+    public:
+        Base( const UMLRTCommsPort * & srcPort );
+    };
+    class Conj : public UMLRTProtocol
+    {
+    public:
+        Conj( const UMLRTCommsPort * & srcPort );
+    };
+};
+
+#endif
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Top-connections.log b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Top-connections.log
new file mode 100644
index 0000000..2934afc
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Top-connections.log
@@ -0,0 +1,4 @@
+Top.RTConnector1
+    Top.capsule1#protocol1.far[0] <-> Top.capsule2[0]#protocol1.far[0]
+    Top.capsule1#protocol1.far[1] <-> Top.capsule2[1]#protocol1.far[0]
+    Top.capsule1#protocol1.far[2] <-> Top.capsule2[2]#protocol1.far[0]
diff --git a/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Top.cc b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Top.cc
new file mode 100644
index 0000000..25b26e0
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Top.cc
@@ -0,0 +1,90 @@
+
+#include "Top.hh"
+
+#include "Capsule1.hh"
+#include "Capsule2.hh"
+#include "umlrtcapsuleclass.hh"
+#include "umlrtcapsulepart.hh"
+#include "umlrtslot.hh"
+#include <cstddef>
+#include "umlrtcapsulerole.hh"
+#include "umlrtcommsport.hh"
+#include "umlrtframeservice.hh"
+class UMLRTRtsInterface;
+
+Capsule_Top::Capsule_Top( const UMLRTCapsuleClass * cd, UMLRTSlot * st, const UMLRTCommsPort * * border, const UMLRTCommsPort * * internal, bool isStat )
+: UMLRTCapsule( NULL, cd, st, border, internal, isStat )
+, capsule1( &slot->parts[part_capsule1] )
+, capsule2( &slot->parts[part_capsule2] )
+, K( 2 )
+, M( 4 )
+{
+}
+
+
+
+
+void Capsule_Top::bindPort( bool isBorder, int portId, int index )
+{
+}
+
+void Capsule_Top::unbindPort( bool isBorder, int portId, int index )
+{
+}
+
+
+
+void Capsule_Top::initialize( const UMLRTMessage & msg )
+{
+}
+
+void Capsule_Top::inject( const UMLRTMessage & msg )
+{
+}
+
+
+static const UMLRTCapsuleRole roles[] = 
+{
+    {
+        "capsule1",
+        &Capsule1,
+        1,
+        1,
+        false,
+        false
+    },
+    {
+        "capsule2",
+        &Capsule2,
+        3,
+        3,
+        false,
+        false
+    }
+};
+
+static void instantiate_Top( const UMLRTRtsInterface * rts, UMLRTSlot * slot, const UMLRTCommsPort * * borderPorts )
+{
+    UMLRTFrameService::connectPorts( &slot->parts[Capsule_Top::part_capsule1].slots[0]->ports[Capsule_Capsule1::borderport_protocol1], 0, &slot->parts[Capsule_Top::part_capsule2].slots[0]->ports[Capsule_Capsule2::borderport_protocol1], 0 );
+    UMLRTFrameService::connectPorts( &slot->parts[Capsule_Top::part_capsule1].slots[0]->ports[Capsule_Capsule1::borderport_protocol1], 1, &slot->parts[Capsule_Top::part_capsule2].slots[1]->ports[Capsule_Capsule2::borderport_protocol1], 0 );
+    UMLRTFrameService::connectPorts( &slot->parts[Capsule_Top::part_capsule1].slots[0]->ports[Capsule_Capsule1::borderport_protocol1], 2, &slot->parts[Capsule_Top::part_capsule2].slots[2]->ports[Capsule_Capsule2::borderport_protocol1], 0 );
+    Capsule1.instantiate( NULL, slot->parts[Capsule_Top::part_capsule1].slots[0], UMLRTFrameService::createBorderPorts( slot->parts[Capsule_Top::part_capsule1].slots[0], Capsule1.numPortRolesBorder ) );
+    Capsule2.instantiate( NULL, slot->parts[Capsule_Top::part_capsule2].slots[0], UMLRTFrameService::createBorderPorts( slot->parts[Capsule_Top::part_capsule2].slots[0], Capsule2.numPortRolesBorder ) );
+    Capsule2.instantiate( NULL, slot->parts[Capsule_Top::part_capsule2].slots[1], UMLRTFrameService::createBorderPorts( slot->parts[Capsule_Top::part_capsule2].slots[1], Capsule2.numPortRolesBorder ) );
+    Capsule2.instantiate( NULL, slot->parts[Capsule_Top::part_capsule2].slots[2], UMLRTFrameService::createBorderPorts( slot->parts[Capsule_Top::part_capsule2].slots[2], Capsule2.numPortRolesBorder ) );
+    slot->capsule = new Capsule_Top( &Top, slot, borderPorts, NULL, false );
+}
+
+const UMLRTCapsuleClass Top = 
+{
+    "Top",
+    NULL,
+    instantiate_Top,
+    2,
+    roles,
+    0,
+    NULL,
+    0,
+    NULL
+};
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Top.hh b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Top.hh
new file mode 100644
index 0000000..d5f2676
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/Top.hh
@@ -0,0 +1,35 @@
+
+#ifndef TOP_HH
+#define TOP_HH
+
+#include "umlrtcapsule.hh"
+#include "umlrtcapsuleclass.hh"
+#include "umlrtmessage.hh"
+struct UMLRTCapsulePart;
+struct UMLRTCommsPort;
+struct UMLRTSlot;
+
+class Capsule_Top : public UMLRTCapsule
+{
+public:
+    Capsule_Top( const UMLRTCapsuleClass * cd, UMLRTSlot * st, const UMLRTCommsPort * * border, const UMLRTCommsPort * * internal, bool isStat );
+    enum PartId
+    {
+        part_capsule1,
+        part_capsule2
+    };
+protected:
+    const UMLRTCapsulePart * const capsule1;
+    const UMLRTCapsulePart * const capsule2;
+public:
+    virtual void bindPort( bool isBorder, int portId, int index );
+    virtual void unbindPort( bool isBorder, int portId, int index );
+    int K;
+    int M;
+    virtual void initialize( const UMLRTMessage & msg );
+    virtual void inject( const UMLRTMessage & msg );
+};
+extern const UMLRTCapsuleClass Top;
+
+#endif
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication3/expected_src/TopControllers.cc b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/TopControllers.cc
new file mode 100644
index 0000000..a242eba
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/TopControllers.cc
@@ -0,0 +1,297 @@
+
+#include "TopControllers.hh"
+
+#include "Capsule1.hh"
+#include "Capsule2.hh"
+#include "Top.hh"
+#include "umlrtcapsuleclass.hh"
+#include "umlrtcapsulepart.hh"
+#include "umlrtcommsport.hh"
+#include "umlrtcommsportfarend.hh"
+#include "umlrtcontroller.hh"
+#include "umlrtslot.hh"
+#include <cstddef>
+
+
+static UMLRTController DefaultController_( "DefaultController" );
+
+UMLRTController * DefaultController = &DefaultController_;
+
+static Capsule_Top top( &Top, &Top_slots[InstId_Top], NULL, NULL, true );
+
+static UMLRTSlot * slots_Top[] = 
+{
+    &Top_slots[InstId_Top_capsule1],
+    &Top_slots[InstId_Top_capsule2_0],
+    &Top_slots[InstId_Top_capsule2_1],
+    &Top_slots[InstId_Top_capsule2_2]
+};
+
+static UMLRTCapsulePart parts_Top[] = 
+{
+    {
+        &Top,
+        Capsule_Top::part_capsule1,
+        1,
+        &slots_Top[0]
+    },
+    {
+        &Top,
+        Capsule_Top::part_capsule2,
+        3,
+        &slots_Top[1]
+    }
+};
+
+static UMLRTCommsPortFarEnd borderfarEndList_Top_capsule1[] = 
+{
+    {
+        0,
+        &borderports_Top_capsule2_0[Capsule_Capsule2::borderport_protocol1]
+    },
+    {
+        0,
+        &borderports_Top_capsule2_1[Capsule_Capsule2::borderport_protocol1]
+    },
+    {
+        0,
+        &borderports_Top_capsule2_2[Capsule_Capsule2::borderport_protocol1]
+    }
+};
+
+UMLRTCommsPort borderports_Top_capsule1[] = 
+{
+    {
+        &Capsule1,
+        Capsule_Capsule1::borderport_protocol1,
+        &Top_slots[InstId_Top_capsule1],
+        3,
+        borderfarEndList_Top_capsule1,
+        NULL,
+        NULL,
+        "",
+        true,
+        true,
+        true,
+        false,
+        false,
+        false,
+        false,
+        false,
+        false,
+        false,
+        true
+    }
+};
+
+static const UMLRTCommsPort * borderports_Top_capsule1_ptrs[] = 
+{
+    &borderports_Top_capsule1[0]
+};
+
+static Capsule_Capsule1 top_capsule1( &Capsule1, &Top_slots[InstId_Top_capsule1], borderports_Top_capsule1_ptrs, NULL, true );
+
+static UMLRTCommsPortFarEnd borderfarEndList_Top_capsule2_0[] = 
+{
+    {
+        0,
+        &borderports_Top_capsule1[Capsule_Capsule1::borderport_protocol1]
+    }
+};
+
+UMLRTCommsPort borderports_Top_capsule2_0[] = 
+{
+    {
+        &Capsule2,
+        Capsule_Capsule2::borderport_protocol1,
+        &Top_slots[InstId_Top_capsule2_0],
+        1,
+        borderfarEndList_Top_capsule2_0,
+        NULL,
+        NULL,
+        "",
+        true,
+        true,
+        true,
+        false,
+        false,
+        false,
+        false,
+        false,
+        false,
+        false,
+        true
+    }
+};
+
+static const UMLRTCommsPort * borderports_Top_capsule2_0_ptrs[] = 
+{
+    &borderports_Top_capsule2_0[0]
+};
+
+static Capsule_Capsule2 top_capsule2_0( &Capsule2, &Top_slots[InstId_Top_capsule2_0], borderports_Top_capsule2_0_ptrs, NULL, true );
+
+static UMLRTCommsPortFarEnd borderfarEndList_Top_capsule2_1[] = 
+{
+    {
+        1,
+        &borderports_Top_capsule1[Capsule_Capsule1::borderport_protocol1]
+    }
+};
+
+UMLRTCommsPort borderports_Top_capsule2_1[] = 
+{
+    {
+        &Capsule2,
+        Capsule_Capsule2::borderport_protocol1,
+        &Top_slots[InstId_Top_capsule2_1],
+        1,
+        borderfarEndList_Top_capsule2_1,
+        NULL,
+        NULL,
+        "",
+        true,
+        true,
+        true,
+        false,
+        false,
+        false,
+        false,
+        false,
+        false,
+        false,
+        true
+    }
+};
+
+static const UMLRTCommsPort * borderports_Top_capsule2_1_ptrs[] = 
+{
+    &borderports_Top_capsule2_1[0]
+};
+
+static Capsule_Capsule2 top_capsule2_1( &Capsule2, &Top_slots[InstId_Top_capsule2_1], borderports_Top_capsule2_1_ptrs, NULL, true );
+
+static UMLRTCommsPortFarEnd borderfarEndList_Top_capsule2_2[] = 
+{
+    {
+        2,
+        &borderports_Top_capsule1[Capsule_Capsule1::borderport_protocol1]
+    }
+};
+
+UMLRTCommsPort borderports_Top_capsule2_2[] = 
+{
+    {
+        &Capsule2,
+        Capsule_Capsule2::borderport_protocol1,
+        &Top_slots[InstId_Top_capsule2_2],
+        1,
+        borderfarEndList_Top_capsule2_2,
+        NULL,
+        NULL,
+        "",
+        true,
+        true,
+        true,
+        false,
+        false,
+        false,
+        false,
+        false,
+        false,
+        false,
+        true
+    }
+};
+
+static const UMLRTCommsPort * borderports_Top_capsule2_2_ptrs[] = 
+{
+    &borderports_Top_capsule2_2[0]
+};
+
+static Capsule_Capsule2 top_capsule2_2( &Capsule2, &Top_slots[InstId_Top_capsule2_2], borderports_Top_capsule2_2_ptrs, NULL, true );
+
+UMLRTSlot Top_slots[] = 
+{
+    {
+        "Top",
+        0,
+        &Top,
+        NULL,
+        0,
+        &top,
+        &DefaultController_,
+        2,
+        parts_Top,
+        0,
+        NULL,
+        NULL,
+        true,
+        false
+    },
+    {
+        "Top.capsule1",
+        0,
+        &Capsule1,
+        &Top,
+        Capsule_Top::part_capsule1,
+        &top_capsule1,
+        &DefaultController_,
+        0,
+        NULL,
+        1,
+        borderports_Top_capsule1,
+        NULL,
+        true,
+        false
+    },
+    {
+        "Top.capsule2[0]",
+        0,
+        &Capsule2,
+        &Top,
+        Capsule_Top::part_capsule2,
+        &top_capsule2_0,
+        &DefaultController_,
+        0,
+        NULL,
+        1,
+        borderports_Top_capsule2_0,
+        NULL,
+        true,
+        false
+    },
+    {
+        "Top.capsule2[1]",
+        1,
+        &Capsule2,
+        &Top,
+        Capsule_Top::part_capsule2,
+        &top_capsule2_1,
+        &DefaultController_,
+        0,
+        NULL,
+        1,
+        borderports_Top_capsule2_1,
+        NULL,
+        true,
+        false
+    },
+    {
+        "Top.capsule2[2]",
+        2,
+        &Capsule2,
+        &Top,
+        Capsule_Top::part_capsule2,
+        &top_capsule2_2,
+        &DefaultController_,
+        0,
+        NULL,
+        1,
+        borderports_Top_capsule2_2,
+        NULL,
+        true,
+        false
+    }
+};
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication3/expected_src/TopControllers.hh b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/TopControllers.hh
new file mode 100644
index 0000000..1a4533d
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/TopControllers.hh
@@ -0,0 +1,25 @@
+
+#ifndef TOPCONTROLLERS_HH
+#define TOPCONTROLLERS_HH
+
+class UMLRTController;
+struct UMLRTCommsPort;
+struct UMLRTSlot;
+
+enum CapsuleInstanceId
+{
+    InstId_Top,
+    InstId_Top_capsule1,
+    InstId_Top_capsule2_0,
+    InstId_Top_capsule2_1,
+    InstId_Top_capsule2_2
+};
+extern UMLRTController * DefaultController;
+extern UMLRTCommsPort borderports_Top_capsule1[];
+extern UMLRTCommsPort borderports_Top_capsule2_0[];
+extern UMLRTCommsPort borderports_Top_capsule2_1[];
+extern UMLRTCommsPort borderports_Top_capsule2_2[];
+extern UMLRTSlot Top_slots[];
+
+#endif
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication3/expected_src/TopMain.cc b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/TopMain.cc
new file mode 100644
index 0000000..0684f69
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication3/expected_src/TopMain.cc
@@ -0,0 +1,38 @@
+#include "umlrtmain.hh"
+
+#include "umlrtcontroller.hh"
+#include "TopControllers.hh"
+#include "umlrtcapsuletocontrollermap.hh"
+#include "umlrtmessagepool.hh"
+#include "umlrtsignalelementpool.hh"
+#include "umlrttimerpool.hh"
+#include "umlrtuserconfig.hh"
+#include <stdio.h>
+
+static UMLRTSignalElement signalElementBuffer[USER_CONFIG_SIGNAL_ELEMENT_POOL_SIZE];
+static UMLRTSignalElementPool signalElementPool( signalElementBuffer, USER_CONFIG_SIGNAL_ELEMENT_POOL_SIZE );
+
+static UMLRTMessage messageBuffer[USER_CONFIG_MESSAGE_POOL_SIZE];
+static UMLRTMessagePool messagePool( messageBuffer, USER_CONFIG_MESSAGE_POOL_SIZE );
+
+static UMLRTTimer timers[USER_CONFIG_TIMER_POOL_SIZE];
+static UMLRTTimerPool timerPool( timers, USER_CONFIG_TIMER_POOL_SIZE );
+
+int main( int argc, char * argv[] )
+{
+    UMLRTController::initializePools( &signalElementPool, &messagePool, &timerPool );
+    UMLRTMain::setArgs( argc, argv );
+    UMLRTCapsuleToControllerMap::setDefaultSlotList( Top_slots, 5 );
+
+    if( ! UMLRTMain::targetStartup() )
+        return EXIT_FAILURE;
+
+    DefaultController->spawn();
+
+    if( ! UMLRTMain::mainLoop() )
+        return UMLRTMain::targetShutdown( false );
+
+    DefaultController->join();
+
+    return UMLRTMain::targetShutdown( true );
+}
diff --git a/models/tests/codepattern/structure/SymbolicReplication4/.project b/models/tests/codepattern/structure/SymbolicReplication4/.project
new file mode 100644
index 0000000..02207f2
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication4/.project
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>SymbolicReplication4</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+	</natures>
+</projectDescription>
diff --git a/models/tests/codepattern/structure/SymbolicReplication4/SymbolicReplication4.di b/models/tests/codepattern/structure/SymbolicReplication4/SymbolicReplication4.di
new file mode 100644
index 0000000..bf9abab
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication4/SymbolicReplication4.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/models/tests/codepattern/structure/SymbolicReplication4/SymbolicReplication4.notation b/models/tests/codepattern/structure/SymbolicReplication4/SymbolicReplication4.notation
new file mode 100644
index 0000000..1473723
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication4/SymbolicReplication4.notation
@@ -0,0 +1,418 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+  <notation:Diagram xmi:id="_qNgawNkeEeage7NIo_FkXg" type="CompositeStructure" measurementUnit="Pixel">
+    <children xmi:type="notation:Shape" xmi:id="_qNi3ANkeEeage7NIo_FkXg" type="Class_Shape">
+      <children xmi:type="notation:DecorationNode" xmi:id="_qNksMNkeEeage7NIo_FkXg" type="Class_NameLabel"/>
+      <children xmi:type="notation:DecorationNode" xmi:id="_qNksMdkeEeage7NIo_FkXg" type="Class_FloatingNameLabel">
+        <layoutConstraint xmi:type="notation:Location" xmi:id="_qNksMtkeEeage7NIo_FkXg" y="5"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_qNlTQNkeEeage7NIo_FkXg" type="Class_StructureCompartment">
+        <children xmi:type="notation:Shape" xmi:id="_yYdqANkeEeage7NIo_FkXg" type="Property_Shape">
+          <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_3agnkNkeEeage7NIo_FkXg" source="PapyrusCSSForceValue">
+            <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_3agnkdkeEeage7NIo_FkXg" key="mutable" value="true"/>
+          </eAnnotations>
+          <children xmi:type="notation:DecorationNode" xmi:id="_yYe4INkeEeage7NIo_FkXg" type="Property_NameLabel"/>
+          <children xmi:type="notation:DecorationNode" xmi:id="_yYe4IdkeEeage7NIo_FkXg" type="Property_FloatingNameLabel">
+            <layoutConstraint xmi:type="notation:Location" xmi:id="_yYe4ItkeEeage7NIo_FkXg" y="5"/>
+          </children>
+          <children xmi:type="notation:BasicCompartment" xmi:id="_yYe4I9keEeage7NIo_FkXg" type="Property_StructureCompartment">
+            <styles xmi:type="notation:TitleStyle" xmi:id="_yYe4JNkeEeage7NIo_FkXg"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yYe4JdkeEeage7NIo_FkXg"/>
+          </children>
+          <children xmi:type="notation:DecorationNode" xmi:id="_yYopINkeEeage7NIo_FkXg" type="StereotypeLabel">
+            <styles xmi:type="notation:StringValueStyle" xmi:id="_yYopIdkeEeage7NIo_FkXg" name="stereotype" stringValue="UMLRealTime::CapsulePart"/>
+            <element xmi:type="uml:Stereotype" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_EQwT4EhOEeO0lv5O1DTHOQ"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yYopItkeEeage7NIo_FkXg"/>
+          </children>
+          <children xmi:type="notation:BasicCompartment" xmi:id="_yYopI9keEeage7NIo_FkXg" type="StereotypeBrace">
+            <styles xmi:type="notation:TitleStyle" xmi:id="_yYopJNkeEeage7NIo_FkXg"/>
+            <styles xmi:type="notation:StringValueStyle" xmi:id="_yYopJdkeEeage7NIo_FkXg" name="stereotype" stringValue="UMLRealTime::CapsulePart"/>
+            <element xmi:type="uml:Stereotype" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_EQwT4EhOEeO0lv5O1DTHOQ"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yYopJtkeEeage7NIo_FkXg"/>
+          </children>
+          <children xmi:type="notation:BasicCompartment" xmi:id="_yYp3QNkeEeage7NIo_FkXg" type="compartment_shape_display">
+            <styles xmi:type="notation:TitleStyle" xmi:id="_yYp3QdkeEeage7NIo_FkXg"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yYp3QtkeEeage7NIo_FkXg"/>
+          </children>
+          <children xmi:type="notation:BasicCompartment" xmi:id="_yYrscNkeEeage7NIo_FkXg" type="StereotypeCompartment">
+            <styles xmi:type="notation:TitleStyle" xmi:id="_yYrscdkeEeage7NIo_FkXg"/>
+            <styles xmi:type="notation:StringValueStyle" xmi:id="_yYrsctkeEeage7NIo_FkXg" name="stereotype" stringValue="UMLRealTime::CapsulePart"/>
+            <element xmi:type="uml:Stereotype" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_EQwT4EhOEeO0lv5O1DTHOQ"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yYrsc9keEeage7NIo_FkXg"/>
+          </children>
+          <children xmi:type="notation:Shape" xmi:id="_3XNb8NkeEeage7NIo_FkXg" type="Port_Shape">
+            <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_3agnktkeEeage7NIo_FkXg" source="PapyrusCSSForceValue">
+              <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_3agnk9keEeage7NIo_FkXg" key="mutable" value="true"/>
+            </eAnnotations>
+            <children xmi:type="notation:DecorationNode" xmi:id="_3XNb8tkeEeage7NIo_FkXg" type="Port_NameLabel">
+              <layoutConstraint xmi:type="notation:Location" xmi:id="_3XNb89keEeage7NIo_FkXg" x="18" y="-18"/>
+            </children>
+            <children xmi:type="notation:DecorationNode" xmi:id="_3XNb9NkeEeage7NIo_FkXg" type="Port_StereotypeLabel">
+              <layoutConstraint xmi:type="notation:Location" xmi:id="_3XNb9dkeEeage7NIo_FkXg" x="25" y="-10"/>
+            </children>
+            <element xmi:type="uml:Port" href="SymbolicReplication4.uml#_27wPANkeEeage7NIo_FkXg"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3XNb8dkeEeage7NIo_FkXg" x="110" y="22" width="11" height="11"/>
+          </children>
+          <element xmi:type="uml:Property" href="SymbolicReplication4.uml#_x1bOYNkeEeage7NIo_FkXg"/>
+          <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yYdqAdkeEeage7NIo_FkXg" x="36" y="80"/>
+        </children>
+        <children xmi:type="notation:Shape" xmi:id="_yYp3Q9keEeage7NIo_FkXg" type="StereotypeComment">
+          <styles xmi:type="notation:TitleStyle" xmi:id="_yYp3RNkeEeage7NIo_FkXg"/>
+          <styles xmi:type="notation:EObjectValueStyle" xmi:id="_yYqeUNkeEeage7NIo_FkXg" name="BASE_ELEMENT">
+            <eObjectValue xmi:type="uml:Property" href="SymbolicReplication4.uml#_x1bOYNkeEeage7NIo_FkXg"/>
+          </styles>
+          <element xsi:nil="true"/>
+          <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yYp3RdkeEeage7NIo_FkXg" x="200"/>
+        </children>
+        <children xmi:type="notation:Shape" xmi:id="_0ToWMNkeEeage7NIo_FkXg" type="Property_Shape">
+          <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_-LU0ENkeEeage7NIo_FkXg" source="PapyrusCSSForceValue">
+            <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_-LU0EdkeEeage7NIo_FkXg" key="mutable" value="true"/>
+          </eAnnotations>
+          <children xmi:type="notation:DecorationNode" xmi:id="_0To9QNkeEeage7NIo_FkXg" type="Property_NameLabel"/>
+          <children xmi:type="notation:DecorationNode" xmi:id="_0To9QdkeEeage7NIo_FkXg" type="Property_FloatingNameLabel">
+            <layoutConstraint xmi:type="notation:Location" xmi:id="_0TpkUNkeEeage7NIo_FkXg" y="5"/>
+          </children>
+          <children xmi:type="notation:BasicCompartment" xmi:id="_0TpkUdkeEeage7NIo_FkXg" type="Property_StructureCompartment">
+            <styles xmi:type="notation:TitleStyle" xmi:id="_0TpkUtkeEeage7NIo_FkXg"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_0TpkU9keEeage7NIo_FkXg"/>
+          </children>
+          <children xmi:type="notation:DecorationNode" xmi:id="_0TzVUNkeEeage7NIo_FkXg" type="StereotypeLabel">
+            <styles xmi:type="notation:StringValueStyle" xmi:id="_0TzVUdkeEeage7NIo_FkXg" name="stereotype" stringValue="UMLRealTime::CapsulePart"/>
+            <element xmi:type="uml:Stereotype" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_EQwT4EhOEeO0lv5O1DTHOQ"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_0TzVUtkeEeage7NIo_FkXg"/>
+          </children>
+          <children xmi:type="notation:BasicCompartment" xmi:id="_0Tz8YNkeEeage7NIo_FkXg" type="StereotypeBrace">
+            <styles xmi:type="notation:TitleStyle" xmi:id="_0Tz8YdkeEeage7NIo_FkXg"/>
+            <styles xmi:type="notation:StringValueStyle" xmi:id="_0Tz8YtkeEeage7NIo_FkXg" name="stereotype" stringValue="UMLRealTime::CapsulePart"/>
+            <element xmi:type="uml:Stereotype" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_EQwT4EhOEeO0lv5O1DTHOQ"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_0Tz8Y9keEeage7NIo_FkXg"/>
+          </children>
+          <children xmi:type="notation:BasicCompartment" xmi:id="_0T0jcNkeEeage7NIo_FkXg" type="compartment_shape_display">
+            <styles xmi:type="notation:TitleStyle" xmi:id="_0T0jcdkeEeage7NIo_FkXg"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_0T0jctkeEeage7NIo_FkXg"/>
+          </children>
+          <children xmi:type="notation:BasicCompartment" xmi:id="_0T1xkNkeEeage7NIo_FkXg" type="StereotypeCompartment">
+            <styles xmi:type="notation:TitleStyle" xmi:id="_0T1xkdkeEeage7NIo_FkXg"/>
+            <styles xmi:type="notation:StringValueStyle" xmi:id="_0T1xktkeEeage7NIo_FkXg" name="stereotype" stringValue="UMLRealTime::CapsulePart"/>
+            <element xmi:type="uml:Stereotype" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_EQwT4EhOEeO0lv5O1DTHOQ"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_0T1xk9keEeage7NIo_FkXg"/>
+          </children>
+          <children xmi:type="notation:Shape" xmi:id="_-JV3ENkeEeage7NIo_FkXg" type="Port_Shape">
+            <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_-LU0EtkeEeage7NIo_FkXg" source="PapyrusCSSForceValue">
+              <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_-LU0E9keEeage7NIo_FkXg" key="mutable" value="true"/>
+            </eAnnotations>
+            <children xmi:type="notation:DecorationNode" xmi:id="_-JV3EtkeEeage7NIo_FkXg" type="Port_NameLabel">
+              <layoutConstraint xmi:type="notation:Location" xmi:id="_-JV3E9keEeage7NIo_FkXg" x="-82" y="16"/>
+            </children>
+            <children xmi:type="notation:DecorationNode" xmi:id="_-JV3FNkeEeage7NIo_FkXg" type="Port_StereotypeLabel">
+              <layoutConstraint xmi:type="notation:Location" xmi:id="_-JV3FdkeEeage7NIo_FkXg" x="25" y="-10"/>
+            </children>
+            <element xmi:type="uml:Port" href="SymbolicReplication4.uml#_9LknQNkeEeage7NIo_FkXg"/>
+            <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-JV3EdkeEeage7NIo_FkXg" x="-5" y="21" width="11" height="11"/>
+          </children>
+          <element xmi:type="uml:Property" href="SymbolicReplication4.uml#_z2EQcNkeEeage7NIo_FkXg"/>
+          <layoutConstraint xmi:type="notation:Bounds" xmi:id="_0ToWMdkeEeage7NIo_FkXg" x="326" y="80"/>
+        </children>
+        <children xmi:type="notation:Shape" xmi:id="_0T0jc9keEeage7NIo_FkXg" type="StereotypeComment">
+          <styles xmi:type="notation:TitleStyle" xmi:id="_0T0jdNkeEeage7NIo_FkXg"/>
+          <styles xmi:type="notation:EObjectValueStyle" xmi:id="_0T0jdtkeEeage7NIo_FkXg" name="BASE_ELEMENT">
+            <eObjectValue xmi:type="uml:Property" href="SymbolicReplication4.uml#_z2EQcNkeEeage7NIo_FkXg"/>
+          </styles>
+          <element xsi:nil="true"/>
+          <layoutConstraint xmi:type="notation:Bounds" xmi:id="_0T0jddkeEeage7NIo_FkXg" x="200"/>
+        </children>
+        <children xmi:type="notation:Shape" xmi:id="_3XZpMNkeEeage7NIo_FkXg" type="StereotypeComment">
+          <styles xmi:type="notation:TitleStyle" xmi:id="_3XZpMdkeEeage7NIo_FkXg"/>
+          <styles xmi:type="notation:EObjectValueStyle" xmi:id="_3XZpM9keEeage7NIo_FkXg" name="BASE_ELEMENT">
+            <eObjectValue xmi:type="uml:Port" href="SymbolicReplication4.uml#_27wPANkeEeage7NIo_FkXg"/>
+          </styles>
+          <element xsi:nil="true"/>
+          <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3XZpMtkeEeage7NIo_FkXg" x="194" y="-6"/>
+        </children>
+        <children xmi:type="notation:Shape" xmi:id="_-Jdy5tkeEeage7NIo_FkXg" type="StereotypeComment">
+          <styles xmi:type="notation:TitleStyle" xmi:id="_-Jdy59keEeage7NIo_FkXg"/>
+          <styles xmi:type="notation:EObjectValueStyle" xmi:id="_-JeZ8NkeEeage7NIo_FkXg" name="BASE_ELEMENT">
+            <eObjectValue xmi:type="uml:Port" href="SymbolicReplication4.uml#_9LknQNkeEeage7NIo_FkXg"/>
+          </styles>
+          <element xsi:nil="true"/>
+          <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-Jdy6NkeEeage7NIo_FkXg" x="194" y="-6"/>
+        </children>
+        <children xmi:type="notation:Shape" xmi:id="_F050kNkfEeage7NIo_FkXg" type="StereotypeComment">
+          <styles xmi:type="notation:TitleStyle" xmi:id="_F050kdkfEeage7NIo_FkXg"/>
+          <styles xmi:type="notation:EObjectValueStyle" xmi:id="_F050k9kfEeage7NIo_FkXg" name="BASE_ELEMENT">
+            <eObjectValue xmi:type="uml:Connector" href="SymbolicReplication4.uml#_F0Wa8NkfEeage7NIo_FkXg"/>
+          </styles>
+          <element xsi:nil="true"/>
+          <layoutConstraint xmi:type="notation:Bounds" xmi:id="_F050ktkfEeage7NIo_FkXg" x="100" y="100"/>
+        </children>
+        <styles xmi:type="notation:TitleStyle" xmi:id="_qNlTQdkeEeage7NIo_FkXg"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qNlTQtkeEeage7NIo_FkXg"/>
+      </children>
+      <element xmi:type="uml:Class" href="SymbolicReplication4.uml#_qMg8QNkeEeage7NIo_FkXg"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qNi3AdkeEeage7NIo_FkXg" x="32" y="48" width="550" height="250"/>
+    </children>
+    <children xmi:type="notation:Shape" xmi:id="_xV6A0NkeEeage7NIo_FkXg" type="StereotypeComment">
+      <styles xmi:type="notation:TitleStyle" xmi:id="_xV6A0dkeEeage7NIo_FkXg"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_xV7O8NkeEeage7NIo_FkXg" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Class" href="SymbolicReplication4.uml#_qMg8QNkeEeage7NIo_FkXg"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_xV6A0tkeEeage7NIo_FkXg" x="240" y="40"/>
+    </children>
+    <styles xmi:type="notation:StringValueStyle" xmi:id="_qNgawdkeEeage7NIo_FkXg" name="diagram_compatibility_version" stringValue="1.2.0"/>
+    <styles xmi:type="notation:DiagramStyle" xmi:id="_qNgawtkeEeage7NIo_FkXg"/>
+    <styles xmi:type="style:PapyrusViewStyle" xmi:id="_qNgaw9keEeage7NIo_FkXg">
+      <owner xmi:type="uml:Class" href="SymbolicReplication4.uml#_qMg8QNkeEeage7NIo_FkXg"/>
+      <configuration xmi:type="configuration:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/configuration/UMLRT.configuration#_Z79eQHcZEeSnWeKqQOfW2A"/>
+    </styles>
+    <element xmi:type="uml:Class" href="SymbolicReplication4.uml#_qMg8QNkeEeage7NIo_FkXg"/>
+    <edges xmi:type="notation:Connector" xmi:id="_xV72ANkeEeage7NIo_FkXg" type="StereotypeCommentLink" source="_qNi3ANkeEeage7NIo_FkXg" target="_xV6A0NkeEeage7NIo_FkXg">
+      <styles xmi:type="notation:FontStyle" xmi:id="_xV72AdkeEeage7NIo_FkXg"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_xV8dENkeEeage7NIo_FkXg" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Class" href="SymbolicReplication4.uml#_qMg8QNkeEeage7NIo_FkXg"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_xV72AtkeEeage7NIo_FkXg" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+      <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_xV72A9keEeage7NIo_FkXg"/>
+      <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_xV72BNkeEeage7NIo_FkXg"/>
+    </edges>
+    <edges xmi:type="notation:Connector" xmi:id="_yYqeUdkeEeage7NIo_FkXg" type="StereotypeCommentLink" source="_yYdqANkeEeage7NIo_FkXg" target="_yYp3Q9keEeage7NIo_FkXg">
+      <styles xmi:type="notation:FontStyle" xmi:id="_yYqeUtkeEeage7NIo_FkXg"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_yYrFYNkeEeage7NIo_FkXg" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Property" href="SymbolicReplication4.uml#_x1bOYNkeEeage7NIo_FkXg"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_yYqeU9keEeage7NIo_FkXg" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+      <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_yYqeVNkeEeage7NIo_FkXg"/>
+      <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_yYqeVdkeEeage7NIo_FkXg"/>
+    </edges>
+    <edges xmi:type="notation:Connector" xmi:id="_0T1KgNkeEeage7NIo_FkXg" type="StereotypeCommentLink" source="_0ToWMNkeEeage7NIo_FkXg" target="_0T0jc9keEeage7NIo_FkXg">
+      <styles xmi:type="notation:FontStyle" xmi:id="_0T1KgdkeEeage7NIo_FkXg"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_0T1KhdkeEeage7NIo_FkXg" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Property" href="SymbolicReplication4.uml#_z2EQcNkeEeage7NIo_FkXg"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_0T1KgtkeEeage7NIo_FkXg" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+      <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_0T1Kg9keEeage7NIo_FkXg"/>
+      <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_0T1KhNkeEeage7NIo_FkXg"/>
+    </edges>
+    <edges xmi:type="notation:Connector" xmi:id="_3XZpNNkeEeage7NIo_FkXg" type="StereotypeCommentLink" source="_3XNb8NkeEeage7NIo_FkXg" target="_3XZpMNkeEeage7NIo_FkXg">
+      <styles xmi:type="notation:FontStyle" xmi:id="_3XZpNdkeEeage7NIo_FkXg"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_3XZpOdkeEeage7NIo_FkXg" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Port" href="SymbolicReplication4.uml#_27wPANkeEeage7NIo_FkXg"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_3XZpNtkeEeage7NIo_FkXg" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+      <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_3XZpN9keEeage7NIo_FkXg"/>
+      <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_3XZpONkeEeage7NIo_FkXg"/>
+    </edges>
+    <edges xmi:type="notation:Connector" xmi:id="_-JeZ8dkeEeage7NIo_FkXg" type="StereotypeCommentLink" source="_-JV3ENkeEeage7NIo_FkXg" target="_-Jdy5tkeEeage7NIo_FkXg">
+      <styles xmi:type="notation:FontStyle" xmi:id="_-JeZ8tkeEeage7NIo_FkXg"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_-JeZ9tkeEeage7NIo_FkXg" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Port" href="SymbolicReplication4.uml#_9LknQNkeEeage7NIo_FkXg"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_-JeZ89keEeage7NIo_FkXg" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+      <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_-JeZ9NkeEeage7NIo_FkXg"/>
+      <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_-JeZ9dkeEeage7NIo_FkXg"/>
+    </edges>
+    <edges xmi:type="notation:Connector" xmi:id="_F0m5oNkfEeage7NIo_FkXg" type="Connector_Edge" source="_3XNb8NkeEeage7NIo_FkXg" target="_-JV3ENkeEeage7NIo_FkXg">
+      <children xmi:type="notation:DecorationNode" xmi:id="_F0m5o9kfEeage7NIo_FkXg" type="Connector_StereotypeLabel">
+        <layoutConstraint xmi:type="notation:Location" xmi:id="_F0ngsNkfEeage7NIo_FkXg" y="60"/>
+      </children>
+      <children xmi:type="notation:DecorationNode" xmi:id="_F0ngsdkfEeage7NIo_FkXg" type="Connector_NameLabel">
+        <layoutConstraint xmi:type="notation:Location" xmi:id="_F0ngstkfEeage7NIo_FkXg" y="-20"/>
+      </children>
+      <styles xmi:type="notation:FontStyle" xmi:id="_F0m5odkfEeage7NIo_FkXg"/>
+      <element xmi:type="uml:Connector" href="SymbolicReplication4.uml#_F0Wa8NkfEeage7NIo_FkXg"/>
+      <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_F0m5otkfEeage7NIo_FkXg" points="[195, 180, -643984, -643984]$[363, 175, -643984, -643984]"/>
+      <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_F1V5cNkfEeage7NIo_FkXg" id="(0.09090909090909091,0.36363636363636365)"/>
+    </edges>
+    <edges xmi:type="notation:Connector" xmi:id="_F050lNkfEeage7NIo_FkXg" type="StereotypeCommentLink" source="_F0m5oNkfEeage7NIo_FkXg" target="_F050kNkfEeage7NIo_FkXg">
+      <styles xmi:type="notation:FontStyle" xmi:id="_F050ldkfEeage7NIo_FkXg"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_F06botkfEeage7NIo_FkXg" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Connector" href="SymbolicReplication4.uml#_F0Wa8NkfEeage7NIo_FkXg"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_F050ltkfEeage7NIo_FkXg" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+      <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_F06boNkfEeage7NIo_FkXg"/>
+      <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_F06bodkfEeage7NIo_FkXg"/>
+    </edges>
+  </notation:Diagram>
+  <notation:Diagram xmi:id="_yGNcYNkeEeage7NIo_FkXg" type="CompositeStructure" measurementUnit="Pixel">
+    <children xmi:type="notation:Shape" xmi:id="_yGODcNkeEeage7NIo_FkXg" type="Class_Shape">
+      <children xmi:type="notation:DecorationNode" xmi:id="_yGODctkeEeage7NIo_FkXg" type="Class_NameLabel"/>
+      <children xmi:type="notation:DecorationNode" xmi:id="_yGODc9keEeage7NIo_FkXg" type="Class_FloatingNameLabel">
+        <layoutConstraint xmi:type="notation:Location" xmi:id="_yGODdNkeEeage7NIo_FkXg" y="5"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_yGODddkeEeage7NIo_FkXg" type="Class_StructureCompartment">
+        <styles xmi:type="notation:TitleStyle" xmi:id="_yGODdtkeEeage7NIo_FkXg"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yGODd9keEeage7NIo_FkXg"/>
+      </children>
+      <children xmi:type="notation:DecorationNode" xmi:id="_2dtoINkeEeage7NIo_FkXg" type="StereotypeLabel">
+        <styles xmi:type="notation:StringValueStyle" xmi:id="_2dtoIdkeEeage7NIo_FkXg" name="stereotype" stringValue="UMLRealTime::Capsule"/>
+        <element xmi:type="uml:Stereotype" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_hcMIwEhNEeO0lv5O1DTHOQ"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2dtoItkeEeage7NIo_FkXg"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_2dvdUNkeEeage7NIo_FkXg" type="StereotypeBrace">
+        <styles xmi:type="notation:TitleStyle" xmi:id="_2dvdUdkeEeage7NIo_FkXg"/>
+        <styles xmi:type="notation:StringValueStyle" xmi:id="_2dvdUtkeEeage7NIo_FkXg" name="stereotype" stringValue="UMLRealTime::Capsule"/>
+        <element xmi:type="uml:Stereotype" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_hcMIwEhNEeO0lv5O1DTHOQ"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2dvdU9keEeage7NIo_FkXg"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_2dwrcNkeEeage7NIo_FkXg" type="compartment_shape_display">
+        <styles xmi:type="notation:TitleStyle" xmi:id="_2dwrcdkeEeage7NIo_FkXg"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2dwrctkeEeage7NIo_FkXg"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_2dygoNkeEeage7NIo_FkXg" type="StereotypeCompartment">
+        <styles xmi:type="notation:TitleStyle" xmi:id="_2dygodkeEeage7NIo_FkXg"/>
+        <styles xmi:type="notation:StringValueStyle" xmi:id="_2dygotkeEeage7NIo_FkXg" name="stereotype" stringValue="UMLRealTime::Capsule"/>
+        <element xmi:type="uml:Stereotype" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_hcMIwEhNEeO0lv5O1DTHOQ"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2dygo9keEeage7NIo_FkXg"/>
+      </children>
+      <children xmi:type="notation:Shape" xmi:id="_3XtLMNkeEeage7NIo_FkXg" type="Port_Shape">
+        <children xmi:type="notation:DecorationNode" xmi:id="_3XtLMtkeEeage7NIo_FkXg" type="Port_NameLabel">
+          <layoutConstraint xmi:type="notation:Location" xmi:id="_3XtLM9keEeage7NIo_FkXg" x="18" y="-18"/>
+        </children>
+        <children xmi:type="notation:DecorationNode" xmi:id="_3XtLNNkeEeage7NIo_FkXg" type="Port_StereotypeLabel">
+          <layoutConstraint xmi:type="notation:Location" xmi:id="_3XtLNdkeEeage7NIo_FkXg" x="25" y="-10"/>
+        </children>
+        <element xmi:type="uml:Port" href="SymbolicReplication4.uml#_27wPANkeEeage7NIo_FkXg"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3XtLMdkeEeage7NIo_FkXg" x="492" y="135" width="16" height="16"/>
+      </children>
+      <element xmi:type="uml:Class" href="SymbolicReplication4.uml#_yFu7QNkeEeage7NIo_FkXg"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_yGODcdkeEeage7NIo_FkXg" x="40" y="40" width="500" height="250"/>
+    </children>
+    <children xmi:type="notation:Shape" xmi:id="_2dxSgNkeEeage7NIo_FkXg" type="StereotypeComment">
+      <styles xmi:type="notation:TitleStyle" xmi:id="_2dxSgdkeEeage7NIo_FkXg"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_2dxSg9keEeage7NIo_FkXg" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Class" href="SymbolicReplication4.uml#_yFu7QNkeEeage7NIo_FkXg"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2dxSgtkeEeage7NIo_FkXg" x="240" y="40"/>
+    </children>
+    <children xmi:type="notation:Shape" xmi:id="_3X1HANkeEeage7NIo_FkXg" type="StereotypeComment">
+      <styles xmi:type="notation:TitleStyle" xmi:id="_3X1HAdkeEeage7NIo_FkXg"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_3X1uENkeEeage7NIo_FkXg" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Port" href="SymbolicReplication4.uml#_27wPANkeEeage7NIo_FkXg"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3X1HAtkeEeage7NIo_FkXg" x="692" y="135"/>
+    </children>
+    <styles xmi:type="notation:StringValueStyle" xmi:id="_yGNcYdkeEeage7NIo_FkXg" name="diagram_compatibility_version" stringValue="1.2.0"/>
+    <styles xmi:type="notation:DiagramStyle" xmi:id="_yGNcYtkeEeage7NIo_FkXg"/>
+    <styles xmi:type="style:PapyrusViewStyle" xmi:id="_yGNcY9keEeage7NIo_FkXg">
+      <owner xmi:type="uml:Class" href="SymbolicReplication4.uml#_yFu7QNkeEeage7NIo_FkXg"/>
+      <configuration xmi:type="configuration:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/configuration/UMLRT.configuration#_Z79eQHcZEeSnWeKqQOfW2A"/>
+    </styles>
+    <element xmi:type="uml:Class" href="SymbolicReplication4.uml#_yFu7QNkeEeage7NIo_FkXg"/>
+    <edges xmi:type="notation:Connector" xmi:id="_2dxShNkeEeage7NIo_FkXg" type="StereotypeCommentLink" source="_yGODcNkeEeage7NIo_FkXg" target="_2dxSgNkeEeage7NIo_FkXg">
+      <styles xmi:type="notation:FontStyle" xmi:id="_2dxShdkeEeage7NIo_FkXg"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_2dxSidkeEeage7NIo_FkXg" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Class" href="SymbolicReplication4.uml#_yFu7QNkeEeage7NIo_FkXg"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_2dxShtkeEeage7NIo_FkXg" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+      <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_2dxSh9keEeage7NIo_FkXg"/>
+      <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_2dxSiNkeEeage7NIo_FkXg"/>
+    </edges>
+    <edges xmi:type="notation:Connector" xmi:id="_3X1uEdkeEeage7NIo_FkXg" type="StereotypeCommentLink" source="_3XtLMNkeEeage7NIo_FkXg" target="_3X1HANkeEeage7NIo_FkXg">
+      <styles xmi:type="notation:FontStyle" xmi:id="_3X1uEtkeEeage7NIo_FkXg"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_3X1uFtkeEeage7NIo_FkXg" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Port" href="SymbolicReplication4.uml#_27wPANkeEeage7NIo_FkXg"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_3X1uE9keEeage7NIo_FkXg" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+      <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_3X1uFNkeEeage7NIo_FkXg"/>
+      <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_3X1uFdkeEeage7NIo_FkXg"/>
+    </edges>
+  </notation:Diagram>
+  <notation:Diagram xmi:id="_0DAgQNkeEeage7NIo_FkXg" type="CompositeStructure" measurementUnit="Pixel">
+    <children xmi:type="notation:Shape" xmi:id="_0DBHUNkeEeage7NIo_FkXg" type="Class_Shape">
+      <children xmi:type="notation:DecorationNode" xmi:id="_0DBHUtkeEeage7NIo_FkXg" type="Class_NameLabel"/>
+      <children xmi:type="notation:DecorationNode" xmi:id="_0DBHU9keEeage7NIo_FkXg" type="Class_FloatingNameLabel">
+        <layoutConstraint xmi:type="notation:Location" xmi:id="_0DBHVNkeEeage7NIo_FkXg" y="5"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_0DBuYNkeEeage7NIo_FkXg" type="Class_StructureCompartment">
+        <styles xmi:type="notation:TitleStyle" xmi:id="_0DBuYdkeEeage7NIo_FkXg"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_0DBuYtkeEeage7NIo_FkXg"/>
+      </children>
+      <children xmi:type="notation:DecorationNode" xmi:id="_8LTdENkeEeage7NIo_FkXg" type="StereotypeLabel">
+        <styles xmi:type="notation:StringValueStyle" xmi:id="_8LTdEdkeEeage7NIo_FkXg" name="stereotype" stringValue="UMLRealTime::Capsule"/>
+        <element xmi:type="uml:Stereotype" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_hcMIwEhNEeO0lv5O1DTHOQ"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8LTdEtkeEeage7NIo_FkXg"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_8LUrMNkeEeage7NIo_FkXg" type="StereotypeBrace">
+        <styles xmi:type="notation:TitleStyle" xmi:id="_8LUrMdkeEeage7NIo_FkXg"/>
+        <styles xmi:type="notation:StringValueStyle" xmi:id="_8LUrMtkeEeage7NIo_FkXg" name="stereotype" stringValue="UMLRealTime::Capsule"/>
+        <element xmi:type="uml:Stereotype" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_hcMIwEhNEeO0lv5O1DTHOQ"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8LUrM9keEeage7NIo_FkXg"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_8LVSQNkeEeage7NIo_FkXg" type="compartment_shape_display">
+        <styles xmi:type="notation:TitleStyle" xmi:id="_8LVSQdkeEeage7NIo_FkXg"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8LVSQtkeEeage7NIo_FkXg"/>
+      </children>
+      <children xmi:type="notation:BasicCompartment" xmi:id="_8LXHdNkeEeage7NIo_FkXg" type="StereotypeCompartment">
+        <styles xmi:type="notation:TitleStyle" xmi:id="_8LXHddkeEeage7NIo_FkXg"/>
+        <styles xmi:type="notation:StringValueStyle" xmi:id="_8LXHdtkeEeage7NIo_FkXg" name="stereotype" stringValue="UMLRealTime::Capsule"/>
+        <element xmi:type="uml:Stereotype" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_hcMIwEhNEeO0lv5O1DTHOQ"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8LXHd9keEeage7NIo_FkXg"/>
+      </children>
+      <children xmi:type="notation:Shape" xmi:id="_-JqAINkeEeage7NIo_FkXg" type="Port_Shape">
+        <children xmi:type="notation:DecorationNode" xmi:id="_-JqAItkeEeage7NIo_FkXg" type="Port_NameLabel">
+          <layoutConstraint xmi:type="notation:Location" xmi:id="_-JqAI9keEeage7NIo_FkXg" x="15" y="-19"/>
+        </children>
+        <children xmi:type="notation:DecorationNode" xmi:id="_-JqAJNkeEeage7NIo_FkXg" type="Port_StereotypeLabel">
+          <layoutConstraint xmi:type="notation:Location" xmi:id="_-JqAJdkeEeage7NIo_FkXg" x="25" y="-10"/>
+        </children>
+        <element xmi:type="uml:Port" href="SymbolicReplication4.uml#_9LknQNkeEeage7NIo_FkXg"/>
+        <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-JqAIdkeEeage7NIo_FkXg" x="-8" y="130" width="16" height="16"/>
+      </children>
+      <element xmi:type="uml:Class" href="SymbolicReplication4.uml#_0CnesNkeEeage7NIo_FkXg"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_0DBHUdkeEeage7NIo_FkXg" x="40" y="40" width="500" height="250"/>
+    </children>
+    <children xmi:type="notation:Shape" xmi:id="_8LV5UNkeEeage7NIo_FkXg" type="StereotypeComment">
+      <styles xmi:type="notation:TitleStyle" xmi:id="_8LV5UdkeEeage7NIo_FkXg"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_8LWgYNkeEeage7NIo_FkXg" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Class" href="SymbolicReplication4.uml#_0CnesNkeEeage7NIo_FkXg"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8LV5UtkeEeage7NIo_FkXg" x="240" y="40"/>
+    </children>
+    <children xmi:type="notation:Shape" xmi:id="_-JxU4NkeEeage7NIo_FkXg" type="StereotypeComment">
+      <styles xmi:type="notation:TitleStyle" xmi:id="_-JxU4dkeEeage7NIo_FkXg"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_-JxU49keEeage7NIo_FkXg" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Port" href="SymbolicReplication4.uml#_9LknQNkeEeage7NIo_FkXg"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-JxU4tkeEeage7NIo_FkXg" x="192" y="130"/>
+    </children>
+    <styles xmi:type="notation:StringValueStyle" xmi:id="_0DAgQdkeEeage7NIo_FkXg" name="diagram_compatibility_version" stringValue="1.2.0"/>
+    <styles xmi:type="notation:DiagramStyle" xmi:id="_0DAgQtkeEeage7NIo_FkXg"/>
+    <styles xmi:type="style:PapyrusViewStyle" xmi:id="_0DAgQ9keEeage7NIo_FkXg">
+      <owner xmi:type="uml:Class" href="SymbolicReplication4.uml#_0CnesNkeEeage7NIo_FkXg"/>
+      <configuration xmi:type="configuration:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/configuration/UMLRT.configuration#_Z79eQHcZEeSnWeKqQOfW2A"/>
+    </styles>
+    <element xmi:type="uml:Class" href="SymbolicReplication4.uml#_0CnesNkeEeage7NIo_FkXg"/>
+    <edges xmi:type="notation:Connector" xmi:id="_8LWgYdkeEeage7NIo_FkXg" type="StereotypeCommentLink" source="_0DBHUNkeEeage7NIo_FkXg" target="_8LV5UNkeEeage7NIo_FkXg">
+      <styles xmi:type="notation:FontStyle" xmi:id="_8LWgYtkeEeage7NIo_FkXg"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_8LWgZtkeEeage7NIo_FkXg" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Class" href="SymbolicReplication4.uml#_0CnesNkeEeage7NIo_FkXg"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_8LWgY9keEeage7NIo_FkXg" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+      <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_8LWgZNkeEeage7NIo_FkXg"/>
+      <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_8LWgZdkeEeage7NIo_FkXg"/>
+    </edges>
+    <edges xmi:type="notation:Connector" xmi:id="_-Jx78NkeEeage7NIo_FkXg" type="StereotypeCommentLink" source="_-JqAINkeEeage7NIo_FkXg" target="_-JxU4NkeEeage7NIo_FkXg">
+      <styles xmi:type="notation:FontStyle" xmi:id="_-Jx78dkeEeage7NIo_FkXg"/>
+      <styles xmi:type="notation:EObjectValueStyle" xmi:id="_-Jx79dkeEeage7NIo_FkXg" name="BASE_ELEMENT">
+        <eObjectValue xmi:type="uml:Port" href="SymbolicReplication4.uml#_9LknQNkeEeage7NIo_FkXg"/>
+      </styles>
+      <element xsi:nil="true"/>
+      <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_-Jx78tkeEeage7NIo_FkXg" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+      <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_-Jx789keEeage7NIo_FkXg"/>
+      <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_-Jx79NkeEeage7NIo_FkXg"/>
+    </edges>
+  </notation:Diagram>
+</xmi:XMI>
diff --git a/models/tests/codepattern/structure/SymbolicReplication4/SymbolicReplication4.uml b/models/tests/codepattern/structure/SymbolicReplication4/SymbolicReplication4.uml
new file mode 100644
index 0000000..bcb184c
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication4/SymbolicReplication4.uml
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:UMLRealTime="http://www.eclipse.org/papyrus/umlrt" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+  <uml:Model xmi:id="_nKWy0NkeEeage7NIo_FkXg" name="SymbolicReplication4">
+    <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_o91ioNkeEeage7NIo_FkXg" source="http://www.eclipse.org/papyrus-rt/language/1.0.0">
+      <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_o92JsNkeEeage7NIo_FkXg" key="language" value="umlrt-cpp"/>
+    </eAnnotations>
+    <packagedElement xmi:type="uml:Class" xmi:id="_qMg8QNkeEeage7NIo_FkXg" name="Top" isActive="true">
+      <ownedAttribute xmi:type="uml:Property" xmi:id="_x1bOYNkeEeage7NIo_FkXg" name="capsule1" visibility="protected" type="_yFu7QNkeEeage7NIo_FkXg" isOrdered="true" aggregation="composite"/>
+      <ownedAttribute xmi:type="uml:Property" xmi:id="_z2EQcNkeEeage7NIo_FkXg" name="capsule2" visibility="protected" type="_0CnesNkeEeage7NIo_FkXg" isOrdered="true" aggregation="composite">
+        <lowerValue xmi:type="uml:OpaqueExpression" xmi:id="_KPM1oNkfEeage7NIo_FkXg" name="OpaqueExpression2">
+          <language>C++</language>
+          <body>K*(M-1)/2</body>
+        </lowerValue>
+        <upperValue xmi:type="uml:OpaqueExpression" xmi:id="_KOttcNkfEeage7NIo_FkXg" name="OpaqueExpression1">
+          <language>C++</language>
+          <body>K*(M-1)/2</body>
+        </upperValue>
+      </ownedAttribute>
+      <ownedAttribute xmi:type="uml:Property" xmi:id="_UDL4MNkfEeage7NIo_FkXg" name="K">
+        <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+        <defaultValue xmi:type="uml:LiteralInteger" xmi:id="_NCDiUNkgEeage7NIo_FkXg" value="2"/>
+      </ownedAttribute>
+      <ownedAttribute xmi:type="uml:Property" xmi:id="_VcTnQNkfEeage7NIo_FkXg" name="M">
+        <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+        <defaultValue xmi:type="uml:LiteralInteger" xmi:id="_O5Ul8NkgEeage7NIo_FkXg" value="4"/>
+      </ownedAttribute>
+      <ownedConnector xmi:type="uml:Connector" xmi:id="_F0Wa8NkfEeage7NIo_FkXg" name="RTConnector1">
+        <end xmi:type="uml:ConnectorEnd" xmi:id="_F0Y3MNkfEeage7NIo_FkXg" partWithPort="_x1bOYNkeEeage7NIo_FkXg" role="_27wPANkeEeage7NIo_FkXg"/>
+        <end xmi:type="uml:ConnectorEnd" xmi:id="_F0Y3MdkfEeage7NIo_FkXg" partWithPort="_z2EQcNkeEeage7NIo_FkXg" role="_9LknQNkeEeage7NIo_FkXg"/>
+      </ownedConnector>
+    </packagedElement>
+    <packagedElement xmi:type="uml:Class" xmi:id="_yFu7QNkeEeage7NIo_FkXg" name="Capsule1" isActive="true">
+      <ownedAttribute xmi:type="uml:Port" xmi:id="_27wPANkeEeage7NIo_FkXg" name="protocol1" visibility="public" type="_3KIpQNkeEeage7NIo_FkXg" isOrdered="true" aggregation="composite" isBehavior="true" isService="true">
+        <lowerValue xmi:type="uml:OpaqueExpression" xmi:id="_6dMVcNkeEeage7NIo_FkXg" name="OpaqueExpression2">
+          <language>C++</language>
+          <body>(N-1)/2</body>
+        </lowerValue>
+        <upperValue xmi:type="uml:OpaqueExpression" xmi:id="_6c0iANkeEeage7NIo_FkXg" name="OpaqueExpression1">
+          <language>C++</language>
+          <body>(N-1)/2</body>
+        </upperValue>
+      </ownedAttribute>
+      <ownedAttribute xmi:type="uml:Property" xmi:id="_QxdowNkfEeage7NIo_FkXg" name="N">
+        <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+        <defaultValue xmi:type="uml:OpaqueExpression" xmi:id="_FBMqQNkgEeage7NIo_FkXg">
+          <language>C++</language>
+          <body>2*A+B</body>
+        </defaultValue>
+      </ownedAttribute>
+      <ownedAttribute xmi:type="uml:Property" xmi:id="_z9vJQNkfEeage7NIo_FkXg" name="A">
+        <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+        <defaultValue xmi:type="uml:LiteralInteger" xmi:id="_AUzMkNkgEeage7NIo_FkXg" value="5"/>
+      </ownedAttribute>
+      <ownedAttribute xmi:type="uml:Property" xmi:id="_3IhDMNkfEeage7NIo_FkXg" name="B">
+        <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+        <defaultValue xmi:type="uml:LiteralInteger" xmi:id="_BoMuINkgEeage7NIo_FkXg" value="3"/>
+      </ownedAttribute>
+    </packagedElement>
+    <packagedElement xmi:type="uml:Class" xmi:id="_0CnesNkeEeage7NIo_FkXg" name="Capsule2" isActive="true">
+      <ownedAttribute xmi:type="uml:Port" xmi:id="_9LknQNkeEeage7NIo_FkXg" name="protocol1" visibility="public" type="_3KIpQNkeEeage7NIo_FkXg" isOrdered="true" aggregation="composite" isBehavior="true" isConjugated="true" isService="true">
+        <lowerValue xmi:type="uml:OpaqueExpression" xmi:id="_CboLoNkfEeage7NIo_FkXg" name="OpaqueExpression2">
+          <language>C++</language>
+          <body>M - 1</body>
+        </lowerValue>
+        <upperValue xmi:type="uml:OpaqueExpression" xmi:id="_CbRmUNkfEeage7NIo_FkXg" name="OpaqueExpression1">
+          <language>C++</language>
+          <body>M - 1</body>
+        </upperValue>
+      </ownedAttribute>
+      <ownedAttribute xmi:type="uml:Property" xmi:id="_S0lXENkfEeage7NIo_FkXg" name="M">
+        <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+        <defaultValue xmi:type="uml:OpaqueExpression" xmi:id="_wMtHoNkfEeage7NIo_FkXg">
+          <language>C++</language>
+          <body>L/2 - 1</body>
+        </defaultValue>
+      </ownedAttribute>
+      <ownedAttribute xmi:type="uml:Property" xmi:id="_gtSMQNkfEeage7NIo_FkXg" name="L">
+        <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+        <defaultValue xmi:type="uml:LiteralInteger" xmi:id="_s4xRsNkfEeage7NIo_FkXg" value="8"/>
+      </ownedAttribute>
+    </packagedElement>
+    <packagedElement xmi:type="uml:Package" xmi:id="_3KOv4NkeEeage7NIo_FkXg" name="Protocol1">
+      <packagedElement xmi:type="uml:Collaboration" xmi:id="_3KIpQNkeEeage7NIo_FkXg" name="Protocol1">
+        <interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_3KZH8NkeEeage7NIo_FkXg" client="_3KIpQNkeEeage7NIo_FkXg" supplier="_3KU2gNkeEeage7NIo_FkXg" contract="_3KU2gNkeEeage7NIo_FkXg"/>
+        <interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_3KkHENkeEeage7NIo_FkXg" client="_3KIpQNkeEeage7NIo_FkXg" supplier="_3KhDwNkeEeage7NIo_FkXg" contract="_3KhDwNkeEeage7NIo_FkXg"/>
+      </packagedElement>
+      <packagedElement xmi:type="uml:Interface" xmi:id="_3KU2gNkeEeage7NIo_FkXg" name="Protocol1"/>
+      <packagedElement xmi:type="uml:Interface" xmi:id="_3Ka9INkeEeage7NIo_FkXg" name="Protocol1~"/>
+      <packagedElement xmi:type="uml:Usage" xmi:id="_3KfOkNkeEeage7NIo_FkXg" client="_3KIpQNkeEeage7NIo_FkXg" supplier="_3Ka9INkeEeage7NIo_FkXg"/>
+      <packagedElement xmi:type="uml:AnyReceiveEvent" xmi:id="_3Kf1oNkeEeage7NIo_FkXg" name="*"/>
+      <packagedElement xmi:type="uml:Interface" xmi:id="_3KhDwNkeEeage7NIo_FkXg" name="Protocol1IO"/>
+      <packagedElement xmi:type="uml:Usage" xmi:id="_3KlVMNkeEeage7NIo_FkXg" client="_3KIpQNkeEeage7NIo_FkXg" supplier="_3KhDwNkeEeage7NIo_FkXg"/>
+    </packagedElement>
+    <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_nK0s4NkeEeage7NIo_FkXg">
+      <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_nK3JINkeEeage7NIo_FkXg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+        <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/umlrt#/"/>
+      </eAnnotations>
+      <appliedProfile xmi:type="uml:Profile" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_1h74oEeVEeO0lv5O1DTHOQ"/>
+    </profileApplication>
+    <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_o_P34NkeEeage7NIo_FkXg">
+      <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_o_Qe8NkeEeage7NIo_FkXg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+        <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/umlrt/cppproperties#/"/>
+      </eAnnotations>
+      <appliedProfile xmi:type="uml:Profile" href="pathmap://UMLRT_CPP/RTCppProperties.profile.uml#_vl5LALs8EeSTjNEQkASznQ"/>
+    </profileApplication>
+  </uml:Model>
+  <UMLRealTime:Capsule xmi:id="_qNpksNkeEeage7NIo_FkXg" base_Class="_qMg8QNkeEeage7NIo_FkXg"/>
+  <UMLRealTime:CapsulePart xmi:id="_x169oNkeEeage7NIo_FkXg" base_Property="_x1bOYNkeEeage7NIo_FkXg"/>
+  <UMLRealTime:Capsule xmi:id="_yGOqgNkeEeage7NIo_FkXg" base_Class="_yFu7QNkeEeage7NIo_FkXg"/>
+  <UMLRealTime:CapsulePart xmi:id="_z2Ih4NkeEeage7NIo_FkXg" base_Property="_z2EQcNkeEeage7NIo_FkXg"/>
+  <UMLRealTime:Capsule xmi:id="_0DCVcNkeEeage7NIo_FkXg" base_Class="_0CnesNkeEeage7NIo_FkXg"/>
+  <UMLRealTime:RTPort xmi:id="_275Y8NkeEeage7NIo_FkXg" isPublish="false" isWired="true" base_Port="_27wPANkeEeage7NIo_FkXg"/>
+  <UMLRealTime:ProtocolContainer xmi:id="_3KRzMNkeEeage7NIo_FkXg" base_Package="_3KOv4NkeEeage7NIo_FkXg"/>
+  <UMLRealTime:RTMessageSet xmi:id="_3KXSwNkeEeage7NIo_FkXg" base_Interface="_3KU2gNkeEeage7NIo_FkXg"/>
+  <UMLRealTime:RTMessageSet xmi:id="_3KeAcNkeEeage7NIo_FkXg" base_Interface="_3Ka9INkeEeage7NIo_FkXg" rtMsgKind="out"/>
+  <UMLRealTime:RTMessageSet xmi:id="_3Ki48NkeEeage7NIo_FkXg" base_Interface="_3KhDwNkeEeage7NIo_FkXg" rtMsgKind="inOut"/>
+  <UMLRealTime:Protocol xmi:id="_3Kl8QNkeEeage7NIo_FkXg" base_Collaboration="_3KIpQNkeEeage7NIo_FkXg"/>
+  <UMLRealTime:RTPort xmi:id="_9LoRoNkeEeage7NIo_FkXg" isPublish="false" isWired="true" base_Port="_9LknQNkeEeage7NIo_FkXg"/>
+  <UMLRealTime:RTConnector xmi:id="_F0ZeQNkfEeage7NIo_FkXg" base_Connector="_F0Wa8NkfEeage7NIo_FkXg"/>
+</xmi:XMI>
diff --git a/models/tests/codepattern/structure/SymbolicReplication4/expected_src/CMakeLists.txt b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/CMakeLists.txt
new file mode 100644
index 0000000..481a952
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/CMakeLists.txt
@@ -0,0 +1,36 @@
+# Generated 2017-01-16 12:56:28
+
+cmake_minimum_required(VERSION 2.8.7)
+set(TARGET TopMain)
+project(${TARGET})
+
+# require location of supporting RTS
+if (NOT UMLRTS_ROOT)
+  if (DEFINED ENV{UMLRTS_ROOT})
+    set(UMLRTS_ROOT $ENV{UMLRTS_ROOT})
+  else ()
+    set(UMLRTS_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/umlrt.rts)
+  endif ()
+endif ()
+
+# setup primary envars - provides tooling config
+include(${UMLRTS_ROOT}/build/buildenv.cmake)
+
+# model sources
+set(SRCS TopMain.cc Protocol1.cc Capsule1.cc Capsule2.cc Top.cc TopControllers.cc )
+
+# specify target
+add_executable(${TARGET} ${SRCS})
+
+# setup lib dependency support after defining TARGET
+include(${UMLRTS_ROOT}/build/rtslib.cmake)
+
+# compiler parameters
+set_target_properties(${TARGET} PROPERTIES COMPILE_OPTIONS "${COPTS}")
+set_target_properties(${TARGET} PROPERTIES COMPILE_DEFINITIONS "${CDEFS}")
+include_directories(${INCS})
+
+# linker parameters
+set_target_properties(${TARGET} PROPERTIES CMAKE_EXE_LINKER_FLAGS "${LOPTS}")
+target_link_libraries(${TARGET} ${LIBS})
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Capsule1.cc b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Capsule1.cc
new file mode 100644
index 0000000..6983d02
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Capsule1.cc
@@ -0,0 +1,95 @@
+
+#include "Capsule1.hh"
+
+#include <cstddef>
+#include "umlrtcapsuleclass.hh"
+#include "umlrtcommsportrole.hh"
+#include "umlrtframeservice.hh"
+#include "umlrtslot.hh"
+class UMLRTRtsInterface;
+struct UMLRTCommsPort;
+
+Capsule_Capsule1::Capsule_Capsule1( const UMLRTCapsuleClass * cd, UMLRTSlot * st, const UMLRTCommsPort * * border, const UMLRTCommsPort * * internal, bool isStat )
+: UMLRTCapsule( NULL, cd, st, border, internal, isStat )
+, protocol1( borderPorts[borderport_protocol1] )
+, N( 2*A+B )
+, A( 5 )
+, B( 3 )
+{
+}
+
+
+
+
+
+void Capsule_Capsule1::bindPort( bool isBorder, int portId, int index )
+{
+    if( isBorder )
+        switch( portId )
+        {
+        case borderport_protocol1:
+            UMLRTFrameService::sendBoundUnbound( borderPorts, borderport_protocol1, index, true );
+            break;
+        }
+}
+
+void Capsule_Capsule1::unbindPort( bool isBorder, int portId, int index )
+{
+    if( isBorder )
+        switch( portId )
+        {
+        case borderport_protocol1:
+            UMLRTFrameService::sendBoundUnbound( borderPorts, borderport_protocol1, index, false );
+            UMLRTFrameService::disconnectPort( borderPorts[borderport_protocol1], index );
+            break;
+        }
+}
+
+
+
+
+void Capsule_Capsule1::initialize( const UMLRTMessage & msg )
+{
+}
+
+void Capsule_Capsule1::inject( const UMLRTMessage & msg )
+{
+}
+
+
+static const UMLRTCommsPortRole portroles_border[] = 
+{
+    {
+        Capsule_Capsule1::port_protocol1,
+        "Protocol1",
+        "protocol1",
+        "",
+        6,
+        true,
+        false,
+        false,
+        false,
+        false,
+        false,
+        true
+    }
+};
+
+static void instantiate_Capsule1( const UMLRTRtsInterface * rts, UMLRTSlot * slot, const UMLRTCommsPort * * borderPorts )
+{
+    slot->capsule = new Capsule_Capsule1( &Capsule1, slot, borderPorts, NULL, false );
+}
+
+const UMLRTCapsuleClass Capsule1 = 
+{
+    "Capsule1",
+    NULL,
+    instantiate_Capsule1,
+    0,
+    NULL,
+    1,
+    portroles_border,
+    0,
+    NULL
+};
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Capsule1.hh b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Capsule1.hh
new file mode 100644
index 0000000..949d95a
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Capsule1.hh
@@ -0,0 +1,41 @@
+
+#ifndef CAPSULE1_HH
+#define CAPSULE1_HH
+
+#include "Protocol1.hh"
+#include "umlrtcapsule.hh"
+#include "umlrtcapsuleclass.hh"
+#include "umlrtmessage.hh"
+struct UMLRTCommsPort;
+struct UMLRTSlot;
+
+class Capsule_Capsule1 : public UMLRTCapsule
+{
+public:
+    Capsule_Capsule1( const UMLRTCapsuleClass * cd, UMLRTSlot * st, const UMLRTCommsPort * * border, const UMLRTCommsPort * * internal, bool isStat );
+protected:
+    Protocol1::Base protocol1;
+public:
+    enum BorderPortId
+    {
+        borderport_protocol1
+    };
+    enum PartId
+    {
+    };
+    enum PortId
+    {
+        port_protocol1
+    };
+    virtual void bindPort( bool isBorder, int portId, int index );
+    virtual void unbindPort( bool isBorder, int portId, int index );
+    int N;
+    int A;
+    int B;
+    virtual void initialize( const UMLRTMessage & msg );
+    virtual void inject( const UMLRTMessage & msg );
+};
+extern const UMLRTCapsuleClass Capsule1;
+
+#endif
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Capsule2.cc b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Capsule2.cc
new file mode 100644
index 0000000..d254432
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Capsule2.cc
@@ -0,0 +1,93 @@
+
+#include "Capsule2.hh"
+
+#include <cstddef>
+#include "umlrtcapsuleclass.hh"
+#include "umlrtcommsportrole.hh"
+#include "umlrtframeservice.hh"
+#include "umlrtslot.hh"
+class UMLRTRtsInterface;
+struct UMLRTCommsPort;
+
+Capsule_Capsule2::Capsule_Capsule2( const UMLRTCapsuleClass * cd, UMLRTSlot * st, const UMLRTCommsPort * * border, const UMLRTCommsPort * * internal, bool isStat )
+: UMLRTCapsule( NULL, cd, st, border, internal, isStat )
+, protocol1( borderPorts[borderport_protocol1] )
+, M( L/2 - 1 )
+, L( 8 )
+{
+}
+
+
+
+
+
+void Capsule_Capsule2::bindPort( bool isBorder, int portId, int index )
+{
+    if( isBorder )
+        switch( portId )
+        {
+        case borderport_protocol1:
+            UMLRTFrameService::sendBoundUnbound( borderPorts, borderport_protocol1, index, true );
+            break;
+        }
+}
+
+void Capsule_Capsule2::unbindPort( bool isBorder, int portId, int index )
+{
+    if( isBorder )
+        switch( portId )
+        {
+        case borderport_protocol1:
+            UMLRTFrameService::sendBoundUnbound( borderPorts, borderport_protocol1, index, false );
+            UMLRTFrameService::disconnectPort( borderPorts[borderport_protocol1], index );
+            break;
+        }
+}
+
+
+
+void Capsule_Capsule2::initialize( const UMLRTMessage & msg )
+{
+}
+
+void Capsule_Capsule2::inject( const UMLRTMessage & msg )
+{
+}
+
+
+static const UMLRTCommsPortRole portroles_border[] = 
+{
+    {
+        Capsule_Capsule2::port_protocol1,
+        "Protocol1",
+        "protocol1",
+        "",
+        2,
+        true,
+        true,
+        false,
+        false,
+        false,
+        false,
+        true
+    }
+};
+
+static void instantiate_Capsule2( const UMLRTRtsInterface * rts, UMLRTSlot * slot, const UMLRTCommsPort * * borderPorts )
+{
+    slot->capsule = new Capsule_Capsule2( &Capsule2, slot, borderPorts, NULL, false );
+}
+
+const UMLRTCapsuleClass Capsule2 = 
+{
+    "Capsule2",
+    NULL,
+    instantiate_Capsule2,
+    0,
+    NULL,
+    1,
+    portroles_border,
+    0,
+    NULL
+};
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Capsule2.hh b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Capsule2.hh
new file mode 100644
index 0000000..518f23e
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Capsule2.hh
@@ -0,0 +1,40 @@
+
+#ifndef CAPSULE2_HH
+#define CAPSULE2_HH
+
+#include "Protocol1.hh"
+#include "umlrtcapsule.hh"
+#include "umlrtcapsuleclass.hh"
+#include "umlrtmessage.hh"
+struct UMLRTCommsPort;
+struct UMLRTSlot;
+
+class Capsule_Capsule2 : public UMLRTCapsule
+{
+public:
+    Capsule_Capsule2( const UMLRTCapsuleClass * cd, UMLRTSlot * st, const UMLRTCommsPort * * border, const UMLRTCommsPort * * internal, bool isStat );
+protected:
+    Protocol1::Conj protocol1;
+public:
+    enum BorderPortId
+    {
+        borderport_protocol1
+    };
+    enum PartId
+    {
+    };
+    enum PortId
+    {
+        port_protocol1
+    };
+    virtual void bindPort( bool isBorder, int portId, int index );
+    virtual void unbindPort( bool isBorder, int portId, int index );
+    int M;
+    int L;
+    virtual void initialize( const UMLRTMessage & msg );
+    virtual void inject( const UMLRTMessage & msg );
+};
+extern const UMLRTCapsuleClass Capsule2;
+
+#endif
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Makefile b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Makefile
new file mode 100644
index 0000000..0bcbd22
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Makefile
@@ -0,0 +1,11 @@
+##################################################
+# Default makefile
+# Redirect make to target makefile
+##################################################
+
+all:
+	make -f MakefileTop.mk all
+clean:
+	make -f MakefileTop.mk clean
+.PHONY: 
+	make -f MakefileTop.mk all clean
diff --git a/models/tests/codepattern/structure/SymbolicReplication4/expected_src/MakefileTop.mk b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/MakefileTop.mk
new file mode 100644
index 0000000..5cbedfb
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/MakefileTop.mk
@@ -0,0 +1,49 @@
+# set default value for TARGETOS if is it not defined
+ifeq ($(TARGETOS), )
+$(warning warning: TARGETOS not defined. Choosing linux)
+TARGETOS=linux
+endif
+
+# set default value for BUILDTOOLS if is it not defined
+ifeq ($(BUILDTOOLS), )
+$(warning warning: BUILDTOOLS not defined. Choosing x86-gcc-4.6.3)
+BUILDTOOLS=x86-gcc-4.6.3
+endif
+
+# Location of RTS root.
+UMLRTS_ROOT ?= ./umlrt.rts
+
+CONFIG=$(TARGETOS).$(BUILDTOOLS)
+
+# Destination directory for the RTS services library.
+LIBDEST=$(UMLRTS_ROOT)/lib/$(CONFIG)
+
+include $(UMLRTS_ROOT)/build/host/host.mk
+include $(UMLRTS_ROOT)/build/buildtools/$(BUILDTOOLS)/buildtools.mk
+
+LD_PATHS=$(LIBDEST)
+CC_INCLUDES+=$(UMLRTS_ROOT)/include
+
+CC_DEFINES:=$(foreach d, $(CC_DEFINES), $(CC_DEF)$d)
+CC_INCLUDES:=$(foreach i, $(CC_INCLUDES), $(CC_INC)$i)
+LD_LIBS:=$(foreach i, $(LD_LIBS), $(LD_LIB)$i)
+LD_PATHS:=$(foreach i, $(LD_PATHS), $(LD_LIBPATH)$i)
+
+SRCS = TopMain.cc Protocol1.cc Capsule1.cc Capsule2.cc Top.cc TopControllers.cc 
+OBJS = $(subst $(CC_EXT),$(OBJ_EXT),$(SRCS))
+
+MAIN = TopMain$(EXE_EXT)
+
+all: $(MAIN)
+
+$(MAIN): $(OBJS) $(UMLRTS_ROOT)/lib/$(CONFIG)/$(LIB_PRFX)rts$(LIB_EXT)
+	$(LD) $(LD_FLAGS) $(OBJS) $(LD_PATHS) $(LD_LIBS) $(LD_OUT)$@
+
+%$(OBJ_EXT) : %$(CC_EXT)
+	$(CC) $< $(CC_FLAGS) $(CC_DEFINES) $(CC_INCLUDES) $(CC_OUT)$@
+
+clean :
+	@echo $(RM) main$(EXE_EXT) *$(OBJ_EXT) *$(DEP_EXT) $(DBG_FILES)
+	@$(RM) main$(EXE_EXT) *$(OBJ_EXT) *$(DEP_EXT) $(DBG_FILES)
+
+.PHONY: all clean
diff --git a/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Protocol1.cc b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Protocol1.cc
new file mode 100644
index 0000000..08595db
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Protocol1.cc
@@ -0,0 +1,16 @@
+
+#include "Protocol1.hh"
+
+struct UMLRTCommsPort;
+
+Protocol1::Base::Base( const UMLRTCommsPort * & srcPort )
+: UMLRTProtocol( srcPort )
+{
+}
+
+Protocol1::Conj::Conj( const UMLRTCommsPort * & srcPort )
+: UMLRTProtocol( srcPort )
+{
+}
+
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Protocol1.hh b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Protocol1.hh
new file mode 100644
index 0000000..f917c8f
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Protocol1.hh
@@ -0,0 +1,23 @@
+
+#ifndef PROTOCOL1_HH
+#define PROTOCOL1_HH
+
+#include "umlrtprotocol.hh"
+struct UMLRTCommsPort;
+
+namespace Protocol1
+{
+    class Base : public UMLRTProtocol
+    {
+    public:
+        Base( const UMLRTCommsPort * & srcPort );
+    };
+    class Conj : public UMLRTProtocol
+    {
+    public:
+        Conj( const UMLRTCommsPort * & srcPort );
+    };
+};
+
+#endif
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Top-connections.log b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Top-connections.log
new file mode 100644
index 0000000..37217ec
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Top-connections.log
@@ -0,0 +1,7 @@
+Top.RTConnector1
+    Top.capsule1#protocol1.far[0] <-> Top.capsule2[0]#protocol1.far[0]
+    Top.capsule1#protocol1.far[1] <-> Top.capsule2[0]#protocol1.far[1]
+    Top.capsule1#protocol1.far[2] <-> Top.capsule2[1]#protocol1.far[0]
+    Top.capsule1#protocol1.far[3] <-> Top.capsule2[1]#protocol1.far[1]
+    Top.capsule1#protocol1.far[4] <-> Top.capsule2[2]#protocol1.far[0]
+    Top.capsule1#protocol1.far[5] <-> Top.capsule2[2]#protocol1.far[1]
diff --git a/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Top.cc b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Top.cc
new file mode 100644
index 0000000..20d9ced
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Top.cc
@@ -0,0 +1,93 @@
+
+#include "Top.hh"
+
+#include "Capsule1.hh"
+#include "Capsule2.hh"
+#include "umlrtcapsuleclass.hh"
+#include "umlrtcapsulepart.hh"
+#include "umlrtslot.hh"
+#include <cstddef>
+#include "umlrtcapsulerole.hh"
+#include "umlrtcommsport.hh"
+#include "umlrtframeservice.hh"
+class UMLRTRtsInterface;
+
+Capsule_Top::Capsule_Top( const UMLRTCapsuleClass * cd, UMLRTSlot * st, const UMLRTCommsPort * * border, const UMLRTCommsPort * * internal, bool isStat )
+: UMLRTCapsule( NULL, cd, st, border, internal, isStat )
+, capsule1( &slot->parts[part_capsule1] )
+, capsule2( &slot->parts[part_capsule2] )
+, K( 2 )
+, M( 4 )
+{
+}
+
+
+
+
+void Capsule_Top::bindPort( bool isBorder, int portId, int index )
+{
+}
+
+void Capsule_Top::unbindPort( bool isBorder, int portId, int index )
+{
+}
+
+
+
+void Capsule_Top::initialize( const UMLRTMessage & msg )
+{
+}
+
+void Capsule_Top::inject( const UMLRTMessage & msg )
+{
+}
+
+
+static const UMLRTCapsuleRole roles[] = 
+{
+    {
+        "capsule1",
+        &Capsule1,
+        1,
+        1,
+        false,
+        false
+    },
+    {
+        "capsule2",
+        &Capsule2,
+        3,
+        3,
+        false,
+        false
+    }
+};
+
+static void instantiate_Top( const UMLRTRtsInterface * rts, UMLRTSlot * slot, const UMLRTCommsPort * * borderPorts )
+{
+    UMLRTFrameService::connectPorts( &slot->parts[Capsule_Top::part_capsule1].slots[0]->ports[Capsule_Capsule1::borderport_protocol1], 0, &slot->parts[Capsule_Top::part_capsule2].slots[0]->ports[Capsule_Capsule2::borderport_protocol1], 0 );
+    UMLRTFrameService::connectPorts( &slot->parts[Capsule_Top::part_capsule1].slots[0]->ports[Capsule_Capsule1::borderport_protocol1], 1, &slot->parts[Capsule_Top::part_capsule2].slots[0]->ports[Capsule_Capsule2::borderport_protocol1], 1 );
+    UMLRTFrameService::connectPorts( &slot->parts[Capsule_Top::part_capsule1].slots[0]->ports[Capsule_Capsule1::borderport_protocol1], 2, &slot->parts[Capsule_Top::part_capsule2].slots[1]->ports[Capsule_Capsule2::borderport_protocol1], 0 );
+    UMLRTFrameService::connectPorts( &slot->parts[Capsule_Top::part_capsule1].slots[0]->ports[Capsule_Capsule1::borderport_protocol1], 3, &slot->parts[Capsule_Top::part_capsule2].slots[1]->ports[Capsule_Capsule2::borderport_protocol1], 1 );
+    UMLRTFrameService::connectPorts( &slot->parts[Capsule_Top::part_capsule1].slots[0]->ports[Capsule_Capsule1::borderport_protocol1], 4, &slot->parts[Capsule_Top::part_capsule2].slots[2]->ports[Capsule_Capsule2::borderport_protocol1], 0 );
+    UMLRTFrameService::connectPorts( &slot->parts[Capsule_Top::part_capsule1].slots[0]->ports[Capsule_Capsule1::borderport_protocol1], 5, &slot->parts[Capsule_Top::part_capsule2].slots[2]->ports[Capsule_Capsule2::borderport_protocol1], 1 );
+    Capsule1.instantiate( NULL, slot->parts[Capsule_Top::part_capsule1].slots[0], UMLRTFrameService::createBorderPorts( slot->parts[Capsule_Top::part_capsule1].slots[0], Capsule1.numPortRolesBorder ) );
+    Capsule2.instantiate( NULL, slot->parts[Capsule_Top::part_capsule2].slots[0], UMLRTFrameService::createBorderPorts( slot->parts[Capsule_Top::part_capsule2].slots[0], Capsule2.numPortRolesBorder ) );
+    Capsule2.instantiate( NULL, slot->parts[Capsule_Top::part_capsule2].slots[1], UMLRTFrameService::createBorderPorts( slot->parts[Capsule_Top::part_capsule2].slots[1], Capsule2.numPortRolesBorder ) );
+    Capsule2.instantiate( NULL, slot->parts[Capsule_Top::part_capsule2].slots[2], UMLRTFrameService::createBorderPorts( slot->parts[Capsule_Top::part_capsule2].slots[2], Capsule2.numPortRolesBorder ) );
+    slot->capsule = new Capsule_Top( &Top, slot, borderPorts, NULL, false );
+}
+
+const UMLRTCapsuleClass Top = 
+{
+    "Top",
+    NULL,
+    instantiate_Top,
+    2,
+    roles,
+    0,
+    NULL,
+    0,
+    NULL
+};
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Top.hh b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Top.hh
new file mode 100644
index 0000000..d5f2676
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/Top.hh
@@ -0,0 +1,35 @@
+
+#ifndef TOP_HH
+#define TOP_HH
+
+#include "umlrtcapsule.hh"
+#include "umlrtcapsuleclass.hh"
+#include "umlrtmessage.hh"
+struct UMLRTCapsulePart;
+struct UMLRTCommsPort;
+struct UMLRTSlot;
+
+class Capsule_Top : public UMLRTCapsule
+{
+public:
+    Capsule_Top( const UMLRTCapsuleClass * cd, UMLRTSlot * st, const UMLRTCommsPort * * border, const UMLRTCommsPort * * internal, bool isStat );
+    enum PartId
+    {
+        part_capsule1,
+        part_capsule2
+    };
+protected:
+    const UMLRTCapsulePart * const capsule1;
+    const UMLRTCapsulePart * const capsule2;
+public:
+    virtual void bindPort( bool isBorder, int portId, int index );
+    virtual void unbindPort( bool isBorder, int portId, int index );
+    int K;
+    int M;
+    virtual void initialize( const UMLRTMessage & msg );
+    virtual void inject( const UMLRTMessage & msg );
+};
+extern const UMLRTCapsuleClass Top;
+
+#endif
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication4/expected_src/TopControllers.cc b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/TopControllers.cc
new file mode 100644
index 0000000..427c0ff
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/TopControllers.cc
@@ -0,0 +1,321 @@
+
+#include "TopControllers.hh"
+
+#include "Capsule1.hh"
+#include "Capsule2.hh"
+#include "Top.hh"
+#include "umlrtcapsuleclass.hh"
+#include "umlrtcapsulepart.hh"
+#include "umlrtcommsport.hh"
+#include "umlrtcommsportfarend.hh"
+#include "umlrtcontroller.hh"
+#include "umlrtslot.hh"
+#include <cstddef>
+
+
+static UMLRTController DefaultController_( "DefaultController" );
+
+UMLRTController * DefaultController = &DefaultController_;
+
+static Capsule_Top top( &Top, &Top_slots[InstId_Top], NULL, NULL, true );
+
+static UMLRTSlot * slots_Top[] = 
+{
+    &Top_slots[InstId_Top_capsule1],
+    &Top_slots[InstId_Top_capsule2_0],
+    &Top_slots[InstId_Top_capsule2_1],
+    &Top_slots[InstId_Top_capsule2_2]
+};
+
+static UMLRTCapsulePart parts_Top[] = 
+{
+    {
+        &Top,
+        Capsule_Top::part_capsule1,
+        1,
+        &slots_Top[0]
+    },
+    {
+        &Top,
+        Capsule_Top::part_capsule2,
+        3,
+        &slots_Top[1]
+    }
+};
+
+static UMLRTCommsPortFarEnd borderfarEndList_Top_capsule1[] = 
+{
+    {
+        0,
+        &borderports_Top_capsule2_0[Capsule_Capsule2::borderport_protocol1]
+    },
+    {
+        1,
+        &borderports_Top_capsule2_0[Capsule_Capsule2::borderport_protocol1]
+    },
+    {
+        0,
+        &borderports_Top_capsule2_1[Capsule_Capsule2::borderport_protocol1]
+    },
+    {
+        1,
+        &borderports_Top_capsule2_1[Capsule_Capsule2::borderport_protocol1]
+    },
+    {
+        0,
+        &borderports_Top_capsule2_2[Capsule_Capsule2::borderport_protocol1]
+    },
+    {
+        1,
+        &borderports_Top_capsule2_2[Capsule_Capsule2::borderport_protocol1]
+    }
+};
+
+UMLRTCommsPort borderports_Top_capsule1[] = 
+{
+    {
+        &Capsule1,
+        Capsule_Capsule1::borderport_protocol1,
+        &Top_slots[InstId_Top_capsule1],
+        6,
+        borderfarEndList_Top_capsule1,
+        NULL,
+        NULL,
+        "",
+        true,
+        true,
+        true,
+        false,
+        false,
+        false,
+        false,
+        false,
+        false,
+        false,
+        true
+    }
+};
+
+static const UMLRTCommsPort * borderports_Top_capsule1_ptrs[] = 
+{
+    &borderports_Top_capsule1[0]
+};
+
+static Capsule_Capsule1 top_capsule1( &Capsule1, &Top_slots[InstId_Top_capsule1], borderports_Top_capsule1_ptrs, NULL, true );
+
+static UMLRTCommsPortFarEnd borderfarEndList_Top_capsule2_0[] = 
+{
+    {
+        0,
+        &borderports_Top_capsule1[Capsule_Capsule1::borderport_protocol1]
+    },
+    {
+        1,
+        &borderports_Top_capsule1[Capsule_Capsule1::borderport_protocol1]
+    }
+};
+
+UMLRTCommsPort borderports_Top_capsule2_0[] = 
+{
+    {
+        &Capsule2,
+        Capsule_Capsule2::borderport_protocol1,
+        &Top_slots[InstId_Top_capsule2_0],
+        2,
+        borderfarEndList_Top_capsule2_0,
+        NULL,
+        NULL,
+        "",
+        true,
+        true,
+        true,
+        false,
+        false,
+        false,
+        false,
+        false,
+        false,
+        false,
+        true
+    }
+};
+
+static const UMLRTCommsPort * borderports_Top_capsule2_0_ptrs[] = 
+{
+    &borderports_Top_capsule2_0[0]
+};
+
+static Capsule_Capsule2 top_capsule2_0( &Capsule2, &Top_slots[InstId_Top_capsule2_0], borderports_Top_capsule2_0_ptrs, NULL, true );
+
+static UMLRTCommsPortFarEnd borderfarEndList_Top_capsule2_1[] = 
+{
+    {
+        2,
+        &borderports_Top_capsule1[Capsule_Capsule1::borderport_protocol1]
+    },
+    {
+        3,
+        &borderports_Top_capsule1[Capsule_Capsule1::borderport_protocol1]
+    }
+};
+
+UMLRTCommsPort borderports_Top_capsule2_1[] = 
+{
+    {
+        &Capsule2,
+        Capsule_Capsule2::borderport_protocol1,
+        &Top_slots[InstId_Top_capsule2_1],
+        2,
+        borderfarEndList_Top_capsule2_1,
+        NULL,
+        NULL,
+        "",
+        true,
+        true,
+        true,
+        false,
+        false,
+        false,
+        false,
+        false,
+        false,
+        false,
+        true
+    }
+};
+
+static const UMLRTCommsPort * borderports_Top_capsule2_1_ptrs[] = 
+{
+    &borderports_Top_capsule2_1[0]
+};
+
+static Capsule_Capsule2 top_capsule2_1( &Capsule2, &Top_slots[InstId_Top_capsule2_1], borderports_Top_capsule2_1_ptrs, NULL, true );
+
+static UMLRTCommsPortFarEnd borderfarEndList_Top_capsule2_2[] = 
+{
+    {
+        4,
+        &borderports_Top_capsule1[Capsule_Capsule1::borderport_protocol1]
+    },
+    {
+        5,
+        &borderports_Top_capsule1[Capsule_Capsule1::borderport_protocol1]
+    }
+};
+
+UMLRTCommsPort borderports_Top_capsule2_2[] = 
+{
+    {
+        &Capsule2,
+        Capsule_Capsule2::borderport_protocol1,
+        &Top_slots[InstId_Top_capsule2_2],
+        2,
+        borderfarEndList_Top_capsule2_2,
+        NULL,
+        NULL,
+        "",
+        true,
+        true,
+        true,
+        false,
+        false,
+        false,
+        false,
+        false,
+        false,
+        false,
+        true
+    }
+};
+
+static const UMLRTCommsPort * borderports_Top_capsule2_2_ptrs[] = 
+{
+    &borderports_Top_capsule2_2[0]
+};
+
+static Capsule_Capsule2 top_capsule2_2( &Capsule2, &Top_slots[InstId_Top_capsule2_2], borderports_Top_capsule2_2_ptrs, NULL, true );
+
+UMLRTSlot Top_slots[] = 
+{
+    {
+        "Top",
+        0,
+        &Top,
+        NULL,
+        0,
+        &top,
+        &DefaultController_,
+        2,
+        parts_Top,
+        0,
+        NULL,
+        NULL,
+        true,
+        false
+    },
+    {
+        "Top.capsule1",
+        0,
+        &Capsule1,
+        &Top,
+        Capsule_Top::part_capsule1,
+        &top_capsule1,
+        &DefaultController_,
+        0,
+        NULL,
+        1,
+        borderports_Top_capsule1,
+        NULL,
+        true,
+        false
+    },
+    {
+        "Top.capsule2[0]",
+        0,
+        &Capsule2,
+        &Top,
+        Capsule_Top::part_capsule2,
+        &top_capsule2_0,
+        &DefaultController_,
+        0,
+        NULL,
+        1,
+        borderports_Top_capsule2_0,
+        NULL,
+        true,
+        false
+    },
+    {
+        "Top.capsule2[1]",
+        1,
+        &Capsule2,
+        &Top,
+        Capsule_Top::part_capsule2,
+        &top_capsule2_1,
+        &DefaultController_,
+        0,
+        NULL,
+        1,
+        borderports_Top_capsule2_1,
+        NULL,
+        true,
+        false
+    },
+    {
+        "Top.capsule2[2]",
+        2,
+        &Capsule2,
+        &Top,
+        Capsule_Top::part_capsule2,
+        &top_capsule2_2,
+        &DefaultController_,
+        0,
+        NULL,
+        1,
+        borderports_Top_capsule2_2,
+        NULL,
+        true,
+        false
+    }
+};
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication4/expected_src/TopControllers.hh b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/TopControllers.hh
new file mode 100644
index 0000000..1a4533d
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/TopControllers.hh
@@ -0,0 +1,25 @@
+
+#ifndef TOPCONTROLLERS_HH
+#define TOPCONTROLLERS_HH
+
+class UMLRTController;
+struct UMLRTCommsPort;
+struct UMLRTSlot;
+
+enum CapsuleInstanceId
+{
+    InstId_Top,
+    InstId_Top_capsule1,
+    InstId_Top_capsule2_0,
+    InstId_Top_capsule2_1,
+    InstId_Top_capsule2_2
+};
+extern UMLRTController * DefaultController;
+extern UMLRTCommsPort borderports_Top_capsule1[];
+extern UMLRTCommsPort borderports_Top_capsule2_0[];
+extern UMLRTCommsPort borderports_Top_capsule2_1[];
+extern UMLRTCommsPort borderports_Top_capsule2_2[];
+extern UMLRTSlot Top_slots[];
+
+#endif
+
diff --git a/models/tests/codepattern/structure/SymbolicReplication4/expected_src/TopMain.cc b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/TopMain.cc
new file mode 100644
index 0000000..0684f69
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication4/expected_src/TopMain.cc
@@ -0,0 +1,38 @@
+#include "umlrtmain.hh"
+
+#include "umlrtcontroller.hh"
+#include "TopControllers.hh"
+#include "umlrtcapsuletocontrollermap.hh"
+#include "umlrtmessagepool.hh"
+#include "umlrtsignalelementpool.hh"
+#include "umlrttimerpool.hh"
+#include "umlrtuserconfig.hh"
+#include <stdio.h>
+
+static UMLRTSignalElement signalElementBuffer[USER_CONFIG_SIGNAL_ELEMENT_POOL_SIZE];
+static UMLRTSignalElementPool signalElementPool( signalElementBuffer, USER_CONFIG_SIGNAL_ELEMENT_POOL_SIZE );
+
+static UMLRTMessage messageBuffer[USER_CONFIG_MESSAGE_POOL_SIZE];
+static UMLRTMessagePool messagePool( messageBuffer, USER_CONFIG_MESSAGE_POOL_SIZE );
+
+static UMLRTTimer timers[USER_CONFIG_TIMER_POOL_SIZE];
+static UMLRTTimerPool timerPool( timers, USER_CONFIG_TIMER_POOL_SIZE );
+
+int main( int argc, char * argv[] )
+{
+    UMLRTController::initializePools( &signalElementPool, &messagePool, &timerPool );
+    UMLRTMain::setArgs( argc, argv );
+    UMLRTCapsuleToControllerMap::setDefaultSlotList( Top_slots, 5 );
+
+    if( ! UMLRTMain::targetStartup() )
+        return EXIT_FAILURE;
+
+    DefaultController->spawn();
+
+    if( ! UMLRTMain::mainLoop() )
+        return UMLRTMain::targetShutdown( false );
+
+    DefaultController->join();
+
+    return UMLRTMain::targetShutdown( true );
+}
diff --git a/models/tests/codepattern/structure/SymbolicReplication5/.project b/models/tests/codepattern/structure/SymbolicReplication5/.project
new file mode 100644
index 0000000..6e83539
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication5/.project
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>SymbolicReplication5</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+	</natures>
+</projectDescription>
diff --git a/models/tests/codepattern/structure/SymbolicReplication5/SymbolicReplication5.di b/models/tests/codepattern/structure/SymbolicReplication5/SymbolicReplication5.di
new file mode 100644
index 0000000..bf9abab
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication5/SymbolicReplication5.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/models/tests/codepattern/structure/SymbolicReplication5/SymbolicReplication5.notation b/models/tests/codepattern/structure/SymbolicReplication5/SymbolicReplication5.notation
new file mode 100644
index 0000000..1d6ce9a
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication5/SymbolicReplication5.notation
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_AkFkUNwWEea4U8QYPMCJHw" type="CompositeStructure" measurementUnit="Pixel">
+  <children xmi:type="notation:Shape" xmi:id="_AkIAkNwWEea4U8QYPMCJHw" type="Class_Shape">
+    <children xmi:type="notation:DecorationNode" xmi:id="_AkJ1wNwWEea4U8QYPMCJHw" type="Class_NameLabel"/>
+    <children xmi:type="notation:DecorationNode" xmi:id="_AkJ1wdwWEea4U8QYPMCJHw" type="Class_FloatingNameLabel">
+      <layoutConstraint xmi:type="notation:Location" xmi:id="_AkJ1wtwWEea4U8QYPMCJHw" y="5"/>
+    </children>
+    <children xmi:type="notation:BasicCompartment" xmi:id="_AkKc0NwWEea4U8QYPMCJHw" type="Class_StructureCompartment">
+      <styles xmi:type="notation:TitleStyle" xmi:id="_AkKc0dwWEea4U8QYPMCJHw"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_AkKc0twWEea4U8QYPMCJHw"/>
+    </children>
+    <element xmi:type="uml:Class" href="SymbolicReplication5.uml#_AitEQNwWEea4U8QYPMCJHw"/>
+    <layoutConstraint xmi:type="notation:Bounds" xmi:id="_AkIAkdwWEea4U8QYPMCJHw" x="40" y="40" width="500" height="250"/>
+  </children>
+  <styles xmi:type="notation:StringValueStyle" xmi:id="_AkFkUdwWEea4U8QYPMCJHw" name="diagram_compatibility_version" stringValue="1.2.0"/>
+  <styles xmi:type="notation:DiagramStyle" xmi:id="_AkFkUtwWEea4U8QYPMCJHw"/>
+  <styles xmi:type="style:PapyrusViewStyle" xmi:id="_AkFkU9wWEea4U8QYPMCJHw">
+    <owner xmi:type="uml:Class" href="SymbolicReplication5.uml#_AitEQNwWEea4U8QYPMCJHw"/>
+    <configuration xmi:type="configuration:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/configuration/UMLRT.configuration#_Z79eQHcZEeSnWeKqQOfW2A"/>
+  </styles>
+  <element xmi:type="uml:Class" href="SymbolicReplication5.uml#_AitEQNwWEea4U8QYPMCJHw"/>
+</notation:Diagram>
diff --git a/models/tests/codepattern/structure/SymbolicReplication5/SymbolicReplication5.uml b/models/tests/codepattern/structure/SymbolicReplication5/SymbolicReplication5.uml
new file mode 100644
index 0000000..74eb347
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication5/SymbolicReplication5.uml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:UMLRealTime="http://www.eclipse.org/papyrus/umlrt" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+  <uml:Model xmi:id="_-QZDYNwVEea4U8QYPMCJHw" name="SymbolicReplication5">
+    <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="__zE-INwVEea4U8QYPMCJHw" source="http://www.eclipse.org/papyrus-rt/language/1.0.0">
+      <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="__zGMQNwVEea4U8QYPMCJHw" key="language" value="umlrt-cpp"/>
+    </eAnnotations>
+    <packagedElement xmi:type="uml:Class" xmi:id="_AitEQNwWEea4U8QYPMCJHw" name="Top" isActive="true">
+      <ownedAttribute xmi:type="uml:Port" xmi:id="_T-wNQNwWEea4U8QYPMCJHw" name="protocol1" visibility="public" type="_VEP1sNwWEea4U8QYPMCJHw" isOrdered="true" aggregation="composite" isBehavior="true" isService="true">
+        <lowerValue xmi:type="uml:OpaqueExpression" xmi:id="_XtKYsNwWEea4U8QYPMCJHw" name="OpaqueExpression2">
+          <language>C++</language>
+          <body>(SymbolicReplication4::Capsule1::N - 1)/3 + 1</body>
+        </lowerValue>
+        <upperValue xmi:type="uml:OpaqueExpression" xmi:id="_XsuT0NwWEea4U8QYPMCJHw" name="OpaqueExpression1">
+          <language>C++</language>
+          <body>(SymbolicReplication4::Capsule1::N - 1)/3 + 1</body>
+        </upperValue>
+      </ownedAttribute>
+    </packagedElement>
+    <packagedElement xmi:type="uml:Package" xmi:id="_VEVVQNwWEea4U8QYPMCJHw" name="Protocol1">
+      <packagedElement xmi:type="uml:Collaboration" xmi:id="_VEP1sNwWEea4U8QYPMCJHw" name="Protocol1">
+        <interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_VEcqANwWEea4U8QYPMCJHw" client="_VEP1sNwWEea4U8QYPMCJHw" supplier="_VEZmsNwWEea4U8QYPMCJHw" contract="_VEZmsNwWEea4U8QYPMCJHw"/>
+        <interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_VEmbANwWEea4U8QYPMCJHw" client="_VEP1sNwWEea4U8QYPMCJHw" supplier="_VEiwoNwWEea4U8QYPMCJHw" contract="_VEiwoNwWEea4U8QYPMCJHw"/>
+      </packagedElement>
+      <packagedElement xmi:type="uml:Interface" xmi:id="_VEZmsNwWEea4U8QYPMCJHw" name="Protocol1"/>
+      <packagedElement xmi:type="uml:Interface" xmi:id="_VEefMNwWEea4U8QYPMCJHw" name="Protocol1~"/>
+      <packagedElement xmi:type="uml:Usage" xmi:id="_VEhigNwWEea4U8QYPMCJHw" client="_VEP1sNwWEea4U8QYPMCJHw" supplier="_VEefMNwWEea4U8QYPMCJHw"/>
+      <packagedElement xmi:type="uml:AnyReceiveEvent" xmi:id="_VEiJkNwWEea4U8QYPMCJHw" name="*"/>
+      <packagedElement xmi:type="uml:Interface" xmi:id="_VEiwoNwWEea4U8QYPMCJHw" name="Protocol1IO"/>
+      <packagedElement xmi:type="uml:Usage" xmi:id="_VEnpINwWEea4U8QYPMCJHw" client="_VEP1sNwWEea4U8QYPMCJHw" supplier="_VEiwoNwWEea4U8QYPMCJHw"/>
+    </packagedElement>
+    <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_-Q9EENwVEea4U8QYPMCJHw">
+      <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_-Q_gUNwVEea4U8QYPMCJHw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+        <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/umlrt#/"/>
+      </eAnnotations>
+      <appliedProfile xmi:type="uml:Profile" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_1h74oEeVEeO0lv5O1DTHOQ"/>
+    </profileApplication>
+    <profileApplication xmi:type="uml:ProfileApplication" xmi:id="__0tV0NwVEea4U8QYPMCJHw">
+      <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="__0t84NwVEea4U8QYPMCJHw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+        <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/umlrt/cppproperties#/"/>
+      </eAnnotations>
+      <appliedProfile xmi:type="uml:Profile" href="pathmap://UMLRT_CPP/RTCppProperties.profile.uml#_vl5LALs8EeSTjNEQkASznQ"/>
+    </profileApplication>
+  </uml:Model>
+  <UMLRealTime:Capsule xmi:id="_AkNgINwWEea4U8QYPMCJHw" base_Class="_AitEQNwWEea4U8QYPMCJHw"/>
+  <UMLRealTime:RTPort xmi:id="_T_ChINwWEea4U8QYPMCJHw" isPublish="false" isWired="true" base_Port="_T-wNQNwWEea4U8QYPMCJHw"/>
+  <UMLRealTime:ProtocolContainer xmi:id="_VEXKcNwWEea4U8QYPMCJHw" base_Package="_VEVVQNwWEea4U8QYPMCJHw"/>
+  <UMLRealTime:RTMessageSet xmi:id="_VEbb4NwWEea4U8QYPMCJHw" base_Interface="_VEZmsNwWEea4U8QYPMCJHw"/>
+  <UMLRealTime:RTMessageSet xmi:id="_VEgUYNwWEea4U8QYPMCJHw" base_Interface="_VEefMNwWEea4U8QYPMCJHw" rtMsgKind="out"/>
+  <UMLRealTime:RTMessageSet xmi:id="_VElM4NwWEea4U8QYPMCJHw" base_Interface="_VEiwoNwWEea4U8QYPMCJHw" rtMsgKind="inOut"/>
+  <UMLRealTime:Protocol xmi:id="_VEoQMNwWEea4U8QYPMCJHw" base_Collaboration="_VEP1sNwWEea4U8QYPMCJHw"/>
+</xmi:XMI>
diff --git a/models/tests/codepattern/structure/SymbolicReplication6/.project b/models/tests/codepattern/structure/SymbolicReplication6/.project
new file mode 100644
index 0000000..3eeef73
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication6/.project
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>SymbolicReplication6</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+	</natures>
+</projectDescription>
diff --git a/models/tests/codepattern/structure/SymbolicReplication6/SymbolicReplication6.di b/models/tests/codepattern/structure/SymbolicReplication6/SymbolicReplication6.di
new file mode 100644
index 0000000..bf9abab
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication6/SymbolicReplication6.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/models/tests/codepattern/structure/SymbolicReplication6/SymbolicReplication6.notation b/models/tests/codepattern/structure/SymbolicReplication6/SymbolicReplication6.notation
new file mode 100644
index 0000000..518a3fc
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication6/SymbolicReplication6.notation
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_8l-4cN20EeaVi7aNjIFecA" type="CompositeStructure" measurementUnit="Pixel">
+  <children xmi:type="notation:Shape" xmi:id="_8mYhEN20EeaVi7aNjIFecA" type="Class_Shape">
+    <children xmi:type="notation:DecorationNode" xmi:id="_8mbkYN20EeaVi7aNjIFecA" type="Class_NameLabel"/>
+    <children xmi:type="notation:DecorationNode" xmi:id="_8mcLcN20EeaVi7aNjIFecA" type="Class_FloatingNameLabel">
+      <layoutConstraint xmi:type="notation:Location" xmi:id="_8mcLcd20EeaVi7aNjIFecA" y="5"/>
+    </children>
+    <children xmi:type="notation:BasicCompartment" xmi:id="_8mcLct20EeaVi7aNjIFecA" type="Class_StructureCompartment">
+      <styles xmi:type="notation:TitleStyle" xmi:id="_8mcLc920EeaVi7aNjIFecA"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8mcLdN20EeaVi7aNjIFecA"/>
+    </children>
+    <element xmi:type="uml:Class" href="SymbolicReplication6.uml#_8dfq0N20EeaVi7aNjIFecA"/>
+    <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8mYhEd20EeaVi7aNjIFecA" x="40" y="40" width="500" height="250"/>
+  </children>
+  <styles xmi:type="notation:StringValueStyle" xmi:id="_8l_fgN20EeaVi7aNjIFecA" name="diagram_compatibility_version" stringValue="1.2.0"/>
+  <styles xmi:type="notation:DiagramStyle" xmi:id="_8l_fgd20EeaVi7aNjIFecA"/>
+  <styles xmi:type="style:PapyrusViewStyle" xmi:id="_8l_fgt20EeaVi7aNjIFecA">
+    <owner xmi:type="uml:Class" href="SymbolicReplication6.uml#_8dfq0N20EeaVi7aNjIFecA"/>
+    <configuration xmi:type="configuration:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/configuration/UMLRT.configuration#_Z79eQHcZEeSnWeKqQOfW2A"/>
+  </styles>
+  <element xmi:type="uml:Class" href="SymbolicReplication6.uml#_8dfq0N20EeaVi7aNjIFecA"/>
+</notation:Diagram>
diff --git a/models/tests/codepattern/structure/SymbolicReplication6/SymbolicReplication6.uml b/models/tests/codepattern/structure/SymbolicReplication6/SymbolicReplication6.uml
new file mode 100644
index 0000000..6c66c3e
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication6/SymbolicReplication6.uml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:UMLRealTime="http://www.eclipse.org/papyrus/umlrt" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+  <uml:Model xmi:id="_4-vsAN20EeaVi7aNjIFecA" name="SymbolicReplication6">
+    <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_y6yosN24EeaM2MV8BsFglQ" source="http://www.eclipse.org/papyrus-rt/language/1.0.0">
+      <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_y6zPwN24EeaM2MV8BsFglQ" key="language" value="umlrt-cpp"/>
+    </eAnnotations>
+    <packagedElement xmi:type="uml:Class" xmi:id="_8dfq0N20EeaVi7aNjIFecA" name="Top" isActive="true">
+      <ownedAttribute xmi:type="uml:Port" xmi:id="_WWRmsN21EeaVi7aNjIFecA" name="protocol1" visibility="public" type="_WxSHsN21EeaVi7aNjIFecA" isOrdered="true" aggregation="composite" isBehavior="true" isService="true">
+        <lowerValue xmi:type="uml:OpaqueExpression" xmi:id="_a2DksN21EeaVi7aNjIFecA" name="OpaqueExpression2">
+          <language>C++</language>
+          <body>SymbolicReplication6::Package1::Class1::Attribute1 + 2</body>
+        </lowerValue>
+        <upperValue xmi:type="uml:OpaqueExpression" xmi:id="_a1ot8N21EeaVi7aNjIFecA" name="OpaqueExpression1">
+          <language>C++</language>
+          <body>SymbolicReplication6::Package1::Class1::Attribute1 + 2</body>
+        </upperValue>
+      </ownedAttribute>
+    </packagedElement>
+    <packagedElement xmi:type="uml:Package" xmi:id="_NPN7kN21EeaVi7aNjIFecA" name="Package1">
+      <packagedElement xmi:type="uml:Class" xmi:id="_N_p6AN21EeaVi7aNjIFecA" name="Class1">
+        <ownedAttribute xmi:type="uml:Property" xmi:id="_P-PtoN21EeaVi7aNjIFecA" name="Attribute1" visibility="public">
+          <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+          <defaultValue xmi:type="uml:LiteralInteger" xmi:id="_SZmVwN21EeaVi7aNjIFecA" value="3"/>
+        </ownedAttribute>
+      </packagedElement>
+    </packagedElement>
+    <packagedElement xmi:type="uml:Package" xmi:id="_WxeU8N21EeaVi7aNjIFecA" name="Protocol1">
+      <packagedElement xmi:type="uml:Collaboration" xmi:id="_WxSHsN21EeaVi7aNjIFecA" name="Protocol1">
+        <interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_WxrJQN21EeaVi7aNjIFecA" client="_WxSHsN21EeaVi7aNjIFecA" supplier="_WxoF8N21EeaVi7aNjIFecA" contract="_WxoF8N21EeaVi7aNjIFecA"/>
+        <interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_WxzFEN21EeaVi7aNjIFecA" client="_WxSHsN21EeaVi7aNjIFecA" supplier="_Wxwo0N21EeaVi7aNjIFecA" contract="_Wxwo0N21EeaVi7aNjIFecA"/>
+      </packagedElement>
+      <packagedElement xmi:type="uml:Interface" xmi:id="_WxoF8N21EeaVi7aNjIFecA" name="Protocol1"/>
+      <packagedElement xmi:type="uml:Interface" xmi:id="_Wxs-cN21EeaVi7aNjIFecA" name="Protocol1~"/>
+      <packagedElement xmi:type="uml:Usage" xmi:id="_WxvasN21EeaVi7aNjIFecA" client="_WxSHsN21EeaVi7aNjIFecA" supplier="_Wxs-cN21EeaVi7aNjIFecA"/>
+      <packagedElement xmi:type="uml:AnyReceiveEvent" xmi:id="_WxwBwN21EeaVi7aNjIFecA" name="*"/>
+      <packagedElement xmi:type="uml:Interface" xmi:id="_Wxwo0N21EeaVi7aNjIFecA" name="Protocol1IO"/>
+      <packagedElement xmi:type="uml:Usage" xmi:id="_WxzsIN21EeaVi7aNjIFecA" client="_WxSHsN21EeaVi7aNjIFecA" supplier="_Wxwo0N21EeaVi7aNjIFecA"/>
+    </packagedElement>
+    <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4_q5EN20EeaVi7aNjIFecA">
+      <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4_tVUN20EeaVi7aNjIFecA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+        <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/umlrt#/"/>
+      </eAnnotations>
+      <appliedProfile xmi:type="uml:Profile" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_1h74oEeVEeO0lv5O1DTHOQ"/>
+    </profileApplication>
+    <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_y8MW4N24EeaM2MV8BsFglQ">
+      <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_y8MW4d24EeaM2MV8BsFglQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+        <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/umlrt/cppproperties#/"/>
+      </eAnnotations>
+      <appliedProfile xmi:type="uml:Profile" href="pathmap://UMLRT_CPP/RTCppProperties.profile.uml#_vl5LALs8EeSTjNEQkASznQ"/>
+    </profileApplication>
+  </uml:Model>
+  <UMLRealTime:Capsule xmi:id="_8mlVYN20EeaVi7aNjIFecA" base_Class="_8dfq0N20EeaVi7aNjIFecA"/>
+  <UMLRealTime:RTPort xmi:id="_WXo4oN21EeaVi7aNjIFecA" isPublish="false" isWired="true" base_Port="_WWRmsN21EeaVi7aNjIFecA"/>
+  <UMLRealTime:ProtocolContainer xmi:id="_WxfjEN21EeaVi7aNjIFecA" base_Package="_WxeU8N21EeaVi7aNjIFecA"/>
+  <UMLRealTime:RTMessageSet xmi:id="_Wxp7IN21EeaVi7aNjIFecA" base_Interface="_WxoF8N21EeaVi7aNjIFecA"/>
+  <UMLRealTime:RTMessageSet xmi:id="_WxuMkN21EeaVi7aNjIFecA" base_Interface="_Wxs-cN21EeaVi7aNjIFecA" rtMsgKind="out"/>
+  <UMLRealTime:RTMessageSet xmi:id="_Wxx28N21EeaVi7aNjIFecA" base_Interface="_Wxwo0N21EeaVi7aNjIFecA" rtMsgKind="inOut"/>
+  <UMLRealTime:Protocol xmi:id="_Wx06QN21EeaVi7aNjIFecA" base_Collaboration="_WxSHsN21EeaVi7aNjIFecA"/>
+</xmi:XMI>
diff --git a/models/tests/codepattern/structure/SymbolicReplication7/.project b/models/tests/codepattern/structure/SymbolicReplication7/.project
new file mode 100644
index 0000000..9290212
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication7/.project
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>SymbolicReplication7</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+	</buildSpec>
+	<natures>
+	</natures>
+</projectDescription>
diff --git a/models/tests/codepattern/structure/SymbolicReplication7/SymbolicReplication7.di b/models/tests/codepattern/structure/SymbolicReplication7/SymbolicReplication7.di
new file mode 100644
index 0000000..bf9abab
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication7/SymbolicReplication7.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/models/tests/codepattern/structure/SymbolicReplication7/SymbolicReplication7.notation b/models/tests/codepattern/structure/SymbolicReplication7/SymbolicReplication7.notation
new file mode 100644
index 0000000..4ffa6cd
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication7/SymbolicReplication7.notation
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_sxMUkN21EeaVi7aNjIFecA" type="CompositeStructure" measurementUnit="Pixel">
+  <children xmi:type="notation:Shape" xmi:id="_sxM7oN21EeaVi7aNjIFecA" type="Class_Shape">
+    <children xmi:type="notation:DecorationNode" xmi:id="_sxM7ot21EeaVi7aNjIFecA" type="Class_NameLabel"/>
+    <children xmi:type="notation:DecorationNode" xmi:id="_sxM7o921EeaVi7aNjIFecA" type="Class_FloatingNameLabel">
+      <layoutConstraint xmi:type="notation:Location" xmi:id="_sxM7pN21EeaVi7aNjIFecA" y="5"/>
+    </children>
+    <children xmi:type="notation:BasicCompartment" xmi:id="_sxM7pd21EeaVi7aNjIFecA" type="Class_StructureCompartment">
+      <styles xmi:type="notation:TitleStyle" xmi:id="_sxM7pt21EeaVi7aNjIFecA"/>
+      <layoutConstraint xmi:type="notation:Bounds" xmi:id="_sxM7p921EeaVi7aNjIFecA"/>
+    </children>
+    <element xmi:type="uml:Class" href="SymbolicReplication7.uml#_sucikN21EeaVi7aNjIFecA"/>
+    <layoutConstraint xmi:type="notation:Bounds" xmi:id="_sxM7od21EeaVi7aNjIFecA" x="40" y="40" width="500" height="250"/>
+  </children>
+  <styles xmi:type="notation:StringValueStyle" xmi:id="_sxMUkd21EeaVi7aNjIFecA" name="diagram_compatibility_version" stringValue="1.2.0"/>
+  <styles xmi:type="notation:DiagramStyle" xmi:id="_sxMUkt21EeaVi7aNjIFecA"/>
+  <styles xmi:type="style:PapyrusViewStyle" xmi:id="_sxMUk921EeaVi7aNjIFecA">
+    <owner xmi:type="uml:Class" href="SymbolicReplication7.uml#_sucikN21EeaVi7aNjIFecA"/>
+    <configuration xmi:type="configuration:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrusrt.umlrt.tooling.diagram.common/configuration/UMLRT.configuration#_Z79eQHcZEeSnWeKqQOfW2A"/>
+  </styles>
+  <element xmi:type="uml:Class" href="SymbolicReplication7.uml#_sucikN21EeaVi7aNjIFecA"/>
+</notation:Diagram>
diff --git a/models/tests/codepattern/structure/SymbolicReplication7/SymbolicReplication7.uml b/models/tests/codepattern/structure/SymbolicReplication7/SymbolicReplication7.uml
new file mode 100644
index 0000000..92626e6
--- /dev/null
+++ b/models/tests/codepattern/structure/SymbolicReplication7/SymbolicReplication7.uml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:UMLRealTime="http://www.eclipse.org/papyrus/umlrt" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+  <uml:Model xmi:id="_rn4jIN21EeaVi7aNjIFecA" name="SymbolicReplication7">
+    <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_w1ZpgN24EeaM2MV8BsFglQ" source="http://www.eclipse.org/papyrus-rt/language/1.0.0">
+      <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_w1aQkN24EeaM2MV8BsFglQ" key="language" value="umlrt-cpp"/>
+    </eAnnotations>
+    <packageImport xmi:type="uml:PackageImport" xmi:id="_W5aTgN22EeaVi7aNjIFecA">
+      <importedPackage xmi:type="uml:Model" href="../SymbolicReplication6/SymbolicReplication6.uml#_4-vsAN20EeaVi7aNjIFecA"/>
+    </packageImport>
+    <packagedElement xmi:type="uml:Class" xmi:id="_sucikN21EeaVi7aNjIFecA" name="Top" isActive="true">
+      <ownedAttribute xmi:type="uml:Port" xmi:id="_DL6jQN24EeaM2MV8BsFglQ" name="protocol1" visibility="public" type="_Ds-o8N24EeaM2MV8BsFglQ" isOrdered="true" aggregation="composite" isBehavior="true" isConjugated="false" isService="true">
+        <lowerValue xmi:type="uml:OpaqueExpression" xmi:id="_KzVAkN24EeaM2MV8BsFglQ" name="OpaqueExpression2">
+          <language>C++</language>
+          <body>SymbolicReplication7::Package1::Package2::Class1::Class1::Attribute3</body>
+        </lowerValue>
+        <upperValue xmi:type="uml:OpaqueExpression" xmi:id="_KzIMQN24EeaM2MV8BsFglQ" name="OpaqueExpression1">
+          <language>C++</language>
+          <body>SymbolicReplication7::Package1::Package2::Class1::Class1::Attribute3</body>
+        </upperValue>
+      </ownedAttribute>
+    </packagedElement>
+    <packagedElement xmi:type="uml:Package" xmi:id="_v1qLIN21EeaVi7aNjIFecA" name="Package1">
+      <packagedElement xmi:type="uml:Package" xmi:id="_yz0lYN21EeaVi7aNjIFecA" name="Package2">
+        <packagedElement xmi:type="uml:Class" xmi:id="_0rjjEN21EeaVi7aNjIFecA" name="Class1">
+          <ownedAttribute xmi:type="uml:Property" xmi:id="_2WI1kN21EeaVi7aNjIFecA" name="Attribute1" visibility="public">
+            <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+            <defaultValue xmi:type="uml:OpaqueExpression" xmi:id="_MsldsN23EeaVi7aNjIFecA">
+              <language>C++</language>
+              <body>SymbolicReplication6::Package1::Class1::Attribute1 * 2</body>
+            </defaultValue>
+          </ownedAttribute>
+          <ownedAttribute xmi:type="uml:Property" xmi:id="_356VcN21EeaVi7aNjIFecA" name="Attribute2" visibility="public">
+            <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+            <defaultValue xmi:type="uml:OpaqueExpression" xmi:id="_SW4HAN23EeaVi7aNjIFecA">
+              <language>C++</language>
+              <body>Attribute1 + 1</body>
+            </defaultValue>
+          </ownedAttribute>
+          <nestedClassifier xmi:type="uml:Class" xmi:id="_5jY0sN21EeaVi7aNjIFecA" name="Class1">
+            <ownedAttribute xmi:type="uml:Property" xmi:id="_6LMbkN21EeaVi7aNjIFecA" name="Attribute1" visibility="public">
+              <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+              <defaultValue xmi:type="uml:OpaqueExpression" xmi:id="_cB2XgN23EeaVi7aNjIFecA">
+                <language>C++</language>
+                <body>SymbolicReplication7::Package1::Class1::Attribute1 + 3</body>
+              </defaultValue>
+            </ownedAttribute>
+            <ownedAttribute xmi:type="uml:Property" xmi:id="_9FSOIN21EeaVi7aNjIFecA" name="Attribute3" visibility="public">
+              <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+              <defaultValue xmi:type="uml:OpaqueExpression" xmi:id="_gQC2QN23EeaVi7aNjIFecA">
+                <language>C++</language>
+                <body>Attribute1 * Attribute2</body>
+              </defaultValue>
+            </ownedAttribute>
+          </nestedClassifier>
+        </packagedElement>
+      </packagedElement>
+    </packagedElement>
+    <packagedElement xmi:type="uml:Package" xmi:id="_DtJBAN24EeaM2MV8BsFglQ" name="Protocol1">
+      <packagedElement xmi:type="uml:Collaboration" xmi:id="_Ds-o8N24EeaM2MV8BsFglQ" name="Protocol1">
+        <interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_DtfmUN24EeaM2MV8BsFglQ" client="_Ds-o8N24EeaM2MV8BsFglQ" supplier="_DtbU4N24EeaM2MV8BsFglQ" contract="_DtbU4N24EeaM2MV8BsFglQ"/>
+        <interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_DtrMgN24EeaM2MV8BsFglQ" client="_Ds-o8N24EeaM2MV8BsFglQ" supplier="_DtniIN24EeaM2MV8BsFglQ" contract="_DtniIN24EeaM2MV8BsFglQ"/>
+      </packagedElement>
+      <packagedElement xmi:type="uml:Interface" xmi:id="_DtbU4N24EeaM2MV8BsFglQ" name="Protocol1"/>
+      <packagedElement xmi:type="uml:Interface" xmi:id="_DthbgN24EeaM2MV8BsFglQ" name="Protocol1~"/>
+      <packagedElement xmi:type="uml:Usage" xmi:id="_DtlF4N24EeaM2MV8BsFglQ" client="_Ds-o8N24EeaM2MV8BsFglQ" supplier="_DthbgN24EeaM2MV8BsFglQ"/>
+      <packagedElement xmi:type="uml:AnyReceiveEvent" xmi:id="_DtmUAN24EeaM2MV8BsFglQ" name="*"/>
+      <packagedElement xmi:type="uml:Interface" xmi:id="_DtniIN24EeaM2MV8BsFglQ" name="Protocol1IO"/>
+      <packagedElement xmi:type="uml:Usage" xmi:id="_DtrzkN24EeaM2MV8BsFglQ" client="_Ds-o8N24EeaM2MV8BsFglQ" supplier="_DtniIN24EeaM2MV8BsFglQ"/>
+    </packagedElement>
+    <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_rolGsN21EeaVi7aNjIFecA">
+      <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_roltwN21EeaVi7aNjIFecA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+        <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/umlrt#/"/>
+      </eAnnotations>
+      <appliedProfile xmi:type="uml:Profile" href="pathmap://UML_RT_PROFILE/uml-rt.profile.uml#_1h74oEeVEeO0lv5O1DTHOQ"/>
+    </profileApplication>
+    <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_w1gXMN24EeaM2MV8BsFglQ">
+      <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_w1jagN24EeaM2MV8BsFglQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+        <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/umlrt/cppproperties#/"/>
+      </eAnnotations>
+      <appliedProfile xmi:type="uml:Profile" href="pathmap://UMLRT_CPP/RTCppProperties.profile.uml#_vl5LALs8EeSTjNEQkASznQ"/>
+    </profileApplication>
+  </uml:Model>
+  <UMLRealTime:Capsule xmi:id="_sxNisN21EeaVi7aNjIFecA" base_Class="_sucikN21EeaVi7aNjIFecA"/>
+  <UMLRealTime:RTPort xmi:id="_DNVfkN24EeaM2MV8BsFglQ" isPublish="false" isWired="true" base_Port="_DL6jQN24EeaM2MV8BsFglQ"/>
+  <UMLRealTime:ProtocolContainer xmi:id="_DtMEUN24EeaM2MV8BsFglQ" base_Package="_DtJBAN24EeaM2MV8BsFglQ"/>
+  <UMLRealTime:RTMessageSet xmi:id="_DtdxIN24EeaM2MV8BsFglQ" base_Interface="_DtbU4N24EeaM2MV8BsFglQ"/>
+  <UMLRealTime:RTMessageSet xmi:id="_DtjQsN24EeaM2MV8BsFglQ" base_Interface="_DthbgN24EeaM2MV8BsFglQ" rtMsgKind="out"/>
+  <UMLRealTime:RTMessageSet xmi:id="_DtpXUN24EeaM2MV8BsFglQ" base_Interface="_DtniIN24EeaM2MV8BsFglQ" rtMsgKind="inOut"/>
+  <UMLRealTime:Protocol xmi:id="_DttBsN24EeaM2MV8BsFglQ" base_Collaboration="_Ds-o8N24EeaM2MV8BsFglQ"/>
+</xmi:XMI>