|
@@ -4,6 +4,8 @@ include "object_operations.alh"
|
|
|
include "constructors.alh"
|
|
|
include "metamodels.alh"
|
|
|
|
|
|
+Element global_models = ?
|
|
|
+
|
|
|
String function instantiated_name(element : Element, original : String):
|
|
|
if (original == ""):
|
|
|
return "__" + cast_id2s(element)
|
|
@@ -369,7 +371,10 @@ Void function construct_model():
|
|
|
while (True):
|
|
|
command = input()
|
|
|
if (command == "instantiate_bottom"):
|
|
|
- output(instantiate_bottom())
|
|
|
+ Element m
|
|
|
+ m = instantiate_bottom()
|
|
|
+ set_add(global_models, m)
|
|
|
+ output(m)
|
|
|
elif (command == "add_node"):
|
|
|
model_add_node(input(), input())
|
|
|
elif (command == "add_value"):
|
|
@@ -383,7 +388,10 @@ Void function construct_model():
|
|
|
elif (command == "retype"):
|
|
|
retype(input(), input(), input())
|
|
|
elif (command == "instantiate_model"):
|
|
|
- output(instantiate_model(input()))
|
|
|
+ Element m
|
|
|
+ m = instantiate_model(input())
|
|
|
+ set_add(global_models, m)
|
|
|
+ output(m)
|
|
|
elif (command == "instantiate_node"):
|
|
|
instantiate_node(input(), input(), input())
|
|
|
elif (command == "instantiate_attribute"):
|