|
@@ -122,7 +122,7 @@ Element function petrinet_loaded(model : Element):
|
|
|
output("Generic model operations:")
|
|
|
output(" instantiate -- Create a new model element")
|
|
|
output(" delete -- Delete an existing element")
|
|
|
- output(" modify -- Modify attribute of an existing element")
|
|
|
+ output(" attr_add -- Add an attribute to an existing element")
|
|
|
output(" rename -- Rename an existing element")
|
|
|
output(" list -- Prints the list of elements in the model")
|
|
|
output(" types -- Prints the list of elements that can be instantiated")
|
|
@@ -152,7 +152,7 @@ Element function petrinet_loaded(model : Element):
|
|
|
if (dict_in(model["model"], element_name)):
|
|
|
output("Element already exists; aborting")
|
|
|
else:
|
|
|
- if (is_edge(metamodel_element_pn)):
|
|
|
+ if (is_edge(model["metamodel"]["model"][mm_type_name])):
|
|
|
output("Source name?")
|
|
|
String src_name
|
|
|
src_name = input()
|
|
@@ -162,7 +162,6 @@ Element function petrinet_loaded(model : Element):
|
|
|
dst_name = input()
|
|
|
if (dict_in(model["model"], dst_name)):
|
|
|
instantiate_link(model, mm_type_name, element_name, src_name, dst_name)
|
|
|
- output("Instantiation successful!")
|
|
|
if (dict_in(model["model"], element_name)):
|
|
|
output("Instantiation successful!")
|
|
|
else:
|