|
|
@@ -86,8 +86,8 @@ Boolean function node_match(transf_model : Element, transf_elem : Element, host_
|
|
|
type2 = string_join(getTypeName(host_model, host_elem), "_LHS")
|
|
|
if (type1 != type2):
|
|
|
return False
|
|
|
- //log(string_join(string_join(type1, " : "), getName(transf_model, transf_elem)))
|
|
|
- //log(string_join(string_join(type2, " : "), getName(host_model, host_elem)))
|
|
|
+ log(string_join(string_join(type1, " : "), getName(transf_model, transf_elem)))
|
|
|
+ log(string_join(string_join(type2, " : "), getName(host_model, host_elem)))
|
|
|
return True
|
|
|
|
|
|
Integer function are_connected(model: Element, el1:Element, el2:Element):
|
|
|
@@ -99,9 +99,9 @@ Integer function are_connected(model: Element, el1:Element, el2:Element):
|
|
|
if(el2_mmt == "Class"):
|
|
|
return 0 //not connected, no edge inbetween
|
|
|
elif(el2_mmt == "l5"):
|
|
|
- if( element_eq(read_edge_src(el2) , el1)): //warning is this the right type of equality?
|
|
|
+ if( element_eq(read_edge_src(el2) , el1)):
|
|
|
return 1 //outgoing
|
|
|
- elif( element_eq(read_edge_dst(el2) , el1)): //right type of equality?
|
|
|
+ elif( element_eq(read_edge_dst(el2) , el1)):
|
|
|
return 2 //incoming
|
|
|
else:
|
|
|
return 0 //the edge is not connected
|
|
|
@@ -109,9 +109,9 @@ Integer function are_connected(model: Element, el1:Element, el2:Element):
|
|
|
log("is_connected_to: unsupported type for second element")
|
|
|
log(string_join("type = ", el2_mmt))
|
|
|
elif (el1_mmt == "l5"):
|
|
|
- if( element_eq(read_edge_src(el1) , el2)): //warning is this the right type of equality?
|
|
|
+ if( element_eq(read_edge_src(el1) , el2)):
|
|
|
return 2 //incoming
|
|
|
- elif( element_eq(read_edge_dst(el1) , el2)): //right type of equality?
|
|
|
+ elif( element_eq(read_edge_dst(el1) , el2)):
|
|
|
return 1 //outgoing
|
|
|
else:
|
|
|
return 0 //edge is not connected
|
|
|
@@ -479,10 +479,10 @@ Element function petrinet_transformation(root: Element):
|
|
|
instantiate_link(my_model, "nac", "", "find_transitions", "nac_precondition")
|
|
|
|
|
|
//Transition_LHS: nac_transition_place_before
|
|
|
- instantiate_node(my_model, "Transition_LHS","nac_transition_place_before")
|
|
|
- instantiate_attribute(my_model, "nac_transition_place_before", "plabel", 1)
|
|
|
+ instantiate_node(my_model, "Transition_LHS","nac_transition_before")
|
|
|
+ instantiate_attribute(my_model, "nac_transition_before", "plabel", 1)
|
|
|
//connect to rule
|
|
|
- instantiate_link(my_model, "pre2ram", "", "nac_precondition", "nac_transition_place_before")
|
|
|
+ instantiate_link(my_model, "pre2ram", "", "nac_precondition", "nac_transition_before")
|
|
|
|
|
|
//Place_LHS: nac_place_before
|
|
|
instantiate_node(my_model, "Place_LHS","nac_place_before")
|
|
|
@@ -492,7 +492,7 @@ Element function petrinet_transformation(root: Element):
|
|
|
instantiate_link(my_model, "pre2ram", "", "nac_precondition", "nac_place_before")
|
|
|
|
|
|
//P2T_LHS: nac_ft_p2t
|
|
|
- instantiate_link(my_model, "P2T_LHS", "nac_p2tlhs_before", "nac_place_before", "nac_transition_place_before")
|
|
|
+ instantiate_link(my_model, "P2T_LHS", "nac_p2tlhs_before", "nac_place_before", "nac_transition_before")
|
|
|
instantiate_attribute(my_model, "nac_p2tlhs_before", "plabel", 3)
|
|
|
instantiate_attribute(my_model, "nac_p2tlhs_before", "weight", "lambda x: True")
|
|
|
//connect to rule
|