|
@@ -57,9 +57,12 @@ Element function sanitize(new_runtime_model : Element, old_runtime_model : Eleme
|
|
|
cstate = readAssociationDestination(old_runtime_model, set_pop(allInstances(old_runtime_model, "CurrentStateLink")))
|
|
|
if (bool_not(dict_in(new_runtime_model["model"], cstate))):
|
|
|
// Current state removed, so fix
|
|
|
+ log("Removed current state")
|
|
|
if (auto):
|
|
|
+ log("Auto-fixing the problem")
|
|
|
cstate = set_pop(allInstances(new_runtime_model, "InitialState"))
|
|
|
else:
|
|
|
+ log("Please give new state")
|
|
|
while (bool_not(dict_in(new_runtime_model["model"], cstate))):
|
|
|
output("REQUEST_CURRENT_STATE")
|
|
|
cstate = input()
|
|
@@ -239,7 +242,7 @@ Void function execute_fsa(design_model : Element):
|
|
|
else:
|
|
|
log("Did not understand command: " + cmd)
|
|
|
|
|
|
- if (conforming == "OK"):
|
|
|
+ if (bool_and(conforming == "OK", running)):
|
|
|
output("SIM_TIME " + cast_v2s(time() - start_time))
|
|
|
output("SIM_STATE " + cast_v2s(read_attribute(runtime_model, readAssociationDestination(runtime_model, set_pop(allInstances(runtime_model, "CurrentStateLink"))), "name")))
|
|
|
|