|
@@ -549,11 +549,19 @@ Integer function value(host_model : Element, RHS_model : Element):
|
|
|
"""
|
|
|
include "primitives.alh"
|
|
|
Boolean function constraint(host_model : Element, name : String):
|
|
|
-\treturn value_eq(host_model["model"][name], 3)!
|
|
|
+\treturn value_eq(host_model["model"][name], 1)!
|
|
|
+ """
|
|
|
+
|
|
|
+ global_constraint_code = \
|
|
|
+ """
|
|
|
+include "primitives.alh"
|
|
|
+Boolean function constraint(host_model : Element, mapping : Element):
|
|
|
+\treturn value_eq(host_model["model"][mapping["0_tokens"]], 1)!
|
|
|
"""
|
|
|
|
|
|
constructor_action = get_constructor(action_code)
|
|
|
constructor_constraint = get_constructor(constraint_code)
|
|
|
+ constructor_global_constraint = get_constructor(global_constraint_code)
|
|
|
|
|
|
self.assertTrue(run_file(all_files,
|
|
|
["new", "PetriNets", "pn",
|
|
@@ -587,6 +595,8 @@ Boolean function constraint(host_model : Element, name : String):
|
|
|
"attr_add", "p", "label", "2_p",
|
|
|
"attr_add", "t", "label", "3_t",
|
|
|
"attr_add", "pt", "label", "4_pt",
|
|
|
+ "attr_add_code", "lhs", "constraint",
|
|
|
+ ] + constructor_global_constraint + [
|
|
|
"exit",
|
|
|
"new", "PetriNets_POST", "pn_RHS",
|
|
|
"instantiate", "RHS", "rhs",
|