Repository: workcraft/workcraft
Issue: Truncate hierarchy separator from instance name on SDC export

Exported SDC file for loop breaking has `_` at the end of all instances, as a flat replacer for hierarchy separator. Instead,  the trailing hierarchy separator should be the instance name.

Changed files:
workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/serialisation/PathbreakConstraintSerialiser.java
workcraft/WorkcraftCore/src/org/workcraft/Info.java
workcraft/WorkcraftCore/src/org/workcraft/dom/hierarchy/NamespaceHelper.java

diff --git a/workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/serialisation/PathbreakConstraintSerialiser.java b/workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/serialisation/PathbreakConstraintSerialiser.java
index 6384450c2..ed26fdd3d 100644
--- a/workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/serialisation/PathbreakConstraintSerialiser.java
+++ b/workcraft/CircuitPlugin/src/org/workcraft/plugins/circuit/serialisation/PathbreakConstraintSerialiser.java
@@ -8,6 +8,7 @@ package org.workcraft.plugins.circuit.serialisation;
 
 import org.workcraft.Info;
 import org.workcraft.dom.hierarchy.NamespaceHelper;
+import org.workcraft.dom.references.Identifier;
 import org.workcraft.plugins.circuit.Circuit;
 import org.workcraft.plugins.circuit.Contact;
 import org.workcraft.plugins.circuit.FunctionComponent;
@@ -56,7 +57,7 @@ public class PathbreakConstraintSerialiser implements PathbreakSerialiser {
     private void writeInstance(PrintWriter out, Circuit circuit, FunctionComponent component,
             HashMap<String, SubstitutionRule> substitutionRules) {
 
-        String instanceRef = circuit.getNodeReference(component);
+        String instanceRef = Identifier.truncateNamespaceSeparator(circuit.getNodeReference(component));
         String instanceFlatName = NamespaceHelper.flattenReference(instanceRef);
         String msg = "Processing instance '" + instanceFlatName + "': ";
         if (!component.isMapped()) {
diff --git a/workcraft/WorkcraftCore/src/org/workcraft/Info.java b/workcraft/WorkcraftCore/src/org/workcraft/Info.java
index ba5549fef..4260a1c8e 100644
--- a/workcraft/WorkcraftCore/src/org/workcraft/Info.java
+++ b/workcraft/WorkcraftCore/src/org/workcraft/Info.java
@@ -13,7 +13,7 @@ public class Info {
     private static final String subtitle3 = "Return of the Hazard";
     private static final String subtitle4 = "Revenge of the Timing Assumption";
 
-    private static final Version version = new Version(3, 3, 5, Status.RELEASE);
+    private static final Version version = new Version(3, 3, 6, Status.ALPHA);
 
     private static final int startYear = 2006;
     private static final int currentYear = Calendar.getInstance().get(Calendar.YEAR);
diff --git a/workcraft/WorkcraftCore/src/org/workcraft/dom/hierarchy/NamespaceHelper.java b/workcraft/WorkcraftCore/src/org/workcraft/dom/hierarchy/NamespaceHelper.java
index ca5d15768..7e9c6a828 100644
--- a/workcraft/WorkcraftCore/src/org/workcraft/dom/hierarchy/NamespaceHelper.java
+++ b/workcraft/WorkcraftCore/src/org/workcraft/dom/hierarchy/NamespaceHelper.java
@@ -57,12 +57,12 @@ public class NamespaceHelper {
     }
 
     public static String getParentReference(String reference) {
-        String result = "";
+        StringBuilder result = new StringBuilder();
         LinkedList<String> path = splitReference(reference);
         for (int i = 0; i < path.size() - 1; i++) {
-            result += path.get(i);
+            result.append(path.get(i));
         }
-        return result;
+        return result.toString();
     }
 
     public static String getReferenceHead(String reference) {