Commit 4938fb88 authored by Lars Schieffer's avatar Lars Schieffer
Browse files

update transient

parent 2259db19
......@@ -280,7 +280,7 @@ def selfLoop(label: str, location: str) -> dict:
return {"action": label, "location": location, "destinations": [destination]}
def edgesByLabelOf(edgesByLocation: dict, automaton: str) -> dict:
def edgesByLabelOf(edgesByLocation: dict, automaton: str) -> (dict, set):
"""
Function Description:
Gather edges of jani-model automaton according their labels.
......
......@@ -52,7 +52,10 @@ def createTransientDeclaration(
modelLocations = pinsModel.getLocations()
stateVector = pinsModel.getStateVector()
declaration = ["// Transient Values"]
declaration += [variable for variable in transients.values()]
declaration += [
"{} {} = {};".format("int", identifier, str(int(value)))
for identifier, value in transients.items()
]
if groups:
for index, group in enumerate(pinsModel.getTransitionGroups()):
groupLocations = group.getAutomataLocations()
......
......@@ -161,8 +161,7 @@ class StateVector:
else:
slotType = kind
if transient:
declaration = "{} {} = {};".format("int", identifier, str(int(initial)))
self.__transientVariables[identifier] = declaration
self.__transientVariables[identifier] = initial
else:
self.addSlot(identifier, initial, slotType, SlotMode.VARIABLE)
......
......@@ -274,12 +274,9 @@ class TransitionGroup:
Enabling conditions according long, short or r2w state vector.
"""
stateVectorChanges = {}
occurringTransients = set()
groupCode = []
for edge in self.__edges:
for change in edge["changes"]:
if not stateVector.isSlot(change["ref"]):
occurringTransients.add(change["ref"])
index = str(change["index"])
update = (edge["enable"], change)
if index not in stateVectorChanges:
......@@ -297,14 +294,16 @@ class TransitionGroup:
groupCode += self.__declareVariablesCode(
self.__write, stateVector, modelLocations, readIndex=1
)
groupCode += self.__declareTransientCode(occurringTransients, readIndex=1)
groupCode += self.__declareTransientCode(
stateVector.getTransientVariables(), readIndex=1
)
for changeIndex, index in enumerate(sorted(stateVectorChanges)):
if changeIndex > 0:
groupCode += self.__declareVariablesCode(
self.__write, readIndex=changeIndex + 1
)
groupCode += self.__declareTransientCode(
occurringTransients, readIndex=changeIndex + 1
stateVector.getTransientVariables(), readIndex=changeIndex + 1
)
for condition, change in stateVectorChanges[index]:
enableCondition = self.__edgeEnableCondition(
......@@ -457,14 +456,14 @@ class TransitionGroup:
declaredVariables.append(self.__indent + slotVariableCode)
return declaredVariables
def __declareTransientCode(self, transientIdentifiers: set, readIndex=0) -> list:
def __declareTransientCode(self, transientIdentifiers: dict, readIndex=0) -> list:
"""
Function Description:
Get source code for declaring transient in group implementation
Function Parameters:
transientIdentifier: set
All occurring transient identifier
transientIdentifier: dict
All transient identifier
readIndex= ""
For representing consecutive changes on state vector
"""
......@@ -477,7 +476,9 @@ class TransitionGroup:
)
else:
transientCode = variableDeclareString.format(
"transient_" + transient, readIndex, transient
"transient_" + transient,
readIndex,
str(int(transientIdentifiers[transient])),
)
declaredTransient.append(self.__indent + transientCode)
return declaredTransient
......@@ -40,7 +40,11 @@ def handleIdentifier(
if stateVector and expression in stateVector.getPositions():
return "sourceStateVector[{}]".format(stateVector.getPositions()[expression])
elif stateVector.isTransient(expression):
return "transient_" + expression + str(readIndex)
if readIndex == "0":
initial = str(int(stateVector.getTransientVariables()[expression]))
return initial
else:
return "transient_" + expression + str(readIndex)
elif stateVector.isConstant(expression):
return validIdentifier(expression, "")
else:
......
......@@ -59,6 +59,8 @@ int nextStateLong(model_t model, int group, int *sourceStateVector, TransitionCB
memcpy(targetStateVector, sourceStateVector, STATEVECTORLENGTH * sizeof(int));
int main_coup41 = sourceStateVector[2];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 0){
main_instance_01 = 14;
}
......@@ -77,6 +79,8 @@ int nextStateLong(model_t model, int group, int *sourceStateVector, TransitionCB
memcpy(targetStateVector, sourceStateVector, STATEVECTORLENGTH * sizeof(int));
int main_coup31 = sourceStateVector[4];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 1){
main_instance_01 = 2;
}
......@@ -94,6 +98,8 @@ int nextStateLong(model_t model, int group, int *sourceStateVector, TransitionCB
int targetStateVector[STATEVECTORLENGTH];
memcpy(targetStateVector, sourceStateVector, STATEVECTORLENGTH * sizeof(int));
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if ((sourceStateVector[0] == 2) && ((sourceStateVector[3] == 4) || (sourceStateVector[1] == 4))){
main_instance_01 = 0;
}
......@@ -107,6 +113,8 @@ int nextStateLong(model_t model, int group, int *sourceStateVector, TransitionCB
int targetStateVector[STATEVECTORLENGTH];
memcpy(targetStateVector, sourceStateVector, STATEVECTORLENGTH * sizeof(int));
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if ((sourceStateVector[0] == 2) && (!((sourceStateVector[3] == 4) || (sourceStateVector[1] == 4)))){
main_instance_01 = 14;
}
......@@ -121,6 +129,8 @@ int nextStateLong(model_t model, int group, int *sourceStateVector, TransitionCB
memcpy(targetStateVector, sourceStateVector, STATEVECTORLENGTH * sizeof(int));
int main_coup21 = sourceStateVector[5];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 3){
main_instance_01 = 4;
}
......@@ -138,6 +148,8 @@ int nextStateLong(model_t model, int group, int *sourceStateVector, TransitionCB
int targetStateVector[STATEVECTORLENGTH];
memcpy(targetStateVector, sourceStateVector, STATEVECTORLENGTH * sizeof(int));
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if ((sourceStateVector[0] == 4) && ((sourceStateVector[3] == 3) || (sourceStateVector[1] == 3))){
main_instance_01 = 1;
}
......@@ -151,6 +163,8 @@ int nextStateLong(model_t model, int group, int *sourceStateVector, TransitionCB
int targetStateVector[STATEVECTORLENGTH];
memcpy(targetStateVector, sourceStateVector, STATEVECTORLENGTH * sizeof(int));
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if ((sourceStateVector[0] == 4) && (!((sourceStateVector[3] == 3) || (sourceStateVector[1] == 3)))){
main_instance_01 = 2;
}
......@@ -165,6 +179,8 @@ int nextStateLong(model_t model, int group, int *sourceStateVector, TransitionCB
memcpy(targetStateVector, sourceStateVector, STATEVECTORLENGTH * sizeof(int));
int main_coup11 = sourceStateVector[6];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 5){
main_instance_01 = 6;
}
......@@ -182,6 +198,8 @@ int nextStateLong(model_t model, int group, int *sourceStateVector, TransitionCB
int targetStateVector[STATEVECTORLENGTH];
memcpy(targetStateVector, sourceStateVector, STATEVECTORLENGTH * sizeof(int));
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if ((sourceStateVector[0] == 6) && ((sourceStateVector[3] == 2) || (sourceStateVector[1] == 2))){
main_instance_01 = 3;
}
......@@ -195,6 +213,8 @@ int nextStateLong(model_t model, int group, int *sourceStateVector, TransitionCB
int targetStateVector[STATEVECTORLENGTH];
memcpy(targetStateVector, sourceStateVector, STATEVECTORLENGTH * sizeof(int));
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if ((sourceStateVector[0] == 6) && (!((sourceStateVector[3] == 2) || (sourceStateVector[1] == 2)))){
main_instance_01 = 4;
}
......@@ -209,6 +229,8 @@ int nextStateLong(model_t model, int group, int *sourceStateVector, TransitionCB
memcpy(targetStateVector, sourceStateVector, STATEVECTORLENGTH * sizeof(int));
int main_coup01 = sourceStateVector[7];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 7){
main_instance_01 = 8;
}
......@@ -226,6 +248,8 @@ int nextStateLong(model_t model, int group, int *sourceStateVector, TransitionCB
int targetStateVector[STATEVECTORLENGTH];
memcpy(targetStateVector, sourceStateVector, STATEVECTORLENGTH * sizeof(int));
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if ((sourceStateVector[0] == 8) && ((sourceStateVector[3] == 1) || (sourceStateVector[1] == 1))){
main_instance_01 = 5;
}
......@@ -239,6 +263,8 @@ int nextStateLong(model_t model, int group, int *sourceStateVector, TransitionCB
int targetStateVector[STATEVECTORLENGTH];
memcpy(targetStateVector, sourceStateVector, STATEVECTORLENGTH * sizeof(int));
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if ((sourceStateVector[0] == 8) && (!((sourceStateVector[3] == 1) || (sourceStateVector[1] == 1)))){
main_instance_01 = 6;
}
......@@ -252,6 +278,8 @@ int nextStateLong(model_t model, int group, int *sourceStateVector, TransitionCB
int targetStateVector[STATEVECTORLENGTH];
memcpy(targetStateVector, sourceStateVector, STATEVECTORLENGTH * sizeof(int));
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if ((sourceStateVector[0] == 9) && ((sourceStateVector[3] == 0) || (sourceStateVector[1] == 0))){
main_instance_01 = 7;
}
......@@ -265,6 +293,8 @@ int nextStateLong(model_t model, int group, int *sourceStateVector, TransitionCB
int targetStateVector[STATEVECTORLENGTH];
memcpy(targetStateVector, sourceStateVector, STATEVECTORLENGTH * sizeof(int));
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if ((sourceStateVector[0] == 9) && (!((sourceStateVector[3] == 0) || (sourceStateVector[1] == 0)))){
main_instance_01 = 8;
}
......@@ -278,7 +308,8 @@ int nextStateLong(model_t model, int group, int *sourceStateVector, TransitionCB
int targetStateVector[STATEVECTORLENGTH];
memcpy(targetStateVector, sourceStateVector, STATEVECTORLENGTH * sizeof(int));
int main_instance_01 = sourceStateVector[0];
int transient_numberDraws1 = numberDraws;
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 10){
main_instance_01 = 9;
}
......@@ -296,6 +327,8 @@ int nextStateLong(model_t model, int group, int *sourceStateVector, TransitionCB
memcpy(targetStateVector, sourceStateVector, STATEVECTORLENGTH * sizeof(int));
int main_draw11 = sourceStateVector[1];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 11){
main_instance_01 = 10;
}
......@@ -314,6 +347,8 @@ int nextStateLong(model_t model, int group, int *sourceStateVector, TransitionCB
memcpy(targetStateVector, sourceStateVector, STATEVECTORLENGTH * sizeof(int));
int main_draw11 = sourceStateVector[1];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 11){
main_instance_01 = 10;
}
......@@ -332,6 +367,8 @@ int nextStateLong(model_t model, int group, int *sourceStateVector, TransitionCB
memcpy(targetStateVector, sourceStateVector, STATEVECTORLENGTH * sizeof(int));
int main_draw11 = sourceStateVector[1];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 11){
main_instance_01 = 10;
}
......@@ -350,6 +387,8 @@ int nextStateLong(model_t model, int group, int *sourceStateVector, TransitionCB
memcpy(targetStateVector, sourceStateVector, STATEVECTORLENGTH * sizeof(int));
int main_draw11 = sourceStateVector[1];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 11){
main_instance_01 = 10;
}
......@@ -368,6 +407,8 @@ int nextStateLong(model_t model, int group, int *sourceStateVector, TransitionCB
memcpy(targetStateVector, sourceStateVector, STATEVECTORLENGTH * sizeof(int));
int main_draw11 = sourceStateVector[1];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 11){
main_instance_01 = 10;
}
......@@ -386,6 +427,8 @@ int nextStateLong(model_t model, int group, int *sourceStateVector, TransitionCB
memcpy(targetStateVector, sourceStateVector, STATEVECTORLENGTH * sizeof(int));
int main_draw01 = sourceStateVector[3];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 12){
main_instance_01 = 11;
}
......@@ -404,6 +447,8 @@ int nextStateLong(model_t model, int group, int *sourceStateVector, TransitionCB
memcpy(targetStateVector, sourceStateVector, STATEVECTORLENGTH * sizeof(int));
int main_draw01 = sourceStateVector[3];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 12){
main_instance_01 = 11;
}
......@@ -422,6 +467,8 @@ int nextStateLong(model_t model, int group, int *sourceStateVector, TransitionCB
memcpy(targetStateVector, sourceStateVector, STATEVECTORLENGTH * sizeof(int));
int main_draw01 = sourceStateVector[3];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 12){
main_instance_01 = 11;
}
......@@ -440,6 +487,8 @@ int nextStateLong(model_t model, int group, int *sourceStateVector, TransitionCB
memcpy(targetStateVector, sourceStateVector, STATEVECTORLENGTH * sizeof(int));
int main_draw01 = sourceStateVector[3];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 12){
main_instance_01 = 11;
}
......@@ -458,6 +507,8 @@ int nextStateLong(model_t model, int group, int *sourceStateVector, TransitionCB
memcpy(targetStateVector, sourceStateVector, STATEVECTORLENGTH * sizeof(int));
int main_draw01 = sourceStateVector[3];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 12){
main_instance_01 = 11;
}
......@@ -475,6 +526,8 @@ int nextStateLong(model_t model, int group, int *sourceStateVector, TransitionCB
int targetStateVector[STATEVECTORLENGTH];
memcpy(targetStateVector, sourceStateVector, STATEVECTORLENGTH * sizeof(int));
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 13){
main_instance_01 = 13;
}
......@@ -488,6 +541,8 @@ int nextStateLong(model_t model, int group, int *sourceStateVector, TransitionCB
int targetStateVector[STATEVECTORLENGTH];
memcpy(targetStateVector, sourceStateVector, STATEVECTORLENGTH * sizeof(int));
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if ((sourceStateVector[0] == 14) && (!(((sourceStateVector[2] && sourceStateVector[6]) && sourceStateVector[5]) && (sourceStateVector[4] && sourceStateVector[7])))){
main_instance_01 = 12;
}
......@@ -501,6 +556,8 @@ int nextStateLong(model_t model, int group, int *sourceStateVector, TransitionCB
int targetStateVector[STATEVECTORLENGTH];
memcpy(targetStateVector, sourceStateVector, STATEVECTORLENGTH * sizeof(int));
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if ((sourceStateVector[0] == 14) && (!(!(((sourceStateVector[2] && sourceStateVector[6]) && sourceStateVector[5]) && (sourceStateVector[4] && sourceStateVector[7]))))){
main_instance_01 = 13;
}
......@@ -554,6 +611,8 @@ int nextStateR2W(model_t model, int group, int *sourceStateVector, TransitionCB
int targetStateVector[dm_ones_in_row(GBgetDMInfoMustWrite(model), group)];
int main_coup41 = sourceStateVector[1];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 0){
main_instance_01 = 14;
}
......@@ -570,6 +629,8 @@ int nextStateR2W(model_t model, int group, int *sourceStateVector, TransitionCB
int targetStateVector[dm_ones_in_row(GBgetDMInfoMustWrite(model), group)];
int main_coup31 = sourceStateVector[1];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 1){
main_instance_01 = 2;
}
......@@ -585,6 +646,8 @@ int nextStateR2W(model_t model, int group, int *sourceStateVector, TransitionCB
actionLabel[0] = 0;
int targetStateVector[dm_ones_in_row(GBgetDMInfoMustWrite(model), group)];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if ((sourceStateVector[0] == 2) && ((sourceStateVector[2] == 4) || (sourceStateVector[1] == 4))){
main_instance_01 = 0;
}
......@@ -596,6 +659,8 @@ int nextStateR2W(model_t model, int group, int *sourceStateVector, TransitionCB
actionLabel[0] = 0;
int targetStateVector[dm_ones_in_row(GBgetDMInfoMustWrite(model), group)];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if ((sourceStateVector[0] == 2) && (!((sourceStateVector[2] == 4) || (sourceStateVector[1] == 4)))){
main_instance_01 = 14;
}
......@@ -608,6 +673,8 @@ int nextStateR2W(model_t model, int group, int *sourceStateVector, TransitionCB
int targetStateVector[dm_ones_in_row(GBgetDMInfoMustWrite(model), group)];
int main_coup21 = sourceStateVector[1];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 3){
main_instance_01 = 4;
}
......@@ -623,6 +690,8 @@ int nextStateR2W(model_t model, int group, int *sourceStateVector, TransitionCB
actionLabel[0] = 0;
int targetStateVector[dm_ones_in_row(GBgetDMInfoMustWrite(model), group)];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if ((sourceStateVector[0] == 4) && ((sourceStateVector[2] == 3) || (sourceStateVector[1] == 3))){
main_instance_01 = 1;
}
......@@ -634,6 +703,8 @@ int nextStateR2W(model_t model, int group, int *sourceStateVector, TransitionCB
actionLabel[0] = 0;
int targetStateVector[dm_ones_in_row(GBgetDMInfoMustWrite(model), group)];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if ((sourceStateVector[0] == 4) && (!((sourceStateVector[2] == 3) || (sourceStateVector[1] == 3)))){
main_instance_01 = 2;
}
......@@ -646,6 +717,8 @@ int nextStateR2W(model_t model, int group, int *sourceStateVector, TransitionCB
int targetStateVector[dm_ones_in_row(GBgetDMInfoMustWrite(model), group)];
int main_coup11 = sourceStateVector[1];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 5){
main_instance_01 = 6;
}
......@@ -661,6 +734,8 @@ int nextStateR2W(model_t model, int group, int *sourceStateVector, TransitionCB
actionLabel[0] = 0;
int targetStateVector[dm_ones_in_row(GBgetDMInfoMustWrite(model), group)];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if ((sourceStateVector[0] == 6) && ((sourceStateVector[2] == 2) || (sourceStateVector[1] == 2))){
main_instance_01 = 3;
}
......@@ -672,6 +747,8 @@ int nextStateR2W(model_t model, int group, int *sourceStateVector, TransitionCB
actionLabel[0] = 0;
int targetStateVector[dm_ones_in_row(GBgetDMInfoMustWrite(model), group)];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if ((sourceStateVector[0] == 6) && (!((sourceStateVector[2] == 2) || (sourceStateVector[1] == 2)))){
main_instance_01 = 4;
}
......@@ -684,6 +761,8 @@ int nextStateR2W(model_t model, int group, int *sourceStateVector, TransitionCB
int targetStateVector[dm_ones_in_row(GBgetDMInfoMustWrite(model), group)];
int main_coup01 = sourceStateVector[1];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 7){
main_instance_01 = 8;
}
......@@ -699,6 +778,8 @@ int nextStateR2W(model_t model, int group, int *sourceStateVector, TransitionCB
actionLabel[0] = 0;
int targetStateVector[dm_ones_in_row(GBgetDMInfoMustWrite(model), group)];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if ((sourceStateVector[0] == 8) && ((sourceStateVector[2] == 1) || (sourceStateVector[1] == 1))){
main_instance_01 = 5;
}
......@@ -710,6 +791,8 @@ int nextStateR2W(model_t model, int group, int *sourceStateVector, TransitionCB
actionLabel[0] = 0;
int targetStateVector[dm_ones_in_row(GBgetDMInfoMustWrite(model), group)];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if ((sourceStateVector[0] == 8) && (!((sourceStateVector[2] == 1) || (sourceStateVector[1] == 1)))){
main_instance_01 = 6;
}
......@@ -721,6 +804,8 @@ int nextStateR2W(model_t model, int group, int *sourceStateVector, TransitionCB
actionLabel[0] = 0;
int targetStateVector[dm_ones_in_row(GBgetDMInfoMustWrite(model), group)];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if ((sourceStateVector[0] == 9) && ((sourceStateVector[2] == 0) || (sourceStateVector[1] == 0))){
main_instance_01 = 7;
}
......@@ -732,6 +817,8 @@ int nextStateR2W(model_t model, int group, int *sourceStateVector, TransitionCB
actionLabel[0] = 0;
int targetStateVector[dm_ones_in_row(GBgetDMInfoMustWrite(model), group)];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if ((sourceStateVector[0] == 9) && (!((sourceStateVector[2] == 0) || (sourceStateVector[1] == 0)))){
main_instance_01 = 8;
}
......@@ -743,7 +830,8 @@ int nextStateR2W(model_t model, int group, int *sourceStateVector, TransitionCB
actionLabel[0] = 0;
int targetStateVector[dm_ones_in_row(GBgetDMInfoMustWrite(model), group)];
int main_instance_01 = sourceStateVector[0];
int transient_numberDraws1 = numberDraws;
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 10){
main_instance_01 = 9;
}
......@@ -759,6 +847,8 @@ int nextStateR2W(model_t model, int group, int *sourceStateVector, TransitionCB
int targetStateVector[dm_ones_in_row(GBgetDMInfoMustWrite(model), group)];
int main_draw11 = sourceStateVector[1];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 11){
main_instance_01 = 10;
}
......@@ -775,6 +865,8 @@ int nextStateR2W(model_t model, int group, int *sourceStateVector, TransitionCB
int targetStateVector[dm_ones_in_row(GBgetDMInfoMustWrite(model), group)];
int main_draw11 = sourceStateVector[1];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 11){
main_instance_01 = 10;
}
......@@ -791,6 +883,8 @@ int nextStateR2W(model_t model, int group, int *sourceStateVector, TransitionCB
int targetStateVector[dm_ones_in_row(GBgetDMInfoMustWrite(model), group)];
int main_draw11 = sourceStateVector[1];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 11){
main_instance_01 = 10;
}
......@@ -807,6 +901,8 @@ int nextStateR2W(model_t model, int group, int *sourceStateVector, TransitionCB
int targetStateVector[dm_ones_in_row(GBgetDMInfoMustWrite(model), group)];
int main_draw11 = sourceStateVector[1];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 11){
main_instance_01 = 10;
}
......@@ -823,6 +919,8 @@ int nextStateR2W(model_t model, int group, int *sourceStateVector, TransitionCB
int targetStateVector[dm_ones_in_row(GBgetDMInfoMustWrite(model), group)];
int main_draw11 = sourceStateVector[1];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 11){
main_instance_01 = 10;
}
......@@ -839,6 +937,8 @@ int nextStateR2W(model_t model, int group, int *sourceStateVector, TransitionCB
int targetStateVector[dm_ones_in_row(GBgetDMInfoMustWrite(model), group)];
int main_draw01 = sourceStateVector[1];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 12){
main_instance_01 = 11;
}
......@@ -855,6 +955,8 @@ int nextStateR2W(model_t model, int group, int *sourceStateVector, TransitionCB
int targetStateVector[dm_ones_in_row(GBgetDMInfoMustWrite(model), group)];
int main_draw01 = sourceStateVector[1];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 12){
main_instance_01 = 11;
}
......@@ -871,6 +973,8 @@ int nextStateR2W(model_t model, int group, int *sourceStateVector, TransitionCB
int targetStateVector[dm_ones_in_row(GBgetDMInfoMustWrite(model), group)];
int main_draw01 = sourceStateVector[1];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 12){
main_instance_01 = 11;
}
......@@ -887,6 +991,8 @@ int nextStateR2W(model_t model, int group, int *sourceStateVector, TransitionCB
int targetStateVector[dm_ones_in_row(GBgetDMInfoMustWrite(model), group)];
int main_draw01 = sourceStateVector[1];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 12){
main_instance_01 = 11;
}
......@@ -903,6 +1009,8 @@ int nextStateR2W(model_t model, int group, int *sourceStateVector, TransitionCB
int targetStateVector[dm_ones_in_row(GBgetDMInfoMustWrite(model), group)];
int main_draw01 = sourceStateVector[1];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 12){
main_instance_01 = 11;
}
......@@ -918,6 +1026,8 @@ int nextStateR2W(model_t model, int group, int *sourceStateVector, TransitionCB
actionLabel[0] = 0;
int targetStateVector[dm_ones_in_row(GBgetDMInfoMustWrite(model), group)];
int main_instance_01 = sourceStateVector[0];
int transient__ret0_1 = 0;
int transient_numberDraws1 = 0;
if (sourceStateVector[0] == 13){
main_instance_01 = 13;
}
......@@ -929,6 +1039,8 @@ int nextStateR2W(model_t model, int group, int *sourceStateVector, TransitionCB
actionLabel[0] = 0;