|
@@ -213,10 +213,12 @@ Void function rewrite(host_model : Element, RHS_model : Element, mapping : Eleme
|
|
|
log("Element with label: " + cast_v2s(RHS_map[label]))
|
|
|
log("Element: " + cast_e2s(RHS_model["model"][RHS_map[label]]))
|
|
|
log("Value: " + cast_v2s(read_attribute(RHS_model, RHS_map[label], "label")))
|
|
|
- if (element_eq(read_attribute(RHS_model, RHS_map[label], "value"), read_root())):
|
|
|
- log("Executing action!")
|
|
|
+ if (element_neq(read_attribute(RHS_model, RHS_map[label], "value"), read_root())):
|
|
|
// There is an action associated with this node
|
|
|
- value_function = read_attribute(RHS_model, RHS_model["model"][RHS_map[label]], "value")
|
|
|
+ log("Fetching action")
|
|
|
+ value_function = read_attribute(RHS_model, RHS_map[label], "value")
|
|
|
+ log("Executing action!")
|
|
|
+ log("Got function: " + cast_e2s(value_function))
|
|
|
value = value_function(host_model, RHS_model)
|
|
|
log("Got value to assign: " + cast_v2s(value))
|
|
|
|