|
@@ -4,6 +4,7 @@ include "modelling.alh"
|
|
include "random.alh"
|
|
include "random.alh"
|
|
include "conformance_scd.alh"
|
|
include "conformance_scd.alh"
|
|
include "model_management.alh"
|
|
include "model_management.alh"
|
|
|
|
+include "library.alh"
|
|
|
|
|
|
Element function make_matching_schedule(schedule_model : Element, LHS : String, ignore : Element):
|
|
Element function make_matching_schedule(schedule_model : Element, LHS : String, ignore : Element):
|
|
Element schedule
|
|
Element schedule
|
|
@@ -146,7 +147,8 @@ Element function get_possible_bindings(host_model : Element, schedule_model : El
|
|
Element func
|
|
Element func
|
|
|
|
|
|
constraint_function = read_attribute(schedule_model, current_element, "constraint")
|
|
constraint_function = read_attribute(schedule_model, current_element, "constraint")
|
|
- func = get_func_AL_model(constraint_function)
|
|
|
|
|
|
+ log("1")
|
|
|
|
+ func = get_func_AL_model(import_node(constraint_function))
|
|
result = func(host_model, option)
|
|
result = func(host_model, option)
|
|
|
|
|
|
if (result):
|
|
if (result):
|
|
@@ -178,7 +180,8 @@ Element function get_possible_bindings(host_model : Element, schedule_model : El
|
|
value = read_attribute(schedule_model, current_element, attribute)
|
|
value = read_attribute(schedule_model, current_element, attribute)
|
|
// Attribute might be undefined, so skip if it is
|
|
// Attribute might be undefined, so skip if it is
|
|
if (element_neq(value, read_root())):
|
|
if (element_neq(value, read_root())):
|
|
- func = get_func_AL_model(value)
|
|
|
|
|
|
+ log("2")
|
|
|
|
+ func = get_func_AL_model(import_node(value))
|
|
result = func(read_attribute(host_model, option, string_substr(attribute, string_len("constraint_"), string_len(attribute) + 1)))
|
|
result = func(read_attribute(host_model, option, string_substr(attribute, string_len("constraint_"), string_len(attribute) + 1)))
|
|
else:
|
|
else:
|
|
result = True
|
|
result = True
|
|
@@ -276,7 +279,8 @@ Element function match(host_model : Element, schedule_model : Element, LHS : Str
|
|
if (element_neq(constraint, read_root())):
|
|
if (element_neq(constraint, read_root())):
|
|
while (read_nr_out(mappings) > 0):
|
|
while (read_nr_out(mappings) > 0):
|
|
map = set_pop(mappings)
|
|
map = set_pop(mappings)
|
|
- func = get_func_AL_model(constraint)
|
|
|
|
|
|
+ log("3")
|
|
|
|
+ func = get_func_AL_model(import_node(constraint))
|
|
result = func(host_model, map)
|
|
result = func(host_model, map)
|
|
|
|
|
|
if (result):
|
|
if (result):
|
|
@@ -373,7 +377,8 @@ Void function rewrite(host_model : Element, schedule_model : Element, RHS : Stri
|
|
|
|
|
|
value = read_attribute(schedule_model, RHS_map[label], attribute)
|
|
value = read_attribute(schedule_model, RHS_map[label], attribute)
|
|
if (element_neq(value, read_root())):
|
|
if (element_neq(value, read_root())):
|
|
- func = get_func_AL_model(value)
|
|
|
|
|
|
+ log("4")
|
|
|
|
+ func = get_func_AL_model(import_node(value))
|
|
result = func(host_model, new_mapping[label], mapping)
|
|
result = func(host_model, new_mapping[label], mapping)
|
|
|
|
|
|
if (has_value(result)):
|
|
if (has_value(result)):
|
|
@@ -387,7 +392,10 @@ Void function rewrite(host_model : Element, schedule_model : Element, RHS : Stri
|
|
action = read_attribute(schedule_model, RHS_map[label], "action")
|
|
action = read_attribute(schedule_model, RHS_map[label], "action")
|
|
if (element_neq(action, read_root())):
|
|
if (element_neq(action, read_root())):
|
|
Element func
|
|
Element func
|
|
- func = get_func_AL_model(action)
|
|
|
|
|
|
+ log("5")
|
|
|
|
+ log("Got action: " + cast_e2s(action))
|
|
|
|
+ log("After import: " + cast_e2s(import_node(action)))
|
|
|
|
+ func = get_func_AL_model(import_node(action))
|
|
func(host_model, new_mapping[label], mapping)
|
|
func(host_model, new_mapping[label], mapping)
|
|
|
|
|
|
while (read_nr_out(labels_to_remove) > 0):
|
|
while (read_nr_out(labels_to_remove) > 0):
|
|
@@ -400,7 +408,8 @@ Void function rewrite(host_model : Element, schedule_model : Element, RHS : Stri
|
|
action = read_attribute(schedule_model, RHS, "action")
|
|
action = read_attribute(schedule_model, RHS, "action")
|
|
if (element_neq(action, read_root())):
|
|
if (element_neq(action, read_root())):
|
|
Element func
|
|
Element func
|
|
- func = get_func_AL_model(action)
|
|
|
|
|
|
+ log("6")
|
|
|
|
+ func = get_func_AL_model(import_node(action))
|
|
func(host_model, new_mapping)
|
|
func(host_model, new_mapping)
|
|
|
|
|
|
return!
|
|
return!
|