|
@@ -641,8 +641,8 @@ Boolean function constraint(host_model : Element, name : String):
|
|
|
include "primitives.alh"
|
|
|
include "modelling.alh"
|
|
|
Void function action(host_model : Element, name : String, mapping : Element):
|
|
|
-\tunset_attribute(host_model, name, "tokens")
|
|
|
-\tinstantiate_attribute(host_model, name, "tokens", 5)
|
|
|
+\tlog("Assigning " + cast_v2s(read_attribute(host_model, mapping["0_p"], "tokens")))
|
|
|
+\tinstantiate_attribute(host_model, name, "tokens", read_attribute(host_model, mapping["0_p"], "tokens"))
|
|
|
\treturn!
|
|
|
"""
|
|
|
|
|
@@ -679,12 +679,15 @@ Void function action(host_model : Element, name : String, mapping : Element):
|
|
|
"new", "PetriNets_POST", "pn_RHS",
|
|
|
"instantiate", "RHS", "rhs",
|
|
|
"instantiate", "Post_Place", "p",
|
|
|
+ "instantiate", "Post_Place", "p2",
|
|
|
"instantiate", "Post_Transition", "t",
|
|
|
"instantiate", "RHS_contains", "", "rhs", "p",
|
|
|
+ "instantiate", "RHS_contains", "", "rhs", "p2",
|
|
|
"instantiate", "RHS_contains", "", "rhs", "t",
|
|
|
"attr_add", "p", "label", "0_p",
|
|
|
"attr_add", "t", "label", "1_t",
|
|
|
- "attr_add_code", "p", "action",
|
|
|
+ "attr_add", "p2", "label", "3_p",
|
|
|
+ "attr_add_code", "p2", "action",
|
|
|
] + constructor_action + [
|
|
|
"exit",
|
|
|
"transform", "pn", "pn_LHS", "pn_RHS",
|