Browse Source

Fixed some issues related to types and variability

Casper Thule 3 years ago
parent
commit
db26e540c0
12 changed files with 683 additions and 177 deletions
  1. BIN
      DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp.tests/test_input/single_folder_spec/window/Window.fmu
  2. 9 0
      DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp/src/be/uantwerpen/ansymo/semanticadaptation/cg/cpp/ConnectedVariable.java
  3. 66 25
      DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp/src/be/uantwerpen/ansymo/semanticadaptation/cg/cpp/ControlConditionSwitch.xtend
  4. 13 3
      DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp/src/be/uantwerpen/ansymo/semanticadaptation/cg/cpp/Conversions.java
  5. 17 14
      DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp/src/be/uantwerpen/ansymo/semanticadaptation/cg/cpp/CppGenerator.xtend
  6. 37 0
      DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp/src/be/uantwerpen/ansymo/semanticadaptation/cg/cpp/GlobalInOutVariable.java
  7. 333 85
      DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp/src/be/uantwerpen/ansymo/semanticadaptation/cg/cpp/InOutRulesConditionSwitch.xtend
  8. 36 23
      DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp/src/be/uantwerpen/ansymo/semanticadaptation/cg/cpp/InRulesConditionSwitch.xtend
  9. 15 13
      DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp/src/be/uantwerpen/ansymo/semanticadaptation/cg/cpp/OutRulesConditionSwitch.xtend
  10. 112 13
      DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp/src/be/uantwerpen/ansymo/semanticadaptation/cg/cpp/ReturnInformation.java
  11. 38 1
      DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp/src/be/uantwerpen/ansymo/semanticadaptation/cg/cpp/SAScalarVariable.java
  12. 7 0
      DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp/src/be/uantwerpen/ansymo/semanticadaptation/cg/cpp/SVVariability.java

BIN
DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp.tests/test_input/single_folder_spec/window/Window.fmu


+ 9 - 0
DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp/src/be/uantwerpen/ansymo/semanticadaptation/cg/cpp/ConnectedVariable.java

@@ -10,6 +10,7 @@ public class ConnectedVariable {
 	private String value;
 	private ConnectedVariable conVar;
 	private MappedScalarVariable mapSV;
+	private ConnectedVariable parent;
 	
 	public ConnectedVariable() {
 		
@@ -79,4 +80,12 @@ public class ConnectedVariable {
 		this.mapSV = mapSV;
 	}
 
+	public ConnectedVariable getParent() {
+		return parent;
+	}
+
+	public void setParent(ConnectedVariable parent) {
+		this.parent = parent;
+	}
+
 }

+ 66 - 25
DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp/src/be/uantwerpen/ansymo/semanticadaptation/cg/cpp/ControlConditionSwitch.xtend

@@ -1,54 +1,95 @@
 package be.uantwerpen.ansymo.semanticadaptation.cg.cpp
 
-import java.util.LinkedHashMap
+import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.ControlRule
+import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.ControlRuleBlock
+import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.CurrentTime
 import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.CustomControlRule
 import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.DoStep
 import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.StepSize
-import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.CurrentTime
-import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.ControlRuleBlock
-import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.ControlRule
+import java.util.LinkedHashMap
 
 class ControlConditionSwitch extends InOutRulesConditionSwitch {
 
-	new(String adaptationClassName, String adaptationName, LinkedHashMap<String, Pair<String, Integer>> scalars) {
-		super(adaptationClassName, adaptationName, "", null);
+	new(String adaptationClassName, 
+		String adaptationName, 
+		LinkedHashMap<String, Pair<String, Integer>> scalars,
+		LinkedHashMap<String,SAScalarVariable> SASVs
+	) {
+		super(adaptationClassName, adaptationName, "", null, SASVs);
 	}
 
-	override String caseControlRuleBlock(ControlRuleBlock obj) {
-		var cpp = "";
+	override ReturnInformation caseControlRuleBlock(ControlRuleBlock obj) {
+		var retVal = new ReturnInformation();
+
 		for (crtlRule : obj.eAllContents.toIterable.filter(ControlRule)) {
-			cpp += doSwitch(crtlRule);
+			retVal.appendCode(doSwitch(crtlRule).code);
 		}
 
-		return cpp;
+		return retVal;
+		
+		
+//		var cpp = "";
+//		for (crtlRule : obj.eAllContents.toIterable.filter(ControlRule)) {
+//			cpp += doSwitch(crtlRule);
+//		}
+//
+//		return cpp;
 	}
 
-	override String caseCustomControlRule(CustomControlRule object) {
-		var String returnVal = "";
+	override ReturnInformation caseCustomControlRule(CustomControlRule object) {
+		var retVal = new ReturnInformation();
 
+		var String tempDoSwitchCode = "";
 		for (ruleStm : object.controlRulestatements) {
-			returnVal += doSwitch(ruleStm);
+			tempDoSwitchCode += doSwitch(ruleStm).code;
 		}
-
+		
 		var functionPrefix = "void ";
 		var functionNameArgs = "executeInternalControlFlow(double h, double dt)"
 		functionSignatures.add(functionPrefix + functionNameArgs + ";");
-		return '''
-		«functionPrefix+this.adaptationName»::«functionNameArgs»
-		{
-			«returnVal»
-		}''';
+		retVal.code = 
+			'''
+				«functionPrefix+this.adaptationName»::«functionNameArgs»
+				{
+					«tempDoSwitchCode»
+				}
+			''';
+
+		return retVal;
+//		var String returnVal = "";
+//
+//		for (ruleStm : object.controlRulestatements) {
+//			returnVal += doSwitch(ruleStm);
+//		}
+
+//		var functionPrefix = "void ";
+//		var functionNameArgs = "executeInternalControlFlow(double h, double dt)"
+//		functionSignatures.add(functionPrefix + functionNameArgs + ";");
+//		return '''
+//		«functionPrefix+this.adaptationName»::«functionNameArgs»
+//		{
+//			«returnVal»
+//		}''';
 	}
 
-	override String caseDoStep(DoStep object) {
-		return '''this->doStep(«object.fmu.name»,«doSwitch(object.h)»,«doSwitch(object.t)»);''';
+	override ReturnInformation caseDoStep(DoStep object) {
+		var retVal = new ReturnInformation();
+		retVal.code = '''this->doStep(«object.fmu.name»,«doSwitch(object.h)»,«doSwitch(object.t)»);''';
+		return retVal;
+//		return '''this->doStep(«object.fmu.name»,«doSwitch(object.h)»,«doSwitch(object.t)»);''';
 	}
 
-	override String caseStepSize(StepSize object) {
-		return '''h''';
+	override ReturnInformation caseStepSize(StepSize object) {
+		var retVal = new ReturnInformation();
+		retVal.code = '''h''';
+		return retVal;
+//		return '''h''';
 	}
 
-	override String caseCurrentTime(CurrentTime object) {
-		return '''dt''';
+	override ReturnInformation caseCurrentTime(CurrentTime object) {
+		var retVal = new ReturnInformation();
+		retVal.code = '''dt''';
+		return retVal;
+//		return '''dt''';
 	}
 }

+ 13 - 3
DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp/src/be/uantwerpen/ansymo/semanticadaptation/cg/cpp/Conversions.java

@@ -1,8 +1,5 @@
 package be.uantwerpen.ansymo.semanticadaptation.cg.cpp;
 
-import javax.management.InvalidAttributeValueException;
-import javax.naming.directory.InvalidAttributeIdentifierException;
-
 public class Conversions {
 	public static String fmiTypeToCppType(SVType t) throws InvalidConversionException {
 		switch (t) {
@@ -18,6 +15,19 @@ public class Conversions {
 			throw new InvalidConversionException("The value type: " + t + " is invalid.");
 		}
 	}
+	
+	public static SVVariability fmiTypeToVariability(SVType t) throws InvalidConversionException{
+		switch (t) {
+		case Real:
+			return SVVariability.continuous;
+		case Integer:
+		case Boolean:
+		case String:
+			return SVVariability.discrete;
+		default:
+			throw new InvalidConversionException("The value type: " + t + " is invalid.");
+		}
+	}
 
 	public static String fmiTypeToCppTypeName(SVType t) throws InvalidConversionException {
 		switch (t) {

+ 17 - 14
DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp/src/be/uantwerpen/ansymo/semanticadaptation/cg/cpp/CppGenerator.xtend

@@ -21,7 +21,6 @@ import org.eclipse.emf.common.util.EList
 class CppGenerator extends SemanticAdaptationGenerator {
 
 	var ModelDescriptionCreator mdCreator = new ModelDescriptionCreator()
-	var SwitchTest = new Visitor();
 
 	private var IFileSystemAccess2 fsa;
 
@@ -57,7 +56,7 @@ class CppGenerator extends SemanticAdaptationGenerator {
 				throw new IncorrectAmountOfElementsException("The adaptation does not contain any InnerFMUs.")
 			}
 
-			var ArrayList<SAScalarVariable> SASVs = calcSASVsFromInportsOutports(adapInteralRefName, type.inports, type.outports)
+			var LinkedHashMap<String,SAScalarVariable> SASVs = calcSASVsFromInportsOutports(adapInteralRefName, type.inports, type.outports)
 
 			for (fmu : type.inner.eAllContents.toList.filter(InnerFMU)) {
 				// TODO: Merge this with ModelDescriptionCreator
@@ -89,12 +88,12 @@ class CppGenerator extends SemanticAdaptationGenerator {
 			
 			// Compile the in rules
 			val inRuleResult = compileInOutRuleBlocks(InputOutputType.Input, adaptation.eAllContents.toIterable.filter(
-				InRulesBlock).map[x|x as InOutRules], adapClassName, adapInteralRefName, mappedScalarVariables);
+				InRulesBlock).map[x|x as InOutRules], adapClassName, adapInteralRefName, mappedScalarVariables, SASVs);
 			genSource += inRuleResult.generatedCpp;
 
 			// Compile the out rules
 			val outRuleResult = compileInOutRuleBlocks(InputOutputType.Output, adaptation.eAllContents.toIterable.
-				filter(OutRulesBlock).map[x|x as InOutRules], adapClassName, adapInteralRefName, mappedScalarVariables);
+				filter(OutRulesBlock).map[x|x as InOutRules], adapClassName, adapInteralRefName, mappedScalarVariables, SASVs);
 			genSource += outRuleResult.generatedCpp;
 
 			/*
@@ -103,7 +102,7 @@ class CppGenerator extends SemanticAdaptationGenerator {
 			 */
 			// Generate the Control Rules
 			val crtlRuleResult = compileControlRuleBlock(adaptation.eAllContents.toIterable.filter(ControlRuleBlock),
-				adapClassName, adapInteralRefName, svDefs);
+				adapClassName, adapInteralRefName, svDefs, SASVs);
 			genSource += crtlRuleResult.generatedCpp;
 
 			// Compile the source file includes, namespace and constructor 
@@ -373,9 +372,9 @@ class CppGenerator extends SemanticAdaptationGenerator {
 	 * Calculates necessary information on function signatures necessary for generation of the header file.
 	 */
 	def RulesBlockResult compileControlRuleBlock(Iterable<ControlRuleBlock> crtlRuleBlocks, String adaptationClassName,
-		String adaptationName, LinkedHashMap<String, Pair<String, Integer>> svDefs) {
+		String adaptationName, LinkedHashMap<String, Pair<String, Integer>> svDefs, LinkedHashMap<String, SAScalarVariable> SASVs) {
 		var cpp = "";
-		val visitor = new ControlConditionSwitch(adaptationClassName, adaptationName, svDefs);
+		val visitor = new ControlConditionSwitch(adaptationClassName, adaptationName, svDefs, SASVs);
 		for (crtlRule : crtlRuleBlocks) {
 			cpp += visitor.doSwitch(crtlRule);
 		}
@@ -394,11 +393,13 @@ class CppGenerator extends SemanticAdaptationGenerator {
 	 */
 	def InOutRulesBlockResult compileInOutRuleBlocks(InputOutputType ioType, Iterable<InOutRules> rulesBlocks,
 		String adaptationClassName, String adaptationName,
-		LinkedHashMap<String, LinkedHashMap<String, MappedScalarVariable>> mSVars) {
+		LinkedHashMap<String, LinkedHashMap<String, MappedScalarVariable>> mSVars, LinkedHashMap<String,SAScalarVariable> SASVs) {
+			
 		val visitor = if (ioType == InputOutputType.Input)
-				new InRulesConditionSwitch(adaptationClassName, adaptationName, mSVars)
+				new InRulesConditionSwitch(adaptationClassName, adaptationName, mSVars, SASVs)
 			else
-				new OutRulesConditionSwitch(adaptationClassName, adaptationName, mSVars);
+				new OutRulesConditionSwitch(adaptationClassName, adaptationName, mSVars, SASVs);
+				
 		val functionName = "create" + ioType + "Rules()";
 		var String cpp = "";
 		val ruleBlock = rulesBlocks.head;
@@ -450,8 +451,8 @@ class CppGenerator extends SemanticAdaptationGenerator {
 		return defines;
 	}
 
-	def ArrayList<SAScalarVariable> calcSASVsFromInportsOutports(String definePrefix, EList<Port> inports, EList<Port> outports) {
-		var saSVs = newArrayList();
+	def LinkedHashMap<String, SAScalarVariable> calcSASVsFromInportsOutports(String definePrefix, EList<Port> inports, EList<Port> outports) {
+		var LinkedHashMap<String, SAScalarVariable> saSVs = newLinkedHashMap();
 		
 		var int valueReference = 0;
 		for (inport : inports) {
@@ -459,7 +460,8 @@ class CppGenerator extends SemanticAdaptationGenerator {
 			saSV.valueReference = valueReference++;
 			saSV.name = inport.name;
 			saSV.defineName = (definePrefix + inport.name).toUpperCase
-			saSVs.add(saSV);
+			saSV.causality = SVCausality.input;
+			saSVs.put(saSV.name, saSV);
 		}
 
 		for (outport : outports) {
@@ -467,7 +469,8 @@ class CppGenerator extends SemanticAdaptationGenerator {
 			saSV.valueReference = valueReference++;
 			saSV.defineName = (definePrefix + outport.name).toUpperCase
 			saSV.name = outport.name;
-			saSVs.add(saSV);
+			saSV.causality = SVCausality.output;
+			saSVs.put(saSV.name, saSV);
 		}
 		
 		return saSVs;

+ 37 - 0
DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp/src/be/uantwerpen/ansymo/semanticadaptation/cg/cpp/GlobalInOutVariable.java

@@ -0,0 +1,37 @@
+package be.uantwerpen.ansymo.semanticadaptation.cg.cpp;
+
+public class GlobalInOutVariable {
+
+	private String name;
+	private SVType type;
+	private Object value;
+	
+	public GlobalInOutVariable() {
+		// TODO Auto-generated constructor stub
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public SVType getType() {
+		return type;
+	}
+
+	public void setType(SVType type) {
+		this.type = type;
+	}
+
+	public Object getValue() {
+		return value;
+	}
+
+	public void setValue(Object value) {
+		this.value = value;
+	}
+
+}

+ 333 - 85
DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp/src/be/uantwerpen/ansymo/semanticadaptation/cg/cpp/InOutRulesConditionSwitch.xtend

@@ -4,9 +4,16 @@ import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.Assignment
 import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.BoolLiteral
 import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.CompositeOutputFunction
 import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.DataRule
+import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.Declaration
 import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.If
+import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.InRulesBlock
+import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.IntLiteral
 import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.IsSet
 import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.LValueDeclaration
+import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.Literal
+import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.Multi
+import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.Neg
+import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.OutRulesBlock
 import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.RealLiteral
 import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.RuleCondition
 import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.SingleVarDeclaration
@@ -16,18 +23,13 @@ import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.util.SemanticA
 import java.util.LinkedHashMap
 import java.util.List
 import org.eclipse.emf.ecore.EObject
-import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.Multi
-import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.IntLiteral
-import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.Neg
-import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.Declaration
-import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.Literal
-import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.InRulesBlock
-import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.OutRulesBlock
 import java.util.ArrayList
+import java.util.Optional
 
-abstract class InOutRulesConditionSwitch extends SemanticAdaptationSwitch<String> {
+abstract class InOutRulesConditionSwitch extends SemanticAdaptationSwitch<ReturnInformation> {
 
 	protected var LinkedHashMap<String, Pair<SVType, Object>> globalVars = newLinkedHashMap();
+	protected var LinkedHashMap<String, GlobalInOutVariable> globalVars2 = newLinkedHashMap();
 	private var Pair<SVType, Object> lastVal;
 	protected final String adaptationName;
 	protected final String adaptationClassName;
@@ -36,19 +38,47 @@ abstract class InOutRulesConditionSwitch extends SemanticAdaptationSwitch<String
 	protected List<String> functionSignatures = newArrayList();
 	protected String externalVariableOwner;
 	protected final LinkedHashMap<String, LinkedHashMap<String, MappedScalarVariable>> mSVars;
+	protected ArrayList<ConnectedVariable> conVars = newArrayList();
+	protected final LinkedHashMap<String, SAScalarVariable> SASVs;
+	protected boolean inRuleCondition;
+	protected boolean inRuleTransition;
+	protected boolean inRuleOutput;
 
 	new(
 		String adaptationClassName,
 		String adaptationName,
 		String functionPrefix,
-		LinkedHashMap<String, LinkedHashMap<String, MappedScalarVariable>> mSVars
+		LinkedHashMap<String, LinkedHashMap<String, MappedScalarVariable>> mSVars,
+		LinkedHashMap<String, SAScalarVariable> SASVs
 	) {
+		this.SASVs = SASVs;
 		this.adaptationName = adaptationName;
 		this.adaptationClassName = adaptationClassName;
 		this.functionPrefix = functionPrefix;
 		this.mSVars = mSVars;
 	}
 
+	/*
+	 * UTILITY FUNCTIONS 
+	 */
+	private def Object convertTypeToObject(SVType type, Literal object) {
+		switch (type) {
+			case Real: {
+				return (object as RealLiteral).value.doubleValue;
+			}
+			case Integer: {
+				return (object as IntLiteral).value;
+			}
+			case Boolean: {
+				return Boolean.parseBoolean((object as BoolLiteral).value);
+			}
+			default: {
+			}
+		}
+	}
+
+	public def getVars() { return this.globalVars; }
+
 	/**
 	 * This function adds a header style function signature to the list <i>functionsignatures</i> 
 	 * and returns the source style function signature
@@ -63,159 +93,377 @@ abstract class InOutRulesConditionSwitch extends SemanticAdaptationSwitch<String
 		this.count++;
 	}
 
-	override String caseOutRulesBlock(OutRulesBlock object) {
-		var cpp = ""
+	/*
+	 * COMPILATION FUNCTIONS
+	 */
+	override ReturnInformation caseOutRulesBlock(OutRulesBlock object) {
+		var retVal = new ReturnInformation();
+
+		// Get the global variables added to globalVars
 		for (gVar : object.globalOutVars) {
 			doSwitch(gVar)
 		}
 		for (dataRule : object.eAllContents.toIterable.filter(DataRule)) {
 			this.incrementCount;
-			cpp += doSwitch(dataRule);
+			retVal.appendCode(doSwitch(dataRule).code);
 		}
-		return cpp;
+
+		return retVal;
+
+//		var cpp = ""
+//		for (gVar : object.globalOutVars) {
+//			doSwitch(gVar)
+//		}
+//		for (dataRule : object.eAllContents.toIterable.filter(DataRule)) {
+//			this.incrementCount;
+//			cpp += doSwitch(dataRule);
+//		}
+//		return cpp;
 	}
 
-	override String caseInRulesBlock(InRulesBlock object) {
-		var cpp = ""
+	override ReturnInformation caseInRulesBlock(InRulesBlock object) {
+
+		var retVal = new ReturnInformation();
+
+		// Get the global variables added to globalVars
 		for (gVar : object.globalInVars) {
 			doSwitch(gVar)
 		}
+
 		for (DataRule dataRule : object.eAllContents.toIterable.filter(DataRule)) {
+			// This is used for naming each datarule
 			this.incrementCount;
-			cpp += doSwitch(dataRule);
+			retVal.appendCode(doSwitch(dataRule).code);
 		}
-		return cpp;
+
+		return retVal;
+
+//		var cpp = ""
+//		for (gVar : object.globalInVars) {
+//			doSwitch(gVar)
+//		}
+//		for (DataRule dataRule : object.eAllContents.toIterable.filter(DataRule)) {
+//			this.incrementCount;
+//			cpp += doSwitch(dataRule);
+//		}
+//		return cpp;
 	}
 
-	override String caseDataRule(DataRule object) {
-		return '''
-			«doSwitch(object.condition)»
-			«doSwitch(object.statetransitionfunction)»
-			«doSwitch(object.outputfunction)»
-		'''
+	override ReturnInformation caseDataRule(DataRule object) {
+		var retVal = new ReturnInformation();
+		retVal.code = '''«inRuleCondition = true»
+				«doSwitch(object.condition).code»
+				«inRuleCondition = false»
+				«inRuleTransition = true»
+				«doSwitch(object.statetransitionfunction).code»
+				«inRuleTransition = false»
+				«inRuleOutput = true»
+				«doSwitch(object.outputfunction).code»
+				«inRuleOutput = false»
+			'''
+
+		return retVal;
+
+//		return '''
+//			«doSwitch(object.condition)»
+//			«doSwitch(object.statetransitionfunction)»
+//			«doSwitch(object.outputfunction)»
+//		'''
 	}
 
-	override String caseRuleCondition(RuleCondition object) {
+	override ReturnInformation caseRuleCondition(RuleCondition object) {
+		var retVal = new ReturnInformation();
+
 		val functionSignature = createFunctionSignature("condition", "bool");
-		'''
+		retVal.code = '''
 			«functionSignature»{
-				return «doSwitch(object.condition)»;
+				return «doSwitch(object.condition).code»;
 			}
 		''';
+
+		return retVal;
+
+//		val functionSignature = createFunctionSignature("condition", "bool");
+//		'''
+//			«functionSignature»{
+//				return «doSwitch(object.condition)»;
+//			}
+//		''';
 	}
 
-	override String caseStateTransitionFunction(StateTransitionFunction object) {
+	override ReturnInformation caseStateTransitionFunction(StateTransitionFunction object) {
+		var retVal = new ReturnInformation();
+
 		val functionSig = createFunctionSignature("body", "void");
-		'''
+		retVal.code = '''
 			«functionSig»{
 				«IF object.expression !== null»
-					«doSwitch(object.expression)»
+					«doSwitch(object.expression).code»
 				«ENDIF»
 				«IF object.statements !== null»
 					«FOR stm : object.statements»
-						«doSwitch(stm)»
+						«doSwitch(stm).code»
 					«ENDFOR»
 				«ENDIF»			
 				«IF object.assignment !== null»
-					«doSwitch(object.assignment)»
+					«doSwitch(object.assignment).code»
 				«ENDIF»
 			}
 		''';
-	}
 
-	override String caseBoolLiteral(BoolLiteral object) {
-		return '''«object.value»''';
+		return retVal;
+
+//		val functionSig = createFunctionSignature("body", "void");
+//		'''
+//			«functionSig»{
+//				«IF object.expression !== null»
+//					«doSwitch(object.expression)»
+//				«ENDIF»
+//				«IF object.statements !== null»
+//					«FOR stm : object.statements»
+//						«doSwitch(stm)»
+//					«ENDFOR»
+//				«ENDIF»			
+//				«IF object.assignment !== null»
+//					«doSwitch(object.assignment)»
+//				«ENDIF»
+//			}
+//		''';
 	}
 
-	override String defaultCase(EObject object) {
-		return '''[«object.class»]''';
+	override ReturnInformation defaultCase(EObject object) {
+		var retVal = new ReturnInformation();
+		retVal.code = '''[«object.class»]''';
+		return retVal;
+
+//		return '''[«object.class»]''';
 	}
 
-	override String caseIf(If object) {
-		return '''
+	override ReturnInformation caseIf(If object) {
+		var retVal = new ReturnInformation();
+		retVal.code = '''
 			if(«doSwitch(object.ifcondition)»){
 				«FOR stm : object.ifstatements»
-					«doSwitch(stm)»
+					«doSwitch(stm).code»
 				«ENDFOR»
 			}
 		''';
-	}
 
-	override String caseLValueDeclaration(LValueDeclaration object) {
-		return '''«object.name»'''
-	}
+		return retVal;
 
-	override String caseAssignment(Assignment object) {
-		return '''«doSwitch(object.lvalue)» = «doSwitch(object.expr)»;'''
+//		return '''
+//			if(«doSwitch(object.ifcondition)»){
+//				«FOR stm : object.ifstatements»
+//					«doSwitch(stm)»
+//				«ENDFOR»
+//			}
+//		''';
 	}
 
-	override String caseIsSet(IsSet object) {
-		return '''this->isSet«(object.args as Variable).ref.name»'''
-	}
+	private def calcConSaSvData(SAScalarVariable SASV, ReturnInformation rI) {
+		if (SASV !== null) {
+			if (rI.typeIsSet) {
+				SASV.type = rI.type;
+				SASV.variability = Optional.of(Conversions.fmiTypeToVariability(rI.type));
+				return;
+			} else if (rI.conGlobVar !== null) {
+				SASV.type = rI.conGlobVar.type;
+				SASV.variability = Optional.of(Conversions.fmiTypeToVariability(rI.conGlobVar.type));
+				return;
+			}
+		}
+		throw new Exception("Not enough information to determine content of the SASV: " + SASV.name);
 
-	override String caseMulti(Multi object) {
-		return '''«doSwitch(object.left)» * «doSwitch(object.right)»''';
 	}
 
-	override String caseIntLiteral(IntLiteral object) {
-		return '''«object.value»''';
+	override ReturnInformation caseAssignment(Assignment object) {
+		var retVal = new ReturnInformation();
+		var lValSwitch = doSwitch(object.lvalue);
+		var rValSwitch = doSwitch(object.expr);
+
+		// Here we set the information necessary to create a scalar variables in the model description for the SA.
+		if (inRuleTransition) {
+			if (rValSwitch.conSaSv !== null) {
+				calcConSaSvData(rValSwitch.conSaSv, lValSwitch);
+			}
+		} else if (inRuleOutput) {
+			calcConSaSvData(lValSwitch.conSaSv, rValSwitch);
+		}
+
+		retVal.code = '''«lValSwitch.code» = «rValSwitch.code»;''';
+		return retVal;
+
+//		return '''«doSwitch(object.lvalue)» = «doSwitch(object.expr)»;'''
 	}
 
-	override String caseNeg(Neg object) {
-		return '''-«doSwitch(object.right)»'''
+	override ReturnInformation caseMulti(Multi object) {
+		
+		val doSwitchLeft = doSwitch(object.left);
+		val doSwitchRight =  doSwitch(object.right);
+		var retVal = new ReturnInformation(doSwitchLeft, doSwitchRight);
+		retVal.code = '''«doSwitch(object.left).code» * «doSwitch(object.right).code»''';
+		return retVal;
+
+//		return '''«doSwitch(object.left)» * «doSwitch(object.right)»''';
 	}
 
-	override String caseVariable(Variable object) {
-		if (object.owner === null || object.owner.name == this.adaptationName) {
-			return '''this->«object.ref.name»''';
-		} else {
-			this.externalVariableOwner = object.owner.name;
-			return '''«doSwitch(object.ref)»''';
-		}
+	override ReturnInformation caseNeg(Neg object) {
+		
+		var doSwitch = doSwitch(object.right);
+		var retVal = new ReturnInformation(doSwitch);
+		retVal.code = doSwitch.code;
+
+		return retVal;
+
+//		return '''-«doSwitch(object.right)»'''
 	}
 
-	override String caseSingleVarDeclaration(SingleVarDeclaration object) {
-		var returnVal = '''«object.name»'''
-		return returnVal;
+	override ReturnInformation caseSingleVarDeclaration(SingleVarDeclaration object) {
+		var retVal = new ReturnInformation();
+		retVal.code = '''«object.name»''';
+		return retVal;
+
+//		var returnVal = '''«object.name»'''
+//		return returnVal;
 	}
 
-	override String caseCompositeOutputFunction(CompositeOutputFunction object) {
+	override ReturnInformation caseCompositeOutputFunction(CompositeOutputFunction object) {
+
+		var retVal = new ReturnInformation();
 		val functionSig = createFunctionSignature("flush", "void");
-		val returnVal = '''
+		retVal.code = '''
 			«functionSig»{
 				«FOR stm : object.statements»
-					«doSwitch(stm)»
+					«doSwitch(stm).code»
 				«ENDFOR»
 			}
 		''';
-		return returnVal;
+		return retVal;
+
+//		val functionSig = createFunctionSignature("flush", "void");
+//		val returnVal = '''
+//			«functionSig»{
+//				«FOR stm : object.statements»
+//					«doSwitch(stm)»
+//				«ENDFOR»
+//			}
+//		''';
+//		return returnVal;
 	}
 
-	public def getVars() { return this.globalVars; }
+	override ReturnInformation caseVariable(Variable object) {
 
-	override String caseDeclaration(Declaration object) {
-		var returnVal = "";
+		var retVal = new ReturnInformation();
 
-		for (decl : object.declarations) {
-			returnVal += doSwitch(decl.expr);
-			globalVars.put(decl.name, lastVal);
+		if (object.owner === null || object.owner.name == this.adaptationName) {
+			retVal.code = '''this->«object.ref.name»''';
+			if (SASVs.containsKey(object.ref.name)) {
+				retVal.conSaSv = SASVs.get(object.ref.name);
+			} else if (globalVars2.containsKey(object.ref.name)) {
+				retVal.conGlobVar = globalVars2.get(object.ref.name);
+			}
+		} else {
+			// TODO: Extract the correct variable here
+			this.externalVariableOwner = object.owner.name;
+			retVal.code = '''«doSwitch(object.ref).code»''';
 		}
-		return returnVal;
+		return retVal;
+
+//		if (object.owner === null || object.owner.name == this.adaptationName) {
+//			return '''this->«object.ref.name»''';
+//		} else {
+//			this.externalVariableOwner = object.owner.name;
+//			return '''«doSwitch(object.ref)»''';
+//		}
 	}
 
-	override String caseRealLiteral(RealLiteral object) {
-		lastVal = convertType(SVType.Real, object);
-		return '''«object.value»''';
+	override ReturnInformation caseLValueDeclaration(LValueDeclaration object) {
+
+		var retVal = new ReturnInformation();
+		retVal.code = '''«object.name»''';
+		return retVal;
+
+//		return '''«object.name»'''
 	}
 
-	private def Pair<SVType, Object> convertType(SVType type, Literal object) {
-		switch (type) {
-			case Real: {
-				return type -> (object as RealLiteral).value.doubleValue;
-			}
-			default: {
-			}
+	/*
+	 * This is out var and in var declarations.
+	 */
+	override ReturnInformation caseDeclaration(Declaration object) {
+		var retVal2 = new ReturnInformation();
+		for (decl : object.declarations) {
+			var doSwitchRes = doSwitch(decl.expr);
+
+			retVal2.appendCode(doSwitchRes.code);
+
+			var globVar = new GlobalInOutVariable();
+			globVar.name = decl.name;
+			globVar.value = doSwitchRes.value;
+			globVar.type = doSwitchRes.type;
+
+			globalVars2.put(decl.name, globVar);
 		}
+
+		return retVal2;
+
+//		var returnVal = "";
+//
+//		for (decl : object.declarations) {
+//			returnVal += doSwitch(decl.expr);
+//			globalVars.put(decl.name, lastVal);
+//		}
+//		return returnVal;
+	}
+
+	override ReturnInformation caseIsSet(IsSet object) {
+		var retInfo = new ReturnInformation();
+//		retInfo.type = SVType.Real;
+//		retInfo.value = convertTypeToObject(retInfo.type, object);
+		retInfo.code = '''this->isSet«(object.args as Variable).ref.name»''';
+		return retInfo;
+
+//		return '''this->isSet«(object.args as Variable).ref.name»'''
+	}
+
+	override ReturnInformation caseRealLiteral(RealLiteral object) {
+		var retInfo = new ReturnInformation();
+		retInfo.type = SVType.Real;
+		retInfo.value = convertTypeToObject(retInfo.type, object);
+		retInfo.code = '''«object.value»''';
+		return retInfo;
+
+//		lastVal = convertType(SVType.Real, object);
+//		return '''«object.value»''';
+	}
+
+	override ReturnInformation caseIntLiteral(IntLiteral object) {
+		var retInfo = new ReturnInformation();
+		retInfo.type = SVType.Integer;
+		retInfo.value = convertTypeToObject(retInfo.type, object);
+		retInfo.code = '''«object.value»''';
+		return retInfo;
+
+//		return '''«object.value»''';
+	}
+
+	override ReturnInformation caseBoolLiteral(BoolLiteral object) {
+		var retInfo = new ReturnInformation();
+		retInfo.type = SVType.Boolean;
+		retInfo.value = convertTypeToObject(retInfo.type, object);
+		retInfo.code = '''«object.value»''';
+
+		return retInfo;
+
+//		return '''«object.value»''';
 	}
 
+//	private def Pair<SVType, Object> convertType(SVType type, Literal object) {
+//		switch (type) {
+//			case Real: {
+//				return type -> (object as RealLiteral).value.doubleValue;
+//			}
+//			default: {
+//			}
+//		}
+//	}
 }

+ 36 - 23
DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp/src/be/uantwerpen/ansymo/semanticadaptation/cg/cpp/InRulesConditionSwitch.xtend

@@ -1,43 +1,56 @@
 package be.uantwerpen.ansymo.semanticadaptation.cg.cpp
 
 import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.Assignment
-import java.util.LinkedHashMap
 import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.CompositeOutputFunction
+import java.util.LinkedHashMap
 import java.util.ArrayList
-import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.StateTransitionFunction
 
 class InRulesConditionSwitch extends InOutRulesConditionSwitch {
 
 	private Boolean inOutputFunction = false;
-	private Boolean inTransitionFunction = false;
 
-	new(String adaptationClassName, String adaptationName, LinkedHashMap<String, LinkedHashMap<String, MappedScalarVariable>> mSVars) {
-		super(adaptationClassName, adaptationName, "in_rule_", mSVars
-		);
-	}
-	
-	override String caseStateTransitionFunction(StateTransitionFunction object) {
-		this.inTransitionFunction = true;
-		val returnVal = super.caseStateTransitionFunction(object);
-		this.inTransitionFunction = false;
-		return returnVal;
+	new(String adaptationClassName, String adaptationName, LinkedHashMap<String, LinkedHashMap<String, MappedScalarVariable>> mSVars, LinkedHashMap<String,SAScalarVariable> SASVs) {
+		super(adaptationClassName, adaptationName, "in_rule_", mSVars, SASVs);
 	}
 
-	override String caseCompositeOutputFunction(CompositeOutputFunction object) {
+
+	override ReturnInformation caseCompositeOutputFunction(CompositeOutputFunction object) {
+		
 		this.inOutputFunction = true;
-		val returnVal = super.caseCompositeOutputFunction(object);
+		val ReturnInformation retVal = super.caseCompositeOutputFunction(object);
 		this.inOutputFunction = false;
-		return returnVal;
+		return retVal;
+	
+//		this.inOutputFunction = true;
+//		val returnVal = super.caseCompositeOutputFunction(object);
+//		this.inOutputFunction = false;
+//		return returnVal;
 	}
 
-	override String caseAssignment(Assignment object) {
-		// We need to record the assignments such that we can get the correct variability and such later on. In this case we are in input		
-		if (inOutputFunction) {	'''
-			setValue(«object.lvalue.owner.name»,«mSVars.get(object.lvalue.owner.name).get(object.lvalue.ref.name).define»,«doSwitch(object.expr)»);
-		''';
-		} else {
-			super.caseAssignment(object);
+	override ReturnInformation caseAssignment(Assignment object) {
+		var retVal = new ReturnInformation();
+				
+		if (inOutputFunction) {
+			retVal.code = 	
+				'''
+					setValue(«object.lvalue.owner.name»,«mSVars.get(object.lvalue.owner.name).get(object.lvalue.ref.name).define»,«doSwitch(object.expr).code»);
+				''';
+			return retVal;
+		}
+		else
+		{
+			return super.caseAssignment(object);
 		}
+	
+
+
+//		// We need to record the assignments such that we can get the correct variability and such later on. In this case we are in input		
+//		if (inOutputFunction) {	'''
+//			setValue(«object.lvalue.owner.name»,«mSVars.get(object.lvalue.owner.name).get(object.lvalue.ref.name).define»,«doSwitch(object.expr)»);
+//		''';
+//		} else {
+//			super.caseAssignment(object);
+//		}
 	}
 
 }

+ 15 - 13
DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp/src/be/uantwerpen/ansymo/semanticadaptation/cg/cpp/OutRulesConditionSwitch.xtend

@@ -1,13 +1,7 @@
 package be.uantwerpen.ansymo.semanticadaptation.cg.cpp;
 
-import java.util.LinkedHashMap;
-
-import org.eclipse.xtext.xbase.lib.Pair;
-
-import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.Assignment;
 import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.Port
-import be.uantwerpen.ansymo.semanticadaptation.semanticAdaptation.StateTransitionFunction
-import java.util.ArrayList
+import java.util.LinkedHashMap
 
 public class OutRulesConditionSwitch extends InOutRulesConditionSwitch {
 
@@ -16,15 +10,23 @@ public class OutRulesConditionSwitch extends InOutRulesConditionSwitch {
 
 	new(String adaptationClassName, 
 		String adaptationName,  
-
-		LinkedHashMap<String, LinkedHashMap<String, MappedScalarVariable>> mSVars) {
-		super(adaptationClassName, adaptationName, "out_rule_", mSVars);
+		LinkedHashMap<String, LinkedHashMap<String, MappedScalarVariable>> mSVars,
+		LinkedHashMap<String,SAScalarVariable> SASVs) {
+		super(adaptationClassName, adaptationName, "out_rule_", mSVars, SASVs);
 	}
 	
-	override String casePort(Port object){
-		//TODO getValueBoolean, getValueInteger, getValueString, getValueReal
+	override ReturnInformation casePort(Port object){
+		var retVal = new ReturnInformation();
+		
 		val type = mSVars.get(this.externalVariableOwner).get(object.name).mappedSv.type.toString;
 		val define = mSVars.get(this.externalVariableOwner).get(object.name).define;
-		return '''getValue«type»(«this.externalVariableOwner»,«define»)'''
+		retVal.code = '''getValue«type»(«this.externalVariableOwner»,«define»)''';
+		
+		return retVal;
+		
+		
+//		val type = mSVars.get(this.externalVariableOwner).get(object.name).mappedSv.type.toString;
+//		val define = mSVars.get(this.externalVariableOwner).get(object.name).define;
+//		return '''getValue«type»(«this.externalVariableOwner»,«define»)'''
 	}
 }

+ 112 - 13
DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp/src/be/uantwerpen/ansymo/semanticadaptation/cg/cpp/ReturnInformation.java

@@ -1,44 +1,143 @@
 package be.uantwerpen.ansymo.semanticadaptation.cg.cpp;
 
+import be.uantwerpen.ansymo.semanticadaptation.cg.cpp.ReturnInformation;
+
 public class ReturnInformation {
 
-	private ScalarVariable sv;
 	private SVType type;
-	private String code;
-	
-	
+	private boolean typeIsSet;
+	private Object value;
+	private String code = "";
+	private SAScalarVariable ConSaSv;
+	private GlobalInOutVariable conGlobVar;
+
 	public ReturnInformation() {
 		// TODO Auto-generated constructor stub
 	}
 
+	public void appendCode(String code) {
+		this.code += code;
+	}
 
 	public String getCode() {
 		return code;
 	}
 
-
 	public void setCode(String code) {
 		this.code = code;
 	}
 
+	public SVType getType() {
+		return type;
+	}
 
-	public ScalarVariable getSv() {
-		return sv;
+	public void setType(SVType type) {
+		this.type = type;
+		this.typeIsSet = true;
 	}
 
+	public Object getValue() {
+		return value;
+	}
 
-	public void setSv(ScalarVariable sv) {
-		this.sv = sv;
+	public void setValue(Object value) {
+		this.value = value;
 	}
 
+	public boolean isTypeIsSet() {
+		return typeIsSet;
+	}
 
-	public SVType getType() {
-		return type;
+	public SAScalarVariable getConSaSv() {
+		return ConSaSv;
 	}
 
+	public void setConSaSv(SAScalarVariable conSaSv) {
+		ConSaSv = conSaSv;
+	}
 
-	public void setType(SVType type) {
-		this.type = type;
+	public GlobalInOutVariable getConGlobVar() {
+		return conGlobVar;
+	}
+
+	public void setConGlobVar(GlobalInOutVariable conGlobVar) {
+		this.conGlobVar = conGlobVar;
+	}
+
+	/*
+	 * This method automatically extracts information that should be passed on
+	 */
+	ReturnInformation(ReturnInformation information) {
+
+		this.conGlobVar = information.conGlobVar;
+		if (information.typeIsSet)
+			this.setType(information.type);
+		this.ConSaSv = information.ConSaSv;
+
+	}
+
+	ReturnInformation(ReturnInformation information, ReturnInformation information2) throws Exception {
+		if (information.conGlobVar != null) {
+			if (information2.conGlobVar != null) {
+				if (information.conGlobVar == information2.conGlobVar) {
+					this.conGlobVar = information.conGlobVar;
+				}
+				// In this case they must have the same type otherwise the
+				// return value is impossible to typecheck.
+				else if (information.conGlobVar.getType() != information2.conGlobVar.getType()) {
+					throw new Exception("The two connected global variables: " + information.conGlobVar.getName()
+							+ " and " + information2.conGlobVar.getName() + " have different types");
+				}
+
+			} else {
+				this.conGlobVar = information.conGlobVar;
+			}
+		} else {
+			if (information2.conGlobVar != null) {
+				this.conGlobVar = information2.conGlobVar;
+			}
+		}
+
+		if (information.typeIsSet) {
+			if (information2.typeIsSet == false) {
+				this.setType(information.getType());
+			} else {
+				if (information.getType() != information2.getType()) {
+					throw new Exception("Two connected return informations have the wrong type: "
+							+ information.getType() + " and " + information2.getType());
+				} else {
+					this.setType(information.getType());
+				}
+			}
+		} else {
+			if (information2.typeIsSet) {
+				this.setType(information2.getType());
+			}
+		}
+
+		if (information.ConSaSv != null) {
+			if (information2.ConSaSv != null) {
+				if (information.ConSaSv != information2.ConSaSv) {
+					throw new Exception(
+							"Two connected return informations contain different ConSaSv have the wrong type: "
+									+ information.ConSaSv.getName() + " and " + information2.ConSaSv.getName());
+				} else {
+					this.setConSaSv(information.ConSaSv);
+				}
+			}
+			else
+			{
+				this.setConSaSv(information.ConSaSv);
+			}
+		}
+		else
+		{
+			if (information2.ConSaSv != null)
+			{
+				this.setConSaSv(information2.ConSaSv);
+			}
+		}
+		
 	}
 
 }

+ 38 - 1
DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp/src/be/uantwerpen/ansymo/semanticadaptation/cg/cpp/SAScalarVariable.java

@@ -1,18 +1,55 @@
 package be.uantwerpen.ansymo.semanticadaptation.cg.cpp;
 
+import java.util.Optional;
+
 public class SAScalarVariable {
 
 	public MappedScalarVariable sv = null;
 	public String defineName;
 	public Integer valueReference;
+	private SVCausality causality;
+	private SVType type;
 	private String name;
+	private Optional<SVVariability> variability = Optional.empty();
 	
 	public SAScalarVariable() {
 		// TODO Auto-generated constructor stub
 	}
 
+	public String getName() {
+		return name;
+	}
+
 	public void setName(String name) {
-	  this.name = name;
+		this.name = name;
+	}
+
+	public SVCausality getCausality() {
+		return causality;
+	}
+
+	public void setCausality(SVCausality causality) {
+		this.causality = causality;
+	}
+
+	public SVType getType() {
+		return type;
+	}
+
+	public void setType(SVType type) {
+		this.type = type;
+	}
+
+	public Optional<SVVariability> getVariability() {
+		return variability;
+	}
+
+	/*
+	 * The variability will only be updated if it is not set.
+	 */
+	public void setVariability(Optional<SVVariability> variability) {
+		if(!this.variability.isPresent())
+		this.variability = variability;
 	}
 
 }

+ 7 - 0
DSL_SemanticAdaptation/be.uantwerpen.ansymo.semanticadaptation.cg.cpp/src/be/uantwerpen/ansymo/semanticadaptation/cg/cpp/SVVariability.java

@@ -0,0 +1,7 @@
+package be.uantwerpen.ansymo.semanticadaptation.cg.cpp;
+
+public enum SVVariability {
+	continuous,
+	discrete
+
+}