|
@@ -143,9 +143,16 @@ Element function get_possible_bindings(host_model : Element, schedule_model : El
|
|
|
else:
|
|
|
// Check local constraints and add only if positive
|
|
|
Element constraint_function
|
|
|
- constraint_function = read_attribute(schedule_model, current_element, "constraint")
|
|
|
Boolean result
|
|
|
- result = constraint_function(host_model, option)
|
|
|
+ Element params
|
|
|
+
|
|
|
+ constraint_function = read_attribute(schedule_model, current_element, "constraint")
|
|
|
+ params = create_node()
|
|
|
+ dict_add(params, "model", host_model)
|
|
|
+ dict_add(params, "option", option)
|
|
|
+ log("Invoking constraint in match!")
|
|
|
+ result = execute_AL_model(constraint_function, params)
|
|
|
+ log("Result of constraint: " + cast_e2s(result))
|
|
|
if (result):
|
|
|
set_add(filtered_options, option)
|
|
|
|
|
@@ -323,7 +330,14 @@ Void function rewrite(host_model : Element, schedule_model : Element, RHS : Stri
|
|
|
label = set_pop(original_RHS_labels)
|
|
|
action = read_attribute(schedule_model, RHS_map[label], "action")
|
|
|
if (element_neq(action, read_root())):
|
|
|
- action(host_model, new_mapping[label], mapping)
|
|
|
+ Element params
|
|
|
+ params = create_node()
|
|
|
+ dict_add(params, "model", host_model)
|
|
|
+ dict_add(params, "name", new_mapping[label])
|
|
|
+ dict_add(params, "mapping", mapping)
|
|
|
+ log("Execute RHS Action")
|
|
|
+ execute_AL_model(action, params)
|
|
|
+ log("Finished!")
|
|
|
|
|
|
while (read_nr_out(labels_to_remove) > 0):
|
|
|
// Remove the elements linked to these labels
|
|
@@ -334,7 +348,13 @@ Void function rewrite(host_model : Element, schedule_model : Element, RHS : Stri
|
|
|
// Execute global action (whatever it may be)
|
|
|
action = read_attribute(schedule_model, RHS, "action")
|
|
|
if (element_neq(action, read_root())):
|
|
|
- action(host_model, new_mapping)
|
|
|
+ Element params
|
|
|
+ params = create_node()
|
|
|
+ dict_add(params, "model", host_model)
|
|
|
+ dict_add(params, "mapping", new_mapping)
|
|
|
+ log("Execute global RHS Action")
|
|
|
+ execute_AL_model(action, params)
|
|
|
+ log("Finished!")
|
|
|
|
|
|
return!
|
|
|
|