|
@@ -41,6 +41,7 @@ Composite schedule {
|
|
|
code = string_join(code, "\tlog(\"INSIDE ORCHESTRATOR CLASS CONSTRUCTOR\")\n")
|
|
|
code = string_join(code, "\treturn!")
|
|
|
result = compile_code(code)
|
|
|
+ log(code)
|
|
|
if element_eq(result, read_root()):
|
|
|
return read_root()!
|
|
|
else:
|
|
@@ -84,9 +85,27 @@ Composite schedule {
|
|
|
String function value(model : Element, name : String, mapping : Element):
|
|
|
return "Running"!
|
|
|
$
|
|
|
+ value_onEntryScript = $
|
|
|
+ Element function value(model : Element, name : String, mapping : Element):
|
|
|
+ Element result
|
|
|
+ String code
|
|
|
+ code = "include \"primitives.alh\"\n"
|
|
|
+ code = string_join(code, "Void function constructor_body (attributes : Element):\n")
|
|
|
+ code = string_join(code, "\tlog(\"INSIDE PARALLEL RUNNING STATE\")\n")
|
|
|
+ code = string_join(code, "\treturn!")
|
|
|
+ result = compile_code(code)
|
|
|
+ if element_eq(result, read_root()):
|
|
|
+ return read_root()!
|
|
|
+ else:
|
|
|
+ return result!
|
|
|
+ $
|
|
|
}
|
|
|
Post_SCCD/transition (post_bs_5, post_ps_7) {
|
|
|
label = "8"
|
|
|
+ value_name = $
|
|
|
+ String function value(model : Element, name : String, mapping : Element):
|
|
|
+ return name!
|
|
|
+ $
|
|
|
}
|
|
|
Post_SCCD/CompositeState post_cs_9 {
|
|
|
label = "9"
|
|
@@ -124,6 +143,10 @@ Composite schedule {
|
|
|
}
|
|
|
Post_SCCD/transition post_trans_15(post_bs_14, post_bs_14) {
|
|
|
label = "15"
|
|
|
+ value_name = $
|
|
|
+ String function value(model : Element, name : String, mapping : Element):
|
|
|
+ return name!
|
|
|
+ $
|
|
|
value_event = $
|
|
|
String function value(model : Element, name : String, mapping : Element):
|
|
|
return "spawn_exec"!
|
|
@@ -186,14 +209,17 @@ Composite schedule {
|
|
|
}
|
|
|
Post_SCCD/transition post_trans_23 (post_bs_19, post_bs_20) {
|
|
|
label = "23"
|
|
|
+ value_name = $
|
|
|
+ String function value(model : Element, name : String, mapping : Element):
|
|
|
+ return name!
|
|
|
+ $
|
|
|
value_cond = $
|
|
|
Element function value(model : Element, name : String, mapping : Element):
|
|
|
String code
|
|
|
Element result
|
|
|
code = "include \"primitives.alh\"\n"
|
|
|
- code = string_join(code, "Void function script(attributes : Element, parameters : Element):\n")
|
|
|
- code = string_join(code, "\tinteger_gt(list_len(attributes[\"queue\"]), 0)\n")
|
|
|
- code = string_join(code, "\treturn!")
|
|
|
+ code = string_join(code, "Boolean function script(attributes : Element, parameters : Element):\n")
|
|
|
+ code = string_join(code, "\treturn integer_gt(list_len(attributes[\"queue\"]), 0)!")
|
|
|
result = compile_code(code)
|
|
|
if element_eq(result, read_root()):
|
|
|
return read_root()!
|
|
@@ -211,16 +237,18 @@ Composite schedule {
|
|
|
String function value(model : Element, name : String, mapping : Element):
|
|
|
return "cd"!
|
|
|
$
|
|
|
- value_parameters = $
|
|
|
+ value_parameter = $
|
|
|
Element function raise(model : Element, name : String, mapping : Element):
|
|
|
String code
|
|
|
Element result
|
|
|
code = "include \"primitives.alh\"\n"
|
|
|
- code = string_join(code, "Void function script(attributes : Element, parameters : Element):\n")
|
|
|
+ code = string_join(code, "Element function script(attributes : Element, parameters : Element):\n")
|
|
|
code = string_join(code, "\tElement param\n")
|
|
|
code = string_join(code, "\tparam = list_create()\n")
|
|
|
+ code = string_join(code, "\tlist_append(param, 'association_name')\n")
|
|
|
code = string_join(code, "\tlist_append(param, list_read(attributes[\"queue\"], 0))\n")
|
|
|
- code = string_join(code, "\treturn!")
|
|
|
+ code = string_join(code, "\tlist_append(param, read_root())\n")
|
|
|
+ code = string_join(code, "\treturn param!")
|
|
|
result = compile_code(code)
|
|
|
if element_eq(result, read_root()):
|
|
|
return read_root()!
|
|
@@ -261,6 +289,10 @@ Composite schedule {
|
|
|
}
|
|
|
Post_SCCD/transition post_trans_30 (post_bs_20, post_bs_19) {
|
|
|
label = "30"
|
|
|
+ value_name = $
|
|
|
+ String function value(model : Element, name : String, mapping : Element):
|
|
|
+ return name!
|
|
|
+ $
|
|
|
value_event = $
|
|
|
String function value(model : Element, name : String, mapping : Element):
|
|
|
return "instance_created"!
|
|
@@ -298,6 +330,8 @@ Composite schedule {
|
|
|
Element result
|
|
|
code = "include \"primitives.alh\"\n"
|
|
|
code = string_join(code, "String function script(attributes : Element, parameters : Element):\n")
|
|
|
+ code = string_join(code, "\tlog(\"TARGET\")\n")
|
|
|
+ code = string_join(code, "\tlog(parameters[0])\n")
|
|
|
code = string_join(code, "\treturn parameters[0]!")
|
|
|
result = compile_code(code)
|
|
|
if element_eq(result, read_root()):
|
|
@@ -305,17 +339,17 @@ Composite schedule {
|
|
|
else:
|
|
|
return result!
|
|
|
$
|
|
|
- value_parameters = $
|
|
|
+ value_parameter = $
|
|
|
Element function raise(model : Element, name : String, mapping : Element):
|
|
|
String code
|
|
|
Element result
|
|
|
code = "include \"primitives.alh\"\n"
|
|
|
- code = string_join(code, "Void function script(attributes : Element, parameters : Element):\n")
|
|
|
+ code = string_join(code, "Element function script(attributes : Element, parameters : Element):\n")
|
|
|
code = string_join(code, "\tElement param\n")
|
|
|
code = string_join(code, "\tparam = list_create()\n")
|
|
|
code = string_join(code, "\tlist_append(param, parameters[0])\n")
|
|
|
code = string_join(code, "\tlist_append(param, attributes[\"id\"])\n")
|
|
|
- code = string_join(code, "\treturn!")
|
|
|
+ code = string_join(code, "\treturn param!")
|
|
|
result = compile_code(code)
|
|
|
if element_eq(result, read_root()):
|
|
|
return read_root()!
|
|
@@ -352,6 +386,10 @@ Composite schedule {
|
|
|
}
|
|
|
Post_SCCD/transition post_trans_35 (post_ps_7, post_bs_33) {
|
|
|
label = "35"
|
|
|
+ value_name = $
|
|
|
+ String function value(model : Element, name : String, mapping : Element):
|
|
|
+ return name!
|
|
|
+ $
|
|
|
value_event = $
|
|
|
String function value(model : Element, name : String, mapping : Element):
|
|
|
return "process_done"!
|
|
@@ -590,12 +628,14 @@ Composite schedule {
|
|
|
Element function value(model : Element, name : String, mapping : Element):
|
|
|
String code
|
|
|
Element result
|
|
|
- String onEntryScript
|
|
|
- onEntryScript = read_attribute(model, mapping["0"], "onEntryScript")
|
|
|
+ String script
|
|
|
+ script = read_attribute(model, mapping["0"], "onEntryScript")
|
|
|
code = "include \"primitives.alh\"\n"
|
|
|
code = string_join(code, "Void function onEntryScript (attributes : Element):\n")
|
|
|
- code = string_join(code, onEntryScript)
|
|
|
- code = string_join(code, "\n\treturn!")
|
|
|
+ code = string_join(code, "\tlog(\"INSIDE INIT STATE\")\n")
|
|
|
+ code = string_join(code, script)
|
|
|
+ code = string_join(code, "\tlog(\"FINISHED EXECUTING INIT ONENTRY\")\n")
|
|
|
+ code = string_join(code, "\treturn!")
|
|
|
log(code)
|
|
|
result = compile_code(code)
|
|
|
if element_eq(result, read_root()):
|
|
@@ -681,6 +721,20 @@ Composite schedule {
|
|
|
Boolean function value(model : Element, name : String, mapping : Element):
|
|
|
return True!
|
|
|
$
|
|
|
+ value_onEntryScript = $
|
|
|
+ Element function value(model : Element, name : String, mapping : Element):
|
|
|
+ Element result
|
|
|
+ String code
|
|
|
+ code = "include \"primitives.alh\"\n"
|
|
|
+ code = string_join(code, "Void function constructor_body (attributes : Element):\n")
|
|
|
+ code = string_join(code, "\tlog(\"INSIDE EXEC WAITING STATE\")\n")
|
|
|
+ code = string_join(code, "\treturn!")
|
|
|
+ result = compile_code(code)
|
|
|
+ if element_eq(result, read_root()):
|
|
|
+ return read_root()!
|
|
|
+ else:
|
|
|
+ return result!
|
|
|
+ $
|
|
|
}
|
|
|
Post_SCCD/BasicState post_bs_7 {
|
|
|
label = "7"
|
|
@@ -697,42 +751,45 @@ Composite schedule {
|
|
|
}
|
|
|
Post_SCCD/transition post_trans_10 (post_bs_6, post_bs_7) {
|
|
|
label = "10"
|
|
|
+ value_name = $
|
|
|
+ String function value(model : Element, name : String, mapping : Element):
|
|
|
+ return name!
|
|
|
+ $
|
|
|
value_cond = $
|
|
|
Element function value(model : Element, name : String, mapping : Element):
|
|
|
String type
|
|
|
String code
|
|
|
Element result
|
|
|
code = "include \"primitives.alh\"\n"
|
|
|
- code = string_join(code, "Void function cond(attributes : Element, parameters : Element):\n")
|
|
|
-
|
|
|
+ code = string_join(code, "Boolean function cond(attributes : Element, parameters : Element):\n")
|
|
|
+ code = string_join(code, "\tBoolean guard\n")
|
|
|
type = read_type(model, mapping["0"])
|
|
|
if bool_or(type == "PM/Join", type == "PM/Start"):
|
|
|
- code = string_join(code, "\tvalue_eq(attributes['token']['")
|
|
|
+ code = string_join(code, "\treturn value_eq(attributes['token']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["0"], "id"))
|
|
|
- code = string_join(code, "'], True)")
|
|
|
+ code = string_join(code, "'], True)!")
|
|
|
elif (type == "PM/Decision"):
|
|
|
- code = string_join(code, "\tbool_and(value_eq(attributes['token']['")
|
|
|
+ code = string_join(code, "\treturn bool_and(value_eq(attributes['token']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["0"], "id"))
|
|
|
code = string_join(code, "'], True), value_eq(attributes['decision_consumes']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["0"], "id"))
|
|
|
code = string_join(code, "'],")
|
|
|
code = string_join(code, read_attribute(model, mapping["2"], "value"))
|
|
|
- code = string_join(code, "))")
|
|
|
+ code = string_join(code, "))!")
|
|
|
elif (type == "PM/Exec"):
|
|
|
- code = string_join(code, "\tbool_and(value_eq(attributes['token']['")
|
|
|
+ code = string_join(code, "\treturn bool_and(value_eq(attributes['token']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["0"], "id"))
|
|
|
code = string_join(code, "'], True) , value_eq(attributes['finish']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["0"], "id"))
|
|
|
- code = string_join(code, "'], True))")
|
|
|
+ code = string_join(code, "'], True))!")
|
|
|
elif (type == "PM/Fork"):
|
|
|
- code = string_join(code, "\tbool_and(value_eq(attributes['token']['")
|
|
|
+ code = string_join(code, "\treturn bool_and(value_eq(attributes['token']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["0"], "id"))
|
|
|
code = string_join(code, "'], True), value_eq(attributes['finish']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["0"], "id"))
|
|
|
code = string_join(code, "']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["1"], "id"))
|
|
|
- code = string_join(code, "'],False))")
|
|
|
- code = string_join(code, "\n\treturn!")
|
|
|
+ code = string_join(code, "'],False))!")
|
|
|
result = compile_code(code)
|
|
|
if element_eq(result, read_root()):
|
|
|
return read_root()!
|
|
@@ -754,7 +811,7 @@ Composite schedule {
|
|
|
code = string_join(code, "', False)\n")
|
|
|
code = string_join(code, "\tdict_overwrite(attributes['token'],'")
|
|
|
code = string_join(code, read_attribute(model, mapping["1"], "id"))
|
|
|
- code = string_join(code, "',True)")
|
|
|
+ code = string_join(code, "',True)\n\tlog(\"START TRIGGERED\")")
|
|
|
elif (type == "PM/Fork"):
|
|
|
code = string_join(code, "\tdict_overwrite(attributes['token'],'")
|
|
|
code = string_join(code, read_attribute(model, mapping["1"], "id"))
|
|
@@ -787,18 +844,18 @@ Composite schedule {
|
|
|
String function value(model : Element, name : String, mapping : Element):
|
|
|
return "local"!
|
|
|
$
|
|
|
- value_parameters = $
|
|
|
+ value_parameter = $
|
|
|
Element function raise(model : Element, name : String, mapping : Element):
|
|
|
String code
|
|
|
Element result
|
|
|
code = "include \"primitives.alh\"\n"
|
|
|
- code = string_join(code, "Void function script(attributes : Element, parameters : Element):\n")
|
|
|
+ code = string_join(code, "Element function parameter(attributes : Element, parameters : Element):\n")
|
|
|
code = string_join(code, "\tElement param\n")
|
|
|
code = string_join(code, "\tparam = list_create()\n")
|
|
|
code = string_join(code, "\tlist_append(param,'")
|
|
|
code = string_join(code, read_attribute(model, mapping["1"], "name"))
|
|
|
code = string_join(code, "')\n")
|
|
|
- code = string_join(code, "\treturn!")
|
|
|
+ code = string_join(code, "\treturn param!")
|
|
|
result = compile_code(code)
|
|
|
if element_eq(result, read_root()):
|
|
|
return read_root()!
|
|
@@ -825,6 +882,10 @@ Composite schedule {
|
|
|
}
|
|
|
Post_SCCD/transition post_etrans_15 (post_bs_7, post_bs_6) {
|
|
|
label = "15"
|
|
|
+ value_name = $
|
|
|
+ String function value(model : Element, name : String, mapping : Element):
|
|
|
+ return name!
|
|
|
+ $
|
|
|
value_event = $
|
|
|
String function value(model : Element, name : String, mapping : Element):
|
|
|
return "terminated"!
|
|
@@ -834,11 +895,10 @@ Composite schedule {
|
|
|
String code
|
|
|
Element result
|
|
|
code = "include \"primitives.alh\"\n"
|
|
|
- code = string_join(code, "Void function cond(attributes : Element, parameters : Element):\n")
|
|
|
- code = string_join(code, "\tvalue_eq('")
|
|
|
+ code = string_join(code, "Boolean function cond(attributes : Element, parameters : Element):\n")
|
|
|
+ code = string_join(code, "\treturn value_eq('")
|
|
|
code = string_join(code, read_attribute(model, mapping["1"], "name"))
|
|
|
- code = string_join(code, "',parameters[0])")
|
|
|
- code = string_join(code, "\n\treturn!")
|
|
|
+ code = string_join(code, "',parameters[0])!")
|
|
|
result = compile_code(code)
|
|
|
if element_eq(result, read_root()):
|
|
|
return read_root()!
|
|
@@ -947,6 +1007,10 @@ Composite schedule {
|
|
|
}
|
|
|
Post_SCCD/transition post_trans_7 (post_pbs_5, post_pbs_5) {
|
|
|
label = "7"
|
|
|
+ value_name = $
|
|
|
+ String function value(model : Element, name : String, mapping : Element):
|
|
|
+ return name!
|
|
|
+ $
|
|
|
value_event = $
|
|
|
String function value(model : Element, name : String, mapping : Element):
|
|
|
return "save"!
|
|
@@ -956,11 +1020,10 @@ Composite schedule {
|
|
|
String code
|
|
|
Element result
|
|
|
code = "include \"primitives.alh\"\n"
|
|
|
- code = string_join(code, "Void function cond(attributes : Element, parameters : Element):\n")
|
|
|
- code = string_join(code, "\tvalue_eq('")
|
|
|
+ code = string_join(code, "Boolean function cond(attributes : Element, parameters : Element):\n")
|
|
|
+ code = string_join(code, "\treturn value_eq('")
|
|
|
code = string_join(code, read_attribute(model, mapping["0"], "name"))
|
|
|
- code = string_join(code, "',parameters[1])")
|
|
|
- code = string_join(code, "\n\treturn!")
|
|
|
+ code = string_join(code, "',parameters[1])!")
|
|
|
result = compile_code(code)
|
|
|
if element_eq(result, read_root()):
|
|
|
return read_root()!
|
|
@@ -1065,6 +1128,10 @@ Composite schedule {
|
|
|
}
|
|
|
Post_SCCD/transition post_trans_consumes_7 (post_bs_consumes_5, post_bs_consumes_5) {
|
|
|
label = "7"
|
|
|
+ value_name = $
|
|
|
+ String function value(model : Element, name : String, mapping : Element):
|
|
|
+ return name!
|
|
|
+ $
|
|
|
value_event = $
|
|
|
String function value(model : Element, name : String, mapping : Element):
|
|
|
return "load"!
|
|
@@ -1074,11 +1141,10 @@ Composite schedule {
|
|
|
String code
|
|
|
Element result
|
|
|
code = "include \"primitives.alh\"\n"
|
|
|
- code = string_join(code, "Void function cond(attributes : Element, parameters : Element):\n")
|
|
|
- code = string_join(code, "\tvalue_eq('")
|
|
|
+ code = string_join(code, "Boolean function cond(attributes : Element, parameters : Element):\n")
|
|
|
+ code = string_join(code, "\treturn value_eq('")
|
|
|
code = string_join(code, read_attribute(model, mapping["0"], "name"))
|
|
|
- code = string_join(code, "',parameters[1])")
|
|
|
- code = string_join(code, "\n\treturn!")
|
|
|
+ code = string_join(code, "',parameters[1])!")
|
|
|
result = compile_code(code)
|
|
|
if element_eq(result, read_root()):
|
|
|
return read_root()!
|
|
@@ -1125,15 +1191,14 @@ Composite schedule {
|
|
|
return "narrow"!
|
|
|
$
|
|
|
value_target = $
|
|
|
- Element function value(model : Element, name : String, mapping : Element):
|
|
|
+ String function value(model : Element, name : String, mapping : Element):
|
|
|
String code
|
|
|
Element result
|
|
|
code = "include \"primitives.alh\"\n"
|
|
|
- code = string_join(code, "Void function target(attributes : Element, parameters : Element):\n")
|
|
|
- code = string_join(code, "\tattributes['assn_names']['")
|
|
|
+ code = string_join(code, "String function target(attributes : Element, parameters : Element):\n")
|
|
|
+ code = string_join(code, "\treturn attributes['assn_names']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["0"], "name"))
|
|
|
- code = string_join(code, "']")
|
|
|
- code = string_join(code, "\n\treturn!")
|
|
|
+ code = string_join(code, "']!")
|
|
|
result = compile_code(code)
|
|
|
if element_eq(result, read_root()):
|
|
|
return read_root()!
|
|
@@ -1148,9 +1213,8 @@ Composite schedule {
|
|
|
String code
|
|
|
Element result
|
|
|
code = "include \"primitives.alh\"\n"
|
|
|
- code = string_join(code, "Void function exp(attributes : Element, parameters : Element):\n")
|
|
|
- code = string_join(code, "\tattributes['data'][parameters[0]]")
|
|
|
- code = string_join(code, "\n\treturn!")
|
|
|
+ code = string_join(code, "String function exp(attributes : Element, parameters : Element):\n")
|
|
|
+ code = string_join(code, "\treturn attributes['data'][parameters[0]]!")
|
|
|
result = compile_code(code)
|
|
|
if element_eq(result, read_root()):
|
|
|
return read_root()!
|
|
@@ -1263,42 +1327,45 @@ Composite schedule {
|
|
|
}
|
|
|
Post_SCCD/transition post_10(post_8, post_8) {
|
|
|
label = "10"
|
|
|
+ value_name = $
|
|
|
+ String function value(model : Element, name : String, mapping : Element):
|
|
|
+ return name!
|
|
|
+ $
|
|
|
value_cond = $
|
|
|
Element function value(model : Element, name : String, mapping : Element):
|
|
|
String type
|
|
|
String code
|
|
|
Element result
|
|
|
code = "include \"primitives.alh\"\n"
|
|
|
- code = string_join(code, "Void function cond(attributes : Element, parameters : Element):\n")
|
|
|
+ code = string_join(code, "Boolean function cond(attributes : Element, parameters : Element):\n")
|
|
|
|
|
|
type = read_type(model, mapping["0"])
|
|
|
if bool_or(type == "PM/Join", type == "PM/Start"):
|
|
|
- code = string_join(code, "\tvalue_eq(attributes['token']['")
|
|
|
+ code = string_join(code, "\treturn value_eq(attributes['token']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["0"], "id"))
|
|
|
- code = string_join(code, "'], True)")
|
|
|
+ code = string_join(code, "'], True)!")
|
|
|
elif (type == "PM/Decision"):
|
|
|
- code = string_join(code, "\tbool_and(value_eq(attributes['token']['")
|
|
|
+ code = string_join(code, "\treturn bool_and(value_eq(attributes['token']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["0"], "id"))
|
|
|
code = string_join(code, "'], True),value_eq(attributes['decision_consumes']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["0"], "id"))
|
|
|
code = string_join(code, "'],")
|
|
|
code = string_join(code, read_attribute(model, mapping["2"], "value"))
|
|
|
- code = string_join(code, "))")
|
|
|
+ code = string_join(code, "))!")
|
|
|
elif (type == "PM/Exec"):
|
|
|
- code = string_join(code, "\tbool_and(value_eq(attributes['token']['")
|
|
|
+ code = string_join(code, "\treturn bool_and(value_eq(attributes['token']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["0"], "id"))
|
|
|
code = string_join(code, "'],True), value_eq(attributes['finish']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["0"], "id"))
|
|
|
- code = string_join(code, "'],True))")
|
|
|
+ code = string_join(code, "'],True))!")
|
|
|
elif (type == "PM/Fork"):
|
|
|
- code = string_join(code, "\tbool_and(value_eq(attributes['token']['")
|
|
|
+ code = string_join(code, "\treturn bool_and(value_eq(attributes['token']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["0"], "id"))
|
|
|
code = string_join(code, "'],True),value_eq(attributes['finish']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["0"], "id"))
|
|
|
code = string_join(code, "']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["1"], "id"))
|
|
|
- code = string_join(code, "'],False))")
|
|
|
- code = string_join(code, "\n\treturn!")
|
|
|
+ code = string_join(code, "'],False))!")
|
|
|
result = compile_code(code)
|
|
|
if element_eq(result, read_root()):
|
|
|
return read_root()!
|
|
@@ -1459,23 +1526,27 @@ Composite schedule {
|
|
|
}
|
|
|
Post_SCCD/transition post_f_12(post_f_8, post_f_9) {
|
|
|
label = "12"
|
|
|
+ value_name = $
|
|
|
+ String function value(model : Element, name : String, mapping : Element):
|
|
|
+ return name!
|
|
|
+ $
|
|
|
value_cond = $
|
|
|
String function value(model : Element, name : String, mapping : Element):
|
|
|
String type
|
|
|
String code
|
|
|
Element result
|
|
|
code = "include \"primitives.alh\"\n"
|
|
|
- code = string_join(code, "Void function cond(attributes : Element, parameters : Element):\n")
|
|
|
+ code = string_join(code, "Boolean function cond(attributes : Element, parameters : Element):\n")
|
|
|
|
|
|
type = read_type(model, mapping["0"])
|
|
|
if bool_or(type == "PM/Join", type == "PM/Start"):
|
|
|
- code = string_join(code,"\tbool_and(value_eq(attributes['token']['")
|
|
|
+ code = string_join(code,"\treturn bool_and(value_eq(attributes['token']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["0"], "id"))
|
|
|
code = string_join(code, "'],True), value_eq(attributes['token']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["1"], "id"))
|
|
|
- code = string_join(code, "'],False))")
|
|
|
+ code = string_join(code, "'],False))!")
|
|
|
elif (type == "PM/Decision"):
|
|
|
- code = string_join(code,"\tbool_and(bool_and(value_eq(attributes['token']['")
|
|
|
+ code = string_join(code,"\treturn bool_and(bool_and(value_eq(attributes['token']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["0"], "id"))
|
|
|
code = string_join(code, "'],True), value_eq(attributes['decision_consumes']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["0"], "id"))
|
|
@@ -1483,16 +1554,15 @@ Composite schedule {
|
|
|
code = string_join(code, read_attribute(model, mapping["2"], "value"))
|
|
|
code = string_join(code, ")), value_eq(attributes['token']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["1"], "id"))
|
|
|
- code = string_join(code, "'],False))")
|
|
|
+ code = string_join(code, "'],False))!")
|
|
|
elif (type == "PM/Exec"):
|
|
|
- code = string_join(code,"\tbool_and(bool_and(value_eq(attributes['token']['")
|
|
|
+ code = string_join(code,"\treturn bool_and(bool_and(value_eq(attributes['token']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["0"], "id"))
|
|
|
code = string_join(code, "'],True), value_eq(attributes['finish']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["0"], "id"))
|
|
|
code = string_join(code, "'],True)), value_eq(attributes['token']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["1"], "id"))
|
|
|
- code = string_join(code, "'],False))")
|
|
|
- code = string_join(code, "\n\treturn!")
|
|
|
+ code = string_join(code, "'],False))!")
|
|
|
result = compile_code(code)
|
|
|
if element_eq(result, read_root()):
|
|
|
return read_root()!
|
|
@@ -1535,6 +1605,10 @@ Composite schedule {
|
|
|
}
|
|
|
Post_SCCD/transition post_f_13(post_f_9, post_f_8) {
|
|
|
label = "13"
|
|
|
+ value_name = $
|
|
|
+ String function value(model : Element, name : String, mapping : Element):
|
|
|
+ return name!
|
|
|
+ $
|
|
|
value_cond = $
|
|
|
Element function value(model : Element, name : String, mapping : Element):
|
|
|
String joined_str
|
|
@@ -1546,7 +1620,7 @@ Composite schedule {
|
|
|
String code
|
|
|
Element result
|
|
|
code = "include \"primitives.alh\"\n"
|
|
|
- code = string_join(code, "Void function cond(attributes : Element, parameters : Element):\n")
|
|
|
+ code = string_join(code, "Boolean function cond(attributes : Element, parameters : Element):\n")
|
|
|
|
|
|
last_operand = ""
|
|
|
pairs = create_node()
|
|
@@ -1603,9 +1677,9 @@ Composite schedule {
|
|
|
joined_str = string_join(joined_str, ")")
|
|
|
elif list_len(pairs) == 1:
|
|
|
joined_str = list_read(pairs, 0)
|
|
|
- code = string_join(code, "\t")
|
|
|
+ code = string_join(code, "\treturn ")
|
|
|
code = string_join(code, joined_str)
|
|
|
- code = string_join(code, "\n\treturn!")
|
|
|
+ code = string_join(code, "!")
|
|
|
result = compile_code(code)
|
|
|
if element_eq(result, read_root()):
|
|
|
return read_root()!
|
|
@@ -1716,6 +1790,10 @@ Composite schedule {
|
|
|
}
|
|
|
Post_SCCD/transition post_j_10(post_j_8, post_j_8) {
|
|
|
label = "10"
|
|
|
+ value_name = $
|
|
|
+ String function value(model : Element, name : String, mapping : Element):
|
|
|
+ return name!
|
|
|
+ $
|
|
|
value_cond = $
|
|
|
Element function value(model : Element, name : String, mapping : Element):
|
|
|
String joined_str
|
|
@@ -1727,7 +1805,7 @@ Composite schedule {
|
|
|
String code
|
|
|
Element result
|
|
|
code = "include \"primitives.alh\"\n"
|
|
|
- code = string_join(code, "Void function cond(attributes : Element, parameters : Element):\n")
|
|
|
+ code = string_join(code, "Boolean function cond(attributes : Element, parameters : Element):\n")
|
|
|
|
|
|
pairs = create_node()
|
|
|
incoming_assns = allIncomingAssociationInstances(model, mapping["0"], "PM/Next")
|
|
@@ -1767,7 +1845,7 @@ Composite schedule {
|
|
|
i = 0
|
|
|
while (i < list_len(pairs)):
|
|
|
if joined_str == "":
|
|
|
- joined_str = string_join("\tbool_and(", list_read(pairs,i))
|
|
|
+ joined_str = string_join("\treturn bool_and(", list_read(pairs,i))
|
|
|
i = i + 1
|
|
|
joined_str = string_join(joined_str," , ")
|
|
|
joined_str = string_join(joined_str, list_read(pairs,i))
|
|
@@ -1780,10 +1858,10 @@ Composite schedule {
|
|
|
i = i + 1
|
|
|
joined_str = string_join(joined_str, ")")
|
|
|
elif value_eq(list_len(pairs), 1):
|
|
|
- joined_str = string_join("\t", list_read(pairs, 0))
|
|
|
+ joined_str = string_join("\treturn ", list_read(pairs, 0))
|
|
|
|
|
|
code = string_join(code, joined_str)
|
|
|
- code = string_join(code, "\n\treturn!")
|
|
|
+ code = string_join(code, "!")
|
|
|
result = compile_code(code)
|
|
|
if element_eq(result, read_root()):
|
|
|
return read_root()!
|
|
@@ -1921,34 +1999,37 @@ Composite schedule {
|
|
|
}
|
|
|
Post_SCCD/transition post_e_7(post_e_5, post_e_5) {
|
|
|
label = "7"
|
|
|
+ value_name = $
|
|
|
+ String function value(model : Element, name : String, mapping : Element):
|
|
|
+ return name!
|
|
|
+ $
|
|
|
value_cond = $
|
|
|
Element function value(model : Element, name : String, mapping : Element):
|
|
|
String type
|
|
|
String code
|
|
|
Element result
|
|
|
code = "include \"primitives.alh\"\n"
|
|
|
- code = string_join(code, "Void function cond(attributes : Element, parameters : Element):\n")
|
|
|
+ code = string_join(code, "Boolean function cond(attributes : Element, parameters : Element):\n")
|
|
|
|
|
|
type = read_type(model, mapping["0"])
|
|
|
if bool_or(bool_or(type == "PM/Join", type == "PM/Fork"),type=="PM/Start"):
|
|
|
- code = string_join(code, "\tvalue_eq(attributes['token']['")
|
|
|
+ code = string_join(code, "\treturn value_eq(attributes['token']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["0"], "id"))
|
|
|
- code = string_join(code, "'],True)")
|
|
|
+ code = string_join(code, "'],True)!")
|
|
|
elif (type == "PM/Decision"):
|
|
|
- code = string_join(code, "\tbool_and(value_eq(attributes['token']['")
|
|
|
+ code = string_join(code, "\treturn bool_and(value_eq(attributes['token']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["0"], "id"))
|
|
|
code = string_join(code, "'],True), value_eq(attributes['decision_consumes']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["0"], "id"))
|
|
|
code = string_join(code, "'],")
|
|
|
code = string_join(code, read_attribute(model, mapping["11"], "value"))
|
|
|
- code = string_join(code, "))")
|
|
|
+ code = string_join(code, "))!")
|
|
|
elif (type == "PM/Exec"):
|
|
|
- code = string_join(code, "\tbool_and(value_eq(attributes['token']['")
|
|
|
+ code = string_join(code, "\treturn bool_and(value_eq(attributes['token']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["0"], "id"))
|
|
|
code = string_join(code, "'],True), value_eq(attributes['finish']['")
|
|
|
code = string_join(code, read_attribute(model, mapping["0"], "id"))
|
|
|
- code = string_join(code, "'],True))")
|
|
|
- code = string_join(code, "\n\treturn!")
|
|
|
+ code = string_join(code, "'],True))!")
|
|
|
result = compile_code(code)
|
|
|
if element_eq(result, read_root()):
|
|
|
return read_root()!
|