浏览代码

First attempt at hierarchy

Yentl Van Tendeloo 8 年之前
父节点
当前提交
da30f523ff

+ 10 - 2
bootstrap/90_core_formalism.mvc

@@ -66,12 +66,20 @@ SimpleClassDiagrams CoreFormalism {
     Association ownedBy (Group, User) {}
     Association ownedBy (Group, User) {}
     Association belongsTo (User, Group) {}
     Association belongsTo (User, Group) {}
 
 
-    Class Model {
+    Class Entry {
         name : String
         name : String
-        location : String
         permissions : Permissions
         permissions : Permissions
     }
     }
 
 
+    Class Folder : Entry {
+    }
+
+    Association contains (Folder, Entry) {}
+
+    Class Model : Entry {
+        location : String
+    }
+
     Class TypeMapping : Model {}
     Class TypeMapping : Model {}
 
 
     Association instanceOf (Model, Model) {
     Association instanceOf (Model, Model) {

+ 234 - 164
bootstrap/99_core.mvc

@@ -18,131 +18,255 @@ CF core {
     ownedBy (admin_group, admin_user) {}
     ownedBy (admin_group, admin_user) {}
     belongsTo (admin_user, admin_group) {}
     belongsTo (admin_user, admin_group) {}
 
 
-    Model SimpleClassDiagrams {
-        name = "SimpleClassDiagrams"
-        location = "models/SimpleClassDiagrams/model"
+    Folder root {
+        name = ""
         permissions = "221"
         permissions = "221"
-    }
 
 
-    group (SimpleClassDiagrams, admin_group) {}
-    owner (SimpleClassDiagrams, admin_user) {}
-
-    TypeMapping TM_SimpleClassDiagrams {
-        name = "TM_SimpleClassDiagrams"
-        location = "models/SimpleClassDiagrams/type_mapping"
-        permissions = "221"
-    }
-
-    group (TM_SimpleClassDiagrams, admin_group) {}
-    owner (TM_SimpleClassDiagrams, admin_user) {}
-
-    Model TypeMapping {
-        name = "TypeMapping"
-        location = "models/TypeMapping/model"
-        permissions = "221"
+        Folder formalisms {
+            name = "formalisms"
+            permissions = "221"
+
+            Model SimpleClassDiagrams {
+                name = "SimpleClassDiagrams"
+                location = "models/SimpleClassDiagrams/model"
+                permissions = "221"
+            }
+
+            Model TypeMapping {
+                name = "TypeMapping"
+                location = "models/TypeMapping/model"
+                permissions = "221"
+            }
+
+            Model Tracability {
+                name = "Tracability"
+                location = "models/Tracability/model"
+                permissions = "221"
+            }
+
+            Model ProcessModel {
+                name = "ProcessModel"
+                location = "models/ProcessModel/model"
+                permissions = "221"
+            }
+
+            Model ActionLanguage {
+                name = "ActionLanguage"
+                location = "models/ActionLanguage/model"
+                permissions = "221"
+            }
+
+            Model ManualOperation {
+                name = "ManualOperation"
+                location = "models/ManualOperation/model"
+                permissions = "221"
+            }
+
+            Model bottom {
+                name = "bottom"
+                location = "models/bottom/model"
+                permissions = "221"
+            }
+        }
+
+        Folder models {
+            name = "models"
+            permissions = "221"
+
+            ActionLanguage conformance_mv {
+                name = "conformance_mv"
+                location = "models/Conformance_MV/model"
+                permissions = "221"
+            }
+
+        }
+
+        Folder typemappings {
+            name = "type mappings"
+            permissions = "221"
+
+            Folder tm_formalisms {
+                name = "formalisms"
+                permissions = "110"
+
+                TypeMapping TM_SimpleClassDiagrams {
+                    name = "TM_SimpleClassDiagrams"
+                    location = "models/SimpleClassDiagrams/type_mapping"
+                    permissions = "221"
+                }
+
+                TypeMapping TM_TypeMapping {
+                    name = "TM_TypeMapping"
+                    location = "models/TypeMapping/type_mapping"
+                    permissions = "221"
+                }
+
+                TypeMapping TM_Tracability{
+                    name = "TM_Tracability"
+                    location = "models/Tracability/type_mapping"
+                    permissions = "221"
+                }
+
+                TypeMapping TM_ProcessModel {
+                    name = "TM_ProcessModel"
+                    location = "models/ProcessModel/type_mapping"
+                    permissions = "221"
+                }
+
+                TypeMapping TM_ActionLanguage {
+                    name = "TM_ActionLanguage"
+                    location = "models/ActionLanguage/type_mapping"
+                    permissions = "221"
+                }
+
+                TypeMapping TM_ManualOperation {
+                    name = "TM_ManualOperation"
+                    location = "models/ManualOperation/type_mapping"
+                    permissions = "111"
+                }
+
+                TypeMapping TM_bottom {
+                    name = "TM_bottom"
+                    location = "models/bottom/type_mapping"
+                    permissions = "221"
+                }
+
+            }
+
+            Folder tm_models {
+                name = "models"
+                permissions = "110"
+
+                TypeMapping TM_conformance_mv {
+                    name = "TM_conformance_mv"
+                    location = "models/Conformance_MV/type_mapping"
+                    permissions = "221"
+                }
+            }
+
+            Folder tm_administration {
+                name = "administration"
+                permissions = "100"
+
+                TypeMapping TM_Core {
+                    name = "TM_core"
+                    location = "models/core/type_mapping"
+                    permissions = "220"
+                }
+
+                TypeMapping TM_CoreFormalism {
+                    name = "TM_CoreFormalism"
+                    location = "models/CoreFormalism/type_mapping"
+                    permissions = "221"
+                }
+            }
+
+            Folder tm_users {
+                name = "users"
+                permissions = "110"
+
+                Folder tm_users_admin {
+                    name = "admin"
+                    permissions = "100"
+                }
+            }
+        }
+
+        Folder users {
+            name = "users"
+            permissions = "221"
+
+            Folder users_admin {
+                name = "admin"
+                permissions = "200"
+            }
+        }
+
+        Folder administration {
+            name = "administration"
+            permissions = "110"
+
+            Model CoreFormalism {
+                name = "CoreFormalism"
+                location = "models/CoreFormalism/model"
+                permissions = "221"
+            }
+
+            Model Core {
+                name = "core"
+                location = "models/core/model"
+                permissions = "220"
+            }
+        }
     }
     }
 
 
+    group (root, admin_group) {}
+    group (formalisms, admin_group) {}
+    group (SimpleClassDiagrams, admin_group) {}
     group (TypeMapping, admin_group) {}
     group (TypeMapping, admin_group) {}
-    owner (TypeMapping, admin_user) {}
-
-    TypeMapping TM_TypeMapping {
-        name = "TM_TypeMapping"
-        location = "models/TypeMapping/type_mapping"
-        permissions = "221"
-    }
-
-    group (TM_TypeMapping, admin_group) {}
-    owner (TM_TypeMapping, admin_user) {}
-
-    Model Tracability {
-        name = "Tracability"
-        location = "models/Tracability/model"
-        permissions = "221"
-    }
-
     group (Tracability, admin_group) {}
     group (Tracability, admin_group) {}
-    owner (Tracability, admin_user) {}
-
-    TypeMapping TM_Tracability{
-        name = "TM_Tracability"
-        location = "models/Tracability/type_mapping"
-        permissions = "221"
-    }
-
-    group (TM_Tracability, admin_group) {}
-    owner (TM_Tracability, admin_user) {}
-
-    Model ProcessModel {
-        name = "ProcessModel"
-        location = "models/ProcessModel/model"
-        permissions = "221"
-    }
-
     group (ProcessModel, admin_group) {}
     group (ProcessModel, admin_group) {}
-    owner (ProcessModel, admin_user) {}
-
-    TypeMapping TM_ProcessModel {
-        name = "TM_ProcessModel"
-        location = "models/ProcessModel/type_mapping"
-        permissions = "221"
-    }
-
-    group (TM_ProcessModel, admin_group) {}
-    owner (TM_ProcessModel, admin_user) {}
-
-    Model ActionLanguage {
-        name = "ActionLanguage"
-        location = "models/ActionLanguage/model"
-        permissions = "221"
-    }
-
     group (ActionLanguage, admin_group) {}
     group (ActionLanguage, admin_group) {}
-    owner (ActionLanguage, admin_user) {}
-
-    TypeMapping TM_ActionLanguage {
-        name = "TM_ActionLanguage"
-        location = "models/ActionLanguage/type_mapping"
-        permissions = "221"
-    }
-
-    group (TM_ActionLanguage, admin_group) {}
-    owner (TM_ActionLanguage, admin_user) {}
-
-    Model ManualOperation {
-        name = "ManualOperation"
-        location = "models/ManualOperation/model"
-        permissions = "221"
-    }
-
     group (ManualOperation, admin_group) {}
     group (ManualOperation, admin_group) {}
-    owner (ManualOperation, admin_user) {}
-
-    TypeMapping TM_ManualOperation {
-        name = "TM_ManualOperation"
-        location = "models/ManualOperation/type_mapping"
-        permissions = "221"
-    }
+    group (bottom, admin_group) {}
+    group (models, admin_group) {}
+    group (conformance_mv, admin_group) {}
+    group (administration, admin_group) {}
+    group (CoreFormalism, admin_group) {}
+    group (Core, admin_group) {}
+    group (users, admin_group) {}
+    group (users_admin, nobody) {}
 
 
+    group (typemappings, admin_group) {}
+    group (tm_formalisms, admin_group) {}
+    group (TM_SimpleClassDiagrams, admin_group) {}
+    group (TM_TypeMapping, admin_group) {}
+    group (TM_Tracability, admin_group) {}
+    group (TM_ProcessModel, admin_group) {}
+    group (TM_ActionLanguage, admin_group) {}
+    group (TM_bottom, admin_group) {}
     group (TM_ManualOperation, admin_group) {}
     group (TM_ManualOperation, admin_group) {}
-    owner (TM_ManualOperation, admin_user) {}
-
-    ActionLanguage conformance_mv {
-        name = "conformance_mv"
-        location = "models/Conformance_MV/model"
-        permissions = "221"
-    }
+    group (tm_models, admin_group) {}
+    group (TM_conformance_mv, admin_group) {}
+    group (tm_administration, admin_group) {}
+    group (TM_CoreFormalism, admin_group) {}
+    group (TM_Core, admin_group) {}
+    group (tm_users, admin_group) {}
+    group (tm_users_admin, admin_group) {}
 
 
-    group (conformance_mv, admin_group) {}
+    owner (root, admin_user) {}
+    owner (formalisms, admin_user) {}
+    owner (SimpleClassDiagrams, admin_user) {}
+    owner (TypeMapping, admin_user) {}
+    owner (Tracability, admin_user) {}
+    owner (ProcessModel, admin_user) {}
+    owner (ActionLanguage, admin_user) {}
+    owner (ManualOperation, admin_user) {}
+    owner (bottom, admin_user) {}
+    owner (models, admin_user) {}
     owner (conformance_mv, admin_user) {}
     owner (conformance_mv, admin_user) {}
+    owner (administration, admin_user) {}
+    owner (CoreFormalism, admin_user) {}
+    owner (Core, admin_user) {}
+    owner (users, admin_user) {}
+    owner (users_admin, admin_user) {}
 
 
-    TypeMapping TM_conformance_mv {
-        name = "TM_conformance_mv"
-        location = "models/Conformance_MV/type_mapping"
-        permissions = "221"
-    }
-
-    group (TM_conformance_mv, admin_group) {}
+    owner (typemappings, admin_user) {}
+    owner (tm_formalisms, admin_user) {}
+    owner (TM_SimpleClassDiagrams, admin_user) {}
+    owner (TM_TypeMapping, admin_user) {}
+    owner (TM_Tracability, admin_user) {}
+    owner (TM_ProcessModel, admin_user) {}
+    owner (TM_ActionLanguage, admin_user) {}
+    owner (TM_ManualOperation, admin_user) {}
+    owner (TM_bottom, admin_user) {}
+    owner (tm_models, admin_user) {}
     owner (TM_conformance_mv, admin_user) {}
     owner (TM_conformance_mv, admin_user) {}
+    owner (tm_administration, admin_user) {}
+    owner (TM_CoreFormalism, admin_user) {}
+    owner (TM_Core, admin_user) {}
+    owner (tm_users, admin_user) {}
+    owner (tm_users_admin, admin_user) {}
 
 
     transformInput (conformance_mv, SimpleClassDiagrams) {
     transformInput (conformance_mv, SimpleClassDiagrams) {
         name = "model"
         name = "model"
@@ -151,60 +275,6 @@ CF core {
         name = "metamodel"
         name = "metamodel"
     }
     }
 
 
-    Model CoreFormalism {
-        name = "CoreFormalism"
-        location = "models/CoreFormalism/model"
-        permissions = "221"
-    }
-
-    group (CoreFormalism, admin_group) {}
-    owner (CoreFormalism, admin_user) {}
-
-    TypeMapping TM_CoreFormalism {
-        name = "TM_CoreFormalism"
-        location = "models/CoreFormalism/type_mapping"
-        permissions = "221"
-    }
-
-    group (TM_CoreFormalism, admin_group) {}
-    owner (TM_CoreFormalism, admin_user) {}
-
-    Model Core {
-        name = "core"
-        location = "models/core/model"
-        permissions = "220"
-    }
-
-    group (Core, admin_group) {}
-    owner (Core, admin_user) {}
-
-    TypeMapping TM_Core {
-        name = "TM_core"
-        location = "models/core/type_mapping"
-        permissions = "220"
-    }
-
-    group (TM_Core, admin_group) {}
-    owner (TM_Core, admin_user) {}
-
-    Model bottom {
-        name = "bottom"
-        location = "models/bottom/model"
-        permissions = "221"
-    }
-
-    group (bottom, admin_group) {}
-    owner (bottom, admin_user) {}
-
-    TypeMapping TM_bottom {
-        name = "TM_bottom"
-        location = "models/bottom/type_mapping"
-        permissions = "221"
-    }
-
-    group (TM_bottom, admin_group) {}
-    owner (TM_bottom, admin_user) {}
-
     instanceOf inst_SCD (SimpleClassDiagrams, SimpleClassDiagrams) {}
     instanceOf inst_SCD (SimpleClassDiagrams, SimpleClassDiagrams) {}
     instanceOf inst_TM (TypeMapping, SimpleClassDiagrams) {}
     instanceOf inst_TM (TypeMapping, SimpleClassDiagrams) {}
     instanceOf inst_trace (Tracability, SimpleClassDiagrams) {}
     instanceOf inst_trace (Tracability, SimpleClassDiagrams) {}

+ 203 - 173
bootstrap/core_algorithm.alc

@@ -19,6 +19,25 @@ String core_model_location = "models/core"
 Element core = ?
 Element core = ?
 Element caches
 Element caches
 
 
+String function full_name(model_id : String):
+	if (dict_in(caches["full_name"], model_id)):
+		if (get_entry_id(caches["full_name"]) == model_id):
+			return caches["full_name"]!
+
+	// No cache, or out of date
+	Element incoming
+	String parent
+	String parent_name
+
+	incoming = allAssociationOrigins(core, model_id, "contains")
+	if (set_len(incoming) > 0):
+		parent = set_pop(incoming)
+		parent_name = full_name(parent)
+		dict_add(caches["full_name"], parent, parent_name)
+		return string_join(parent_name + "/", read_attribute(core, model_id, "name"))!
+	else:
+		return ""!
+
 Void function initialize_core():
 Void function initialize_core():
 	// TODO make this more flexible by putting it in the bootstrap in a similar way as other models
 	// TODO make this more flexible by putting it in the bootstrap in a similar way as other models
 	add_code_model(import_node("models/ActionLanguage"), "models/Conformance_MV", wrap_conformance)
 	add_code_model(import_node("models/ActionLanguage"), "models/Conformance_MV", wrap_conformance)
@@ -70,14 +89,14 @@ Element function get_full_model(model_id : String, metamodel_id : String):
 
 
 	// TODO for now this is restricted to the fixed semantics
 	// TODO for now this is restricted to the fixed semantics
 	// dict_add(m, "semantics", set_pop(allAssociationDestinations(core, choice, "semantics")))
 	// dict_add(m, "semantics", set_pop(allAssociationDestinations(core, choice, "semantics")))
-	dict_add(m, "semantics", get_model_id("conformance_mv"))
+	dict_add(m, "semantics", get_entry_id("conformance_mv"))
 
 
 	if (metamodel_id == model_id):
 	if (metamodel_id == model_id):
 		// Found the meta-circular level, so we can stop!
 		// Found the meta-circular level, so we can stop!
 		dict_add(m, "metamodel", m)
 		dict_add(m, "metamodel", m)
 	else:
 	else:
 		Element mm
 		Element mm
-		mm = get_full_model(metamodel_id, get_model_id("SimpleClassDiagrams"))
+		mm = get_full_model(metamodel_id, get_entry_id("SimpleClassDiagrams"))
 		if (element_eq(mm, read_root())):
 		if (element_eq(mm, read_root())):
 			return read_root()!
 			return read_root()!
 		else:
 		else:
@@ -223,22 +242,43 @@ Void function new_task():
 	// User destroyed already, so just stop execution
 	// User destroyed already, so just stop execution
 	return!
 	return!
 
 
-String function get_model_id(name : String):
-	Element models
-	String model
+String function get_entry_id(name : String):
+	Element hierarchy_split
+	String current
+	Integer i
+	Element elems
+	String current_part
+	String elem
 
 
-	if (dict_in(caches["models"], name)):
-		if (value_eq(read_attribute(core, caches["models"][name], "name"), name)):
-			return caches["models"][name]!
+	i = 0
+	name = "/" + name
+	hierarchy_split = string_split(name, "/")
+	current = caches["models"][""]
+	log("Reading " + name)
+	log("Split up in: " + list_to_string(hierarchy_split))
+
+	while (i < list_len(hierarchy_split)):
+		current_part = list_read(hierarchy_split, i)
+
+		// the initial current ("") will always be in the cache as root element
+		if (bool_not(dict_in(caches["models"], current))):
+			// This element is not cached, so cache completely!
+			log("Miss for " + current_part)
+			elems = allAssociationDestinations(core, current, "contains")
+			while (set_len(elems) > 0):
+				elem = set_pop(elems)
+				dict_overwrite(caches["models"][current], read_attribute(core, elem, "name"), elem)
+			dict_overwrite(caches["models"][current], "", current)
+		log("Ready for access: " + current_part)
+
+		if (dict_in(caches["models"][current], current_part)):
+			current = caches["models"][current][current_part]
+			log("SUCCESS: " + current)
+		else:
+			log("FAILED")
+			return ""!
 
 
-	models = allInstances(core, "Model")
-	while (set_len(models) > 0):
-		model = set_pop(models)
-		if (value_eq(name, read_attribute(core, model, "name"))):
-			dict_overwrite(caches["models"], name, model)
-			return model!
-	
-	return ""!
+	return current!
 
 
 String function get_service_id(name : String):
 String function get_service_id(name : String):
 	Element services
 	Element services
@@ -278,9 +318,37 @@ String function get_group_id(name : String):
 	
 	
 	return ""!
 	return ""!
 
 
+String function store_entry(model_id : String, full_name : String, user_id : String):
+	Element hierarchy
+	Integer i
+	String prev
+	String elem
+	String new_entry
+
+	i = 0
+	hierarchy = string_split(full_name, "/")
+	prev = get_entry_id("")
+
+	// Go through folders first
+	while (i < list_len(hierarchy) - 1):
+		elem = list_read(hierarchy, i)
+		if (get_entry_id(elem) == ""):
+			// Element does not exist yet!
+			new_entry = instantiate_node(core, "Folder", "")
+			instantiate_attribute(core, new_entry, "name", elem)
+			instantiate_attribute(core, new_entry, "permissions", "200")
+			instantiate_link(core, "contains", "", prev, new_entry)
+			instantiate_link(core, "group", "", new_entry, get_group_id("nobody"))
+			instantiate_link(core, "owner", "", new_entry, user_id)
+
+	instantiate_link(core, "contains", "", prev, model_id)
+
+	return list_pop_final(hierarchy)!
+
 String function export_typing(model : Element, name : String, user_id : String):
 String function export_typing(model : Element, name : String, user_id : String):
 	String result
 	String result
 	result = instantiate_node(core, "TypeMapping", "")
 	result = instantiate_node(core, "TypeMapping", "")
+	name = "type mappings/" + name
 
 
 	// Create type mapping model
 	// Create type mapping model
 	String location
 	String location
@@ -288,13 +356,14 @@ String function export_typing(model : Element, name : String, user_id : String):
 	export_node(location, model["type_mapping"])
 	export_node(location, model["type_mapping"])
 
 
 	String instance_of
 	String instance_of
-	instantiate_attribute(core, result, "name", "TM_" + name)
+	name = store_entry(result, name, get_user_id("admin"))
+	instantiate_attribute(core, result, "name", name)
 	instantiate_attribute(core, result, "location", location)
 	instantiate_attribute(core, result, "location", location)
 	instantiate_attribute(core, result, "permissions", "200")
 	instantiate_attribute(core, result, "permissions", "200")
 	instantiate_link(core, "owner", "", result, user_id)
 	instantiate_link(core, "owner", "", result, user_id)
 	instantiate_link(core, "group", "", result, get_group_id("nobody"))
 	instantiate_link(core, "group", "", result, get_group_id("nobody"))
-	instance_of = instantiate_link(core, "instanceOf", "", result, get_model_id("TypeMapping"))
-	instantiate_link(core, "semantics", "", instance_of, get_model_id("conformance_mv"))
+	instance_of = instantiate_link(core, "instanceOf", "", result, get_entry_id("TypeMapping"))
+	instantiate_link(core, "semantics", "", instance_of, get_entry_id("conformance_mv"))
 
 
 	return result!
 	return result!
 
 
@@ -308,13 +377,13 @@ Void function model_create(model : Element, name : String, user_id : String, typ
 	export_node(location, model["model"])
 	export_node(location, model["model"])
 
 
 	model_id = instantiate_node(core, kind, "")
 	model_id = instantiate_node(core, kind, "")
-	instantiate_attribute(core, model_id, "name", name)
+	instantiate_attribute(core, model_id, "name", store_entry(model_id, name, user_id))
 	instantiate_attribute(core, model_id, "location", location)
 	instantiate_attribute(core, model_id, "location", location)
 	instantiate_attribute(core, model_id, "permissions", "200")
 	instantiate_attribute(core, model_id, "permissions", "200")
 	instantiate_link(core, "owner", "", model_id, user_id)
 	instantiate_link(core, "owner", "", model_id, user_id)
 	instantiate_link(core, "group", "", model_id, get_group_id("nobody"))
 	instantiate_link(core, "group", "", model_id, get_group_id("nobody"))
 	instance_of = instantiate_link(core, "instanceOf", "", model_id, type_id)
 	instance_of = instantiate_link(core, "instanceOf", "", model_id, type_id)
-	instantiate_link(core, "semantics", "", instance_of, get_model_id("conformance_mv"))
+	instantiate_link(core, "semantics", "", instance_of, get_entry_id("conformance_mv"))
 
 
 	// Create type mapping model
 	// Create type mapping model
 	instantiate_link(core, "typing", "", instance_of, export_typing(model, name, user_id))
 	instantiate_link(core, "typing", "", instance_of, export_typing(model, name, user_id))
@@ -344,8 +413,8 @@ Void function model_overwrite(model : Element, model_id : String, metamodel_id :
 	// Create a new instanceOf relation now
 	// Create a new instanceOf relation now
 	String instance_of
 	String instance_of
 	instance_of = instantiate_link(core, "instanceOf", "", model_id, metamodel_id)
 	instance_of = instantiate_link(core, "instanceOf", "", model_id, metamodel_id)
-	instantiate_link(core, "semantics", "", instance_of, get_model_id("conformance_mv"))
-	instantiate_link(core, "typing", "", instance_of, export_typing(model, read_attribute(core, model_id, "name"), get_user_id("admin")))
+	instantiate_link(core, "semantics", "", instance_of, get_entry_id("conformance_mv"))
+	instantiate_link(core, "typing", "", instance_of, export_typing(model, full_name(model_id), get_user_id("admin")))
 
 
 	return!
 	return!
 
 
@@ -405,13 +474,13 @@ Element function execute_operation(operation_id : String, input_models : Element
 	iter = allOutgoingAssociationInstances(core, operation_id, "transformInput")
 	iter = allOutgoingAssociationInstances(core, operation_id, "transformInput")
 	while (set_len(iter) > 0):
 	while (set_len(iter) > 0):
 		edge = set_pop(iter)
 		edge = set_pop(iter)
-		dict_add(input_metamodels, read_attribute(core, edge, "name"), read_attribute(core, readAssociationDestination(core, edge), "name"))
+		dict_add(input_metamodels, read_attribute(core, edge, "name"), full_name(readAssociationDestination(core, edge)))
 
 
 	output_metamodels = dict_create()
 	output_metamodels = dict_create()
 	iter = allOutgoingAssociationInstances(core, operation_id, "transformOutput")
 	iter = allOutgoingAssociationInstances(core, operation_id, "transformOutput")
 	while (set_len(iter) > 0):
 	while (set_len(iter) > 0):
 		edge = set_pop(iter)
 		edge = set_pop(iter)
-		dict_add(output_metamodels, read_attribute(core, edge, "name"), read_attribute(core, readAssociationDestination(core, edge), "name"))
+		dict_add(output_metamodels, read_attribute(core, edge, "name"), full_name(readAssociationDestination(core, edge)))
 
 
 	// 1) Find merged metamodel
 	// 1) Find merged metamodel
 
 
@@ -431,7 +500,7 @@ Element function execute_operation(operation_id : String, input_models : Element
 		while (set_len(keys) > 0):
 		while (set_len(keys) > 0):
 			key = set_pop(keys)
 			key = set_pop(keys)
 			Element mm
 			Element mm
-			mm = get_full_model(get_model_id(input_models[key]), get_model_id(input_metamodels[key]))
+			mm = get_full_model(get_entry_id(input_models[key]), get_entry_id(input_metamodels[key]))
 			if (element_eq(mm, read_root())):
 			if (element_eq(mm, read_root())):
 				log("Signature mismatch in operation for tag " + key)
 				log("Signature mismatch in operation for tag " + key)
 				output("Signature mismatch in operation for tag " + key)
 				output("Signature mismatch in operation for tag " + key)
@@ -439,7 +508,7 @@ Element function execute_operation(operation_id : String, input_models : Element
 			set_add_node(model_tuples, create_tuple(key, mm))
 			set_add_node(model_tuples, create_tuple(key, mm))
 
 
 		Element merged_metamodel
 		Element merged_metamodel
-		merged_metamodel = get_full_model(merged_metamodel_id, get_model_id("SimpleClassDiagrams"))
+		merged_metamodel = get_full_model(merged_metamodel_id, get_entry_id("SimpleClassDiagrams"))
 		if (element_eq(merged_metamodel, read_root())):
 		if (element_eq(merged_metamodel, read_root())):
 			log("Merged metamodel in operation is not of type SimpleClassDiagrams")
 			log("Merged metamodel in operation is not of type SimpleClassDiagrams")
 			output("Merged metamodel in operation is not of type SimpleClassDiagrams")
 			output("Merged metamodel in operation is not of type SimpleClassDiagrams")
@@ -450,7 +519,7 @@ Element function execute_operation(operation_id : String, input_models : Element
 		if (bool_and(dict_len(input_models) == 1, dict_len(output_metamodels) == 0)):
 		if (bool_and(dict_len(input_models) == 1, dict_len(output_metamodels) == 0)):
 			// Just skip the merge...
 			// Just skip the merge...
 			Element m
 			Element m
-			m = get_full_model(get_model_id(input_models[set_pop(dict_keys(input_models))]), get_model_id(input_metamodels[set_pop(dict_keys(input_metamodels))]))
+			m = get_full_model(get_entry_id(input_models[set_pop(dict_keys(input_models))]), get_entry_id(input_metamodels[set_pop(dict_keys(input_metamodels))]))
 			if (element_eq(m, read_root())):
 			if (element_eq(m, read_root())):
 				log("Signature mismatch in operation for tag " + cast_v2s(set_pop(dict_keys(input_models))))
 				log("Signature mismatch in operation for tag " + cast_v2s(set_pop(dict_keys(input_models))))
 				output("Signature mismatch in operation for tag " + cast_v2s(set_pop(dict_keys(input_models))))
 				output("Signature mismatch in operation for tag " + cast_v2s(set_pop(dict_keys(input_models))))
@@ -481,13 +550,13 @@ Element function execute_operation(operation_id : String, input_models : Element
 			return read_root()!
 			return read_root()!
 		result = transform(merged_model, operation)
 		result = transform(merged_model, operation)
 	elif (exact_type == "ManualOperation"):
 	elif (exact_type == "ManualOperation"):
-		output("Please perform manual operation " + cast_v2s(read_attribute(core, operation_id, "name")))
+		output("Please perform manual operation " + cast_v2s(full_name(operation_id)))
 		modify(merged_model, True)
 		modify(merged_model, True)
 		result = True
 		result = True
 	elif (exact_type == "ActionLanguage"):
 	elif (exact_type == "ActionLanguage"):
 		Element func
 		Element func
 		Element al
 		Element al
-		al = get_full_model(operation_id, get_model_id("ActionLanguage"))
+		al = get_full_model(operation_id, get_entry_id("ActionLanguage"))
 		if (element_eq(al, read_root())):
 		if (element_eq(al, read_root())):
 			log("Action Language operation not typed by ActionLanguage metamodel!")
 			log("Action Language operation not typed by ActionLanguage metamodel!")
 			output("Action Language operation not typed by ActionLanguage metamodel!")
 			output("Action Language operation not typed by ActionLanguage metamodel!")
@@ -512,7 +581,7 @@ Element function execute_operation(operation_id : String, input_models : Element
 		while (set_len(keys) > 0):
 		while (set_len(keys) > 0):
 			key = set_pop(keys)
 			key = set_pop(keys)
 			Element mm
 			Element mm
-			mm = get_full_model(get_model_id(output_metamodels[key]), get_model_id("SimpleClassDiagrams"))
+			mm = get_full_model(get_entry_id(output_metamodels[key]), get_entry_id("SimpleClassDiagrams"))
 			if (element_eq(mm, read_root())):
 			if (element_eq(mm, read_root())):
 				log("Output metamodel cannot be interpreted using SimpleClassDiagrams: " + key)
 				log("Output metamodel cannot be interpreted using SimpleClassDiagrams: " + key)
 				output("Output metamodel cannot be interpreted using SimpleClassDiagrams: " + key)
 				output("Output metamodel cannot be interpreted using SimpleClassDiagrams: " + key)
@@ -560,7 +629,7 @@ Boolean function enact_action(pm : Element, element : String, prefix : String, u
 	output_map = dict_create()
 	output_map = dict_create()
 
 
 	// Read out the referenced element from the MvC
 	// Read out the referenced element from the MvC
-	transformation_id = get_model_id(read_attribute(pm, element, "name"))
+	transformation_id = get_entry_id(read_attribute(pm, element, "name"))
 
 
 	// Find all input model names
 	// Find all input model names
 	lst = allOutgoingAssociationInstances(pm, element, "Consumes")
 	lst = allOutgoingAssociationInstances(pm, element, "Consumes")
@@ -598,11 +667,11 @@ Boolean function enact_action(pm : Element, element : String, prefix : String, u
 		keys = dict_keys(result)
 		keys = dict_keys(result)
 		while (set_len(keys) > 0):
 		while (set_len(keys) > 0):
 			key = set_pop(keys)
 			key = set_pop(keys)
-			if (get_model_id(output_map[key]) == ""):
+			if (get_entry_id(output_map[key]) == ""):
 				// New model
 				// New model
-				model_create(result[key], output_map[key], user_id, get_model_id(key), "Model")
+				model_create(result[key], output_map[key], user_id, get_entry_id(key), "Model")
 			else:
 			else:
-				model_overwrite(result[key], get_model_id(output_map[key]), get_model_id(outputs[key]))
+				model_overwrite(result[key], get_entry_id(output_map[key]), get_entry_id(outputs[key]))
 		return True!
 		return True!
 
 
 Void function enact_PM(pm : Element, prefix : String, user_id : String):
 Void function enact_PM(pm : Element, prefix : String, user_id : String):
@@ -755,15 +824,15 @@ String function cmd_model_add(user_id : String, type : String, name : String):
 	Element new_model
 	Element new_model
 	String new_model_id
 	String new_model_id
 
 
-	type_id = get_model_id(type)
+	type_id = get_entry_id(type)
 	if (type_id != ""):
 	if (type_id != ""):
 		// Type exists
 		// Type exists
 		if (allow_read(user_id, type_id)):
 		if (allow_read(user_id, type_id)):
 			// And is readable
 			// And is readable
-			if (get_model_id(name) == ""):
+			if (get_entry_id(name) == ""):
 				// Model doesn't exist yet
 				// Model doesn't exist yet
 				Element mm
 				Element mm
-				mm = get_full_model(type_id, get_model_id("SimpleClassDiagrams"))
+				mm = get_full_model(type_id, get_entry_id("SimpleClassDiagrams"))
 				if (element_eq(mm, read_root())):
 				if (element_eq(mm, read_root())):
 					return "Type is not typed by SimpleClassDiagrams: " + type!
 					return "Type is not typed by SimpleClassDiagrams: " + type!
 
 
@@ -782,11 +851,11 @@ String function cmd_process_execute(user_id : String, process : String, prefix :
 	// Execute a process model until it reaches termination
 	// Execute a process model until it reaches termination
 	String process_id
 	String process_id
 
 
-	process_id = get_model_id(process)
+	process_id = get_entry_id(process)
 	if (process_id != ""):
 	if (process_id != ""):
 		if (allow_read(user_id, process_id)):
 		if (allow_read(user_id, process_id)):
 			Element pm
 			Element pm
-			pm = get_full_model(process_id, get_model_id("ProcessModel"))
+			pm = get_full_model(process_id, get_entry_id("ProcessModel"))
 			if (element_eq(pm, read_root())):
 			if (element_eq(pm, read_root())):
 				return "Specified model cannot be interpreted as a ProcessModel: " + process!
 				return "Specified model cannot be interpreted as a ProcessModel: " + process!
 
 
@@ -805,9 +874,9 @@ String function cmd_transformation_between(user_id : String, source_name : Strin
 	Element result
 	Element result
 	String transformation
 	String transformation
 
 
-	source_id = get_model_id(source_name)
+	source_id = get_entry_id(source_name)
 	if (source_id != ""):
 	if (source_id != ""):
-		target_id = get_model_id(target_name)
+		target_id = get_entry_id(target_name)
 
 
 		if (target_id != ""):
 		if (target_id != ""):
 			onSource = allAssociationOrigins(core, source_id, "transformInput")
 			onSource = allAssociationOrigins(core, source_id, "transformInput")
@@ -820,7 +889,7 @@ String function cmd_transformation_between(user_id : String, source_name : Strin
 			while (set_len(result) > 0):
 			while (set_len(result) > 0):
 				transformation = set_pop(result)
 				transformation = set_pop(result)
 				if (allow_read(user_id, transformation)):
 				if (allow_read(user_id, transformation)):
-					r = r + string_join(read_attribute(core, transformation, "name"), "\n")
+					r = r + string_join(full_name(transformation), "\n")
 			return r!
 			return r!
 		else:
 		else:
 			return "Model not found: " + target_name!
 			return "Model not found: " + target_name!
@@ -840,10 +909,10 @@ String function cmd_model_render(user_id : String, model_name : String, mapper_n
 	Element out_links
 	Element out_links
 	String link
 	String link
 
 
-	model_ID = get_model_id(model_name)
+	model_ID = get_entry_id(model_name)
 
 
 	if (model_ID != ""):
 	if (model_ID != ""):
-		mapper_ID = get_model_id(mapper_name)
+		mapper_ID = get_entry_id(mapper_name)
 
 
 		if (allow_read(user_id, model_ID)):
 		if (allow_read(user_id, model_ID)):
 			if (mapper_ID != ""):
 			if (mapper_ID != ""):
@@ -863,25 +932,25 @@ String function cmd_model_render(user_id : String, model_name : String, mapper_n
 					out_links = allOutgoingAssociationInstances(core, mapper_ID, "transformOutput")
 					out_links = allOutgoingAssociationInstances(core, mapper_ID, "transformOutput")
 					while(set_len(out_links) > 0):
 					while(set_len(out_links) > 0):
 						link = set_pop(out_links)
 						link = set_pop(out_links)
-						dict_add(output_map, read_attribute(core, link, "name"), read_attribute(core, readAssociationDestination(core, link), "name"))
+						dict_add(output_map, read_attribute(core, link, "name"), full_name(readAssociationDestination(core, link)))
 
 
-					if (get_model_id(rendered_name) == ""):
+					if (get_entry_id(rendered_name) == ""):
 						// Instantiate
 						// Instantiate
 						Element rendered
 						Element rendered
-						rendered = get_full_model(get_model_id(output_map["rendered"]), get_model_id("SimpleClassDiagrams"))
+						rendered = get_full_model(get_entry_id(output_map["rendered"]), get_entry_id("SimpleClassDiagrams"))
 						if (element_eq(rendered, read_root())):
 						if (element_eq(rendered, read_root())):
 							return "Rendered metamodel cannot conform to SimpleClassDiagrams"!
 							return "Rendered metamodel cannot conform to SimpleClassDiagrams"!
 
 
 						rendered_model = instantiate_model(rendered)
 						rendered_model = instantiate_model(rendered)
-						model_create(rendered_model, rendered_name, user_id, get_model_id(output_map["rendered"]), "Model")
+						model_create(rendered_model, rendered_name, user_id, get_entry_id(output_map["rendered"]), "Model")
 						
 						
 						// Tracability model won't exist either
 						// Tracability model won't exist either
-						tracability_model = instantiate_model(get_full_model(get_model_id("Tracability"), get_model_id("SimpleClassDiagrams")))
-						model_create(tracability_model, tracability_name, user_id, get_model_id("Tracability"), "Model")
+						tracability_model = instantiate_model(get_full_model(get_entry_id("Tracability"), get_entry_id("SimpleClassDiagrams")))
+						model_create(tracability_model, tracability_name, user_id, get_entry_id("Tracability"), "Model")
 
 
 					else:
 					else:
 						// Read out tracability model
 						// Read out tracability model
-						tracability_model = get_full_model(get_model_id(tracability_name), get_model_id("Tracability"))
+						tracability_model = get_full_model(get_entry_id(tracability_name), get_entry_id("Tracability"))
 						if (element_eq(tracability_model, read_root())):
 						if (element_eq(tracability_model, read_root())):
 							return "Tracability model not typed by Tracability metamodel: " + tracability_name!
 							return "Tracability model not typed by Tracability metamodel: " + tracability_name!
 
 
@@ -889,17 +958,17 @@ String function cmd_model_render(user_id : String, model_name : String, mapper_n
 					result = execute_operation(mapper_ID, inputs, tracability_model)
 					result = execute_operation(mapper_ID, inputs, tracability_model)
 
 
 					// Overwrite the previous rendered model
 					// Overwrite the previous rendered model
-					model_overwrite(result["rendered"], get_model_id(rendered_name), get_model_id(output_map["rendered"]))
-					model_overwrite(result["abstract"], get_model_id(model_name), get_model_id(output_map["abstract"]))
+					model_overwrite(result["rendered"], get_entry_id(rendered_name), get_entry_id(output_map["rendered"]))
+					model_overwrite(result["abstract"], get_entry_id(model_name), get_entry_id(output_map["abstract"]))
 
 
 					// Tracability updated in-place
 					// Tracability updated in-place
-					model_overwrite(tracability_model, get_model_id(tracability_name), get_model_id("Tracability"))
-					tracability_model = get_full_model(get_model_id(tracability_name), get_model_id("Tracability"))
+					model_overwrite(tracability_model, get_entry_id(tracability_name), get_entry_id("Tracability"))
+					tracability_model = get_full_model(get_entry_id(tracability_name), get_entry_id("Tracability"))
 					if (element_eq(tracability_model, read_root())):
 					if (element_eq(tracability_model, read_root())):
 						return "Tracability model not typed by Tracability metamodel: " + tracability_name!
 						return "Tracability model not typed by Tracability metamodel: " + tracability_name!
 
 
 					// Also output the resulting model
 					// Also output the resulting model
-					return "Success: " + JSON_print(get_full_model(get_model_id(rendered_name), get_model_id(output_map["rendered"])))!
+					return "Success: " + JSON_print(get_full_model(get_entry_id(rendered_name), get_entry_id(output_map["rendered"])))!
 				else:
 				else:
 					return "Permission denied to model: " + mapper_name!
 					return "Permission denied to model: " + mapper_name!
 			else:
 			else:
@@ -930,7 +999,7 @@ String function cmd_transformation_execute(user_id : String, transformation_name
 	String key
 	String key
 	String assoc_name
 	String assoc_name
 
 
-	transformation_id = get_model_id(transformation_name)
+	transformation_id = get_entry_id(transformation_name)
 	if (transformation_id != ""):
 	if (transformation_id != ""):
 		if (allow_read(user_id, transformation_id)):
 		if (allow_read(user_id, transformation_id)):
 			if (is_nominal_instance(core, transformation_id, "Transformation")):
 			if (is_nominal_instance(core, transformation_id, "Transformation")):
@@ -946,7 +1015,7 @@ String function cmd_transformation_execute(user_id : String, transformation_name
 					else:
 					else:
 						return "Source model not bound: " + assoc_name!
 						return "Source model not bound: " + assoc_name!
 
 
-					source_model_ID = get_model_id(source_model_name)
+					source_model_ID = get_entry_id(source_model_name)
 					if (source_model_ID != ""):
 					if (source_model_ID != ""):
 						if (allow_read(user_id, source_model_ID)):
 						if (allow_read(user_id, source_model_ID)):
 							// Check for conformance to the requested metamodel
 							// Check for conformance to the requested metamodel
@@ -968,14 +1037,14 @@ String function cmd_transformation_execute(user_id : String, transformation_name
 					else:
 					else:
 						return "Target model not bound: " + assoc_name!
 						return "Target model not bound: " + assoc_name!
 
 
-					if (get_model_id(target_model_name) == ""):
+					if (get_entry_id(target_model_name) == ""):
 						// Doesn't exist yet, so we can easily create
 						// Doesn't exist yet, so we can easily create
-						dict_add(output_map, assoc_name, read_attribute(core, readAssociationDestination(core, target), "name"))
+						dict_add(output_map, assoc_name, full_name(target))
 						dict_add(outputs, assoc_name, target_model_name)
 						dict_add(outputs, assoc_name, target_model_name)
 					else:
 					else:
 						// Already exists, so we need to check for write access
 						// Already exists, so we need to check for write access
-						if (allow_write(user_id, get_model_id(target_model_name))):
-							dict_add(output_map, assoc_name, read_attribute(core, readAssociationDestination(core, target), "name"))
+						if (allow_write(user_id, get_entry_id(target_model_name))):
+							dict_add(output_map, assoc_name, full_name(target))
 							dict_add(outputs, assoc_name, target_model_name)
 							dict_add(outputs, assoc_name, target_model_name)
 						else:
 						else:
 							return "Permission denied to model: " + target_model_name!
 							return "Permission denied to model: " + target_model_name!
@@ -998,11 +1067,11 @@ String function cmd_transformation_execute(user_id : String, transformation_name
 					while (set_len(keys) > 0):
 					while (set_len(keys) > 0):
 						key = set_pop(keys)
 						key = set_pop(keys)
 						
 						
-						if (get_model_id(outputs[key]) == ""):
+						if (get_entry_id(outputs[key]) == ""):
 							// New model
 							// New model
-							model_create(result[key], outputs[key], user_id, get_model_id(key), "Model")
+							model_create(result[key], outputs[key], user_id, get_entry_id(key), "Model")
 						else:
 						else:
-							model_overwrite(result[key], get_model_id(outputs[key]), get_model_id(output_map[key]))
+							model_overwrite(result[key], get_entry_id(outputs[key]), get_entry_id(output_map[key]))
 
 
 					return "Success"!
 					return "Success"!
 			else:
 			else:
@@ -1018,11 +1087,11 @@ String function cmd_verify(user_id : String, model_name : String, metamodel_name
 	String result
 	String result
 	Element inputs
 	Element inputs
 
 
-	model_id = get_model_id(model_name)
+	model_id = get_entry_id(model_name)
 	if (model_id != ""):
 	if (model_id != ""):
 		if (allow_read(user_id, model_id)):
 		if (allow_read(user_id, model_id)):
 			Element m
 			Element m
-			m = get_full_model(get_model_id(model_name), get_model_id(metamodel_name))
+			m = get_full_model(get_entry_id(model_name), get_entry_id(metamodel_name))
 			if (element_eq(m, read_root())):
 			if (element_eq(m, read_root())):
 				return "No conformance relation can be found between these models"!
 				return "No conformance relation can be found between these models"!
 
 
@@ -1038,13 +1107,13 @@ String function cmd_model_overwrite(user_id : String, model_name : String, metam
 	String type_id
 	String type_id
 	Element new_model
 	Element new_model
 
 
-	model_id = get_model_id(model_name)
+	model_id = get_entry_id(model_name)
 	if (model_id != ""):
 	if (model_id != ""):
 		if (allow_write(user_id, model_id)):
 		if (allow_write(user_id, model_id)):
 			type_id = set_pop(allAssociationDestinations(core, model_id, "instanceOf"))
 			type_id = set_pop(allAssociationDestinations(core, model_id, "instanceOf"))
 			if (allow_read(user_id, type_id)):
 			if (allow_read(user_id, type_id)):
 				Element mm
 				Element mm
-				mm = get_full_model(get_model_id(metamodel_name), get_model_id("SimpleClassDiagrams"))
+				mm = get_full_model(get_entry_id(metamodel_name), get_entry_id("SimpleClassDiagrams"))
 				if (element_eq(mm, read_root())):
 				if (element_eq(mm, read_root())):
 					return "Metamodel does not conform to SimpleClassDiagrams: " + metamodel_name!
 					return "Metamodel does not conform to SimpleClassDiagrams: " + metamodel_name!
 
 
@@ -1053,7 +1122,7 @@ String function cmd_model_overwrite(user_id : String, model_name : String, metam
 				model_overwrite(new_model, model_id, metamodel_name)
 				model_overwrite(new_model, model_id, metamodel_name)
 				return "Success"!
 				return "Success"!
 			else:
 			else:
-				return string_join("Permission denied to model: ", read_attribute(core, type_id, "name"))!
+				return string_join("Permission denied to model: ", full_name(type_id))!
 		else:
 		else:
 			return "Permission denied to model: " + model_name!
 			return "Permission denied to model: " + model_name!
 	else:
 	else:
@@ -1064,14 +1133,14 @@ String function cmd_model_modify(user_id : String, model_name : String, metamode
 	String model_id
 	String model_id
 	String type_id
 	String type_id
 
 
-	model_id = get_model_id(model_name)
+	model_id = get_entry_id(model_name)
 
 
 	if (model_id != ""):
 	if (model_id != ""):
 		if (allow_read(user_id, model_id)):
 		if (allow_read(user_id, model_id)):
 			type_id = set_pop(allAssociationDestinations(core, model_id, "instanceOf"))
 			type_id = set_pop(allAssociationDestinations(core, model_id, "instanceOf"))
 			if (allow_read(user_id, type_id)):
 			if (allow_read(user_id, type_id)):
 				Element new_model
 				Element new_model
-				new_model = get_full_model(model_id, get_model_id(metamodel_name))
+				new_model = get_full_model(model_id, get_entry_id(metamodel_name))
 				if (element_eq(new_model, read_root())):
 				if (element_eq(new_model, read_root())):
 					return "No conformance relation can be found between these models"!
 					return "No conformance relation can be found between these models"!
 				output("Success")
 				output("Success")
@@ -1081,7 +1150,7 @@ String function cmd_model_modify(user_id : String, model_name : String, metamode
 					model_overwrite(new_model, model_id, metamodel_name)
 					model_overwrite(new_model, model_id, metamodel_name)
 				return "Success"!
 				return "Success"!
 			else:
 			else:
-				return string_join("Permission denied to model: ", read_attribute(core, type_id, "name"))!
+				return string_join("Permission denied to model: ", full_name(type_id))!
 		else:
 		else:
 			return "Permission denied to model: " + model_name!
 			return "Permission denied to model: " + model_name!
 	else:
 	else:
@@ -1089,7 +1158,7 @@ String function cmd_model_modify(user_id : String, model_name : String, metamode
 
 
 String function cmd_model_delete(user_id : String, model_name : String):
 String function cmd_model_delete(user_id : String, model_name : String):
 	String model_id
 	String model_id
-	model_id = get_model_id(model_name)
+	model_id = get_entry_id(model_name)
 
 
 	if (model_id != ""):
 	if (model_id != ""):
 		if (allow_write(user_id, model_id)):
 		if (allow_write(user_id, model_id)):
@@ -1100,23 +1169,20 @@ String function cmd_model_delete(user_id : String, model_name : String):
 	else:
 	else:
 		return "Model not found: " + model_name!
 		return "Model not found: " + model_name!
 
 
-String function cmd_model_list():
+String function cmd_model_list(location : String):
 	// List all models
 	// List all models
 	Element models
 	Element models
 	String result
 	String result
 	String m
 	String m
 
 
 	result = "Success: "
 	result = "Success: "
-	models = allInstances(core, "Model")
+	models = allAssociationDestinations(core, get_entry_id(location), "contains")
 	while (set_len(models) > 0):
 	while (set_len(models) > 0):
 		m = set_pop(models)
 		m = set_pop(models)
-		if (set_len(allAssociationDestinations(core, m, "instanceOf")) > 0):
-			result = (result + string_join((string_join("  ", read_attribute(core, m, "name")) + " : "), read_attribute(core, set_pop(allAssociationDestinations(core, m, "instanceOf")), "name"))) + "\n"
-		else:
-			result = result + string_join(string_join("  ", read_attribute(core, m, "name")), " : None\n")
+		result = result + string_join(string_join("  ", read_attribute(core, m, "name")), "\n")
 	return result!
 	return result!
 
 
-String function cmd_model_list_full():
+String function cmd_model_list_full(location : String):
 	// List all models with full info
 	// List all models with full info
 	Element models
 	Element models
 	String m
 	String m
@@ -1128,20 +1194,14 @@ String function cmd_model_list_full():
 	String result
 	String result
 
 
 	result = "Success: "
 	result = "Success: "
-	models = allInstances(core, "Model")
+	models = allAssociationDestinations(core, get_entry_id(location), "contains")
 	while (set_len(models) > 0):
 	while (set_len(models) > 0):
 		m = set_pop(models)
 		m = set_pop(models)
 		permissions = read_attribute(core, m, "permissions")
 		permissions = read_attribute(core, m, "permissions")
 		owner = read_attribute(core, set_pop(allAssociationDestinations(core, m, "owner")), "name")
 		owner = read_attribute(core, set_pop(allAssociationDestinations(core, m, "owner")), "name")
 		group = read_attribute(core, set_pop(allAssociationDestinations(core, m, "group")), "name")
 		group = read_attribute(core, set_pop(allAssociationDestinations(core, m, "group")), "name")
 		name = read_attribute(core, m, "name")
 		name = read_attribute(core, m, "name")
-
-		if (set_len(allAssociationDestinations(core, m, "instanceOf")) > 0):
-			type = read_attribute(core, set_pop(allAssociationDestinations(core, m, "instanceOf")), "name")
-		else:
-			type = "None"
-
-		result = (result + ((((((((("  " + permissions) + " ") + owner) + " ") + group) + " ") + name) + " : ") + type)) + "\n"
+		result = result + (((((((("  " + permissions) + " ") + owner) + " ") + group) + " ") + name) + "\n")
 
 
 	return result!
 	return result!
 
 
@@ -1179,12 +1239,12 @@ String function transformation_add(user_id : String, source_models : Element, ta
 	while (set_len(keys) > 0):
 	while (set_len(keys) > 0):
 		key = set_pop(keys)
 		key = set_pop(keys)
 		name = source_models[key]
 		name = source_models[key]
-		model_id = get_model_id(name)
+		model_id = get_entry_id(name)
 		if (model_id != ""):
 		if (model_id != ""):
 			if (allow_read(user_id, model_id)):
 			if (allow_read(user_id, model_id)):
 				if (bool_not(dict_in(source, key))):
 				if (bool_not(dict_in(source, key))):
 					dict_add(source, key, model_id)
 					dict_add(source, key, model_id)
-					mm = get_full_model(model_id, get_model_id("SimpleClassDiagrams"))
+					mm = get_full_model(model_id, get_entry_id("SimpleClassDiagrams"))
 					if (element_eq(mm, read_root())):
 					if (element_eq(mm, read_root())):
 						return "Transformation source type not in SimpleClassDiagrams hierarchy: " + key!
 						return "Transformation source type not in SimpleClassDiagrams hierarchy: " + key!
 
 
@@ -1205,12 +1265,12 @@ String function transformation_add(user_id : String, source_models : Element, ta
 	while (set_len(keys) > 0):
 	while (set_len(keys) > 0):
 		key = set_pop(keys)
 		key = set_pop(keys)
 		name = target_models[key]
 		name = target_models[key]
-		model_id = get_model_id(name)
+		model_id = get_entry_id(name)
 		if (model_id != ""):
 		if (model_id != ""):
 			if (allow_read(user_id, model_id)):
 			if (allow_read(user_id, model_id)):
 				if (bool_not(dict_in(target, key))):
 				if (bool_not(dict_in(target, key))):
 					dict_add(target, key, model_id)
 					dict_add(target, key, model_id)
-					mm = get_full_model(model_id, get_model_id("SimpleClassDiagrams"))
+					mm = get_full_model(model_id, get_entry_id("SimpleClassDiagrams"))
 					if (element_eq(mm, read_root())):
 					if (element_eq(mm, read_root())):
 						return "Transformation target type not in SimpleClassDiagrams hierarchy: " + key!
 						return "Transformation target type not in SimpleClassDiagrams hierarchy: " + key!
 
 
@@ -1227,7 +1287,7 @@ String function transformation_add(user_id : String, source_models : Element, ta
 		else:
 		else:
 			return "Model not found: " + name!
 			return "Model not found: " + name!
 
 
-	if (get_model_id(operation_name) == ""):
+	if (get_entry_id(operation_name) == ""):
 		// Write out a merged metamodel containing all these models: this is the MM for the manual operation
 		// Write out a merged metamodel containing all these models: this is the MM for the manual operation
 		// New location is available, so write
 		// New location is available, so write
 		if (bool_not(bool_and(dict_len(source_models) == 0, dict_len(target_models) == 0))):
 		if (bool_not(bool_and(dict_len(source_models) == 0, dict_len(target_models) == 0))):
@@ -1237,23 +1297,23 @@ String function transformation_add(user_id : String, source_models : Element, ta
 		if (operation_type == "manual"):
 		if (operation_type == "manual"):
 			// Finished with all information, now create the model itself!
 			// Finished with all information, now create the model itself!
 			Element m
 			Element m
-			m = get_full_model(get_model_id("ManualOperation"), get_model_id("SimpleClassDiagrams"))
+			m = get_full_model(get_entry_id("ManualOperation"), get_entry_id("SimpleClassDiagrams"))
 			if (element_eq(m, read_root())):
 			if (element_eq(m, read_root())):
 				log("Error when opening ManualOperation: no conformance relation found")
 				log("Error when opening ManualOperation: no conformance relation found")
 				return "Error when opening ManualOperation: no conformance relation found"!
 				return "Error when opening ManualOperation: no conformance relation found"!
-			model_create(instantiate_model(m), operation_name, user_id, get_model_id("ManualOperation"), "ManualOperation")
-			model_id = get_model_id(operation_name)
+			model_create(instantiate_model(m), operation_name, user_id, get_entry_id("ManualOperation"), "ManualOperation")
+			model_id = get_entry_id(operation_name)
 
 
 		elif (operation_type == "actionlanguage"):
 		elif (operation_type == "actionlanguage"):
 			// Finished with all information, now create the model itself!
 			// Finished with all information, now create the model itself!
 			output("Waiting for code constructors...")
 			output("Waiting for code constructors...")
-			add_code_model(get_full_model(get_model_id("ActionLanguage"), get_model_id("SimpleClassDiagrams")), "AL/" + operation_name, construct_function())
-			model_create(import_node("AL/" + operation_name), operation_name, user_id, get_model_id("ActionLanguage"), "ActionLanguage")
-			model_id = get_model_id(operation_name)
+			add_code_model(get_full_model(get_entry_id("ActionLanguage"), get_entry_id("SimpleClassDiagrams")), "AL/" + operation_name, construct_function())
+			model_create(import_node("AL/" + operation_name), operation_name, user_id, get_entry_id("ActionLanguage"), "ActionLanguage")
+			model_id = get_entry_id(operation_name)
 
 
 		if (bool_not(bool_and(dict_len(source_models) == 0, dict_len(target_models) == 0))):
 		if (bool_not(bool_and(dict_len(source_models) == 0, dict_len(target_models) == 0))):
-			model_create(merged_formalism, "__merged_" + operation_name, user_id, get_model_id("SimpleClassDiagrams"), "Model")
-			merged_formalism_id = get_model_id("__merged_" + operation_name)
+			model_create(merged_formalism, "__merged_" + operation_name, user_id, get_entry_id("SimpleClassDiagrams"), "Model")
+			merged_formalism_id = get_entry_id("__merged_" + operation_name)
 
 
 			// Add tracability links at this level
 			// Add tracability links at this level
 			while (set_len(all_formalisms) > 0):
 			while (set_len(all_formalisms) > 0):
@@ -1317,14 +1377,14 @@ String function cmd_transformation_add_MT(user_id : String, source_models : Elem
 	while (set_len(keys) > 0):
 	while (set_len(keys) > 0):
 		key = set_pop(keys)
 		key = set_pop(keys)
 		name = source_models[key]
 		name = source_models[key]
-		model_id = get_model_id(name)
+		model_id = get_entry_id(name)
 		if (model_id != ""):
 		if (model_id != ""):
 			if (allow_read(user_id, name)):
 			if (allow_read(user_id, name)):
 				// Check whether or not it is SimpleClassDiagrams
 				// Check whether or not it is SimpleClassDiagrams
-				if (is_typed_by(model_id, get_model_id("SimpleClassDiagrams"))):
+				if (is_typed_by(model_id, get_entry_id("SimpleClassDiagrams"))):
 					if (bool_not(dict_in(source, key))):
 					if (bool_not(dict_in(source, key))):
 						dict_add(source, key, model_id)
 						dict_add(source, key, model_id)
-						mm = get_full_model(model_id, get_model_id("SimpleClassDiagrams"))
+						mm = get_full_model(model_id, get_entry_id("SimpleClassDiagrams"))
 						if (element_eq(mm, read_root())):
 						if (element_eq(mm, read_root())):
 							return "ModelTransformation source type not in SimpleClassDiagrams hierarchy: " + name!
 							return "ModelTransformation source type not in SimpleClassDiagrams hierarchy: " + name!
 						set_add_node(to_ramify, create_tuple(key, mm))
 						set_add_node(to_ramify, create_tuple(key, mm))
@@ -1341,10 +1401,10 @@ String function cmd_transformation_add_MT(user_id : String, source_models : Elem
 	while (set_len(keys) > 0):
 	while (set_len(keys) > 0):
 		key = set_pop(keys)
 		key = set_pop(keys)
 		name = target_models[key]
 		name = target_models[key]
-		model_id = get_model_id(name)
+		model_id = get_entry_id(name)
 		if (model_id != ""):
 		if (model_id != ""):
 			if (allow_read(user_id, name)):
 			if (allow_read(user_id, name)):
-				if (is_typed_by(model_id, get_model_id("SimpleClassDiagrams"))):
+				if (is_typed_by(model_id, get_entry_id("SimpleClassDiagrams"))):
 					if (bool_not(dict_in(target, key))):
 					if (bool_not(dict_in(target, key))):
 						if (dict_in(source, key)):
 						if (dict_in(source, key)):
 							if (value_eq(model_id, source[key])):
 							if (value_eq(model_id, source[key])):
@@ -1354,7 +1414,7 @@ String function cmd_transformation_add_MT(user_id : String, source_models : Elem
 								return "Name in output cannot have different type than input: " + key!
 								return "Name in output cannot have different type than input: " + key!
 						else:
 						else:
 							dict_add(target, key, model_id)
 							dict_add(target, key, model_id)
-							mm = get_full_model(model_id, get_model_id("SimpleClassDiagrams"))
+							mm = get_full_model(model_id, get_entry_id("SimpleClassDiagrams"))
 							if (element_eq(mm, read_root())):
 							if (element_eq(mm, read_root())):
 								return "ModelTransformation target type not in SimpleClassDiagrams hierarchy: " + name!
 								return "ModelTransformation target type not in SimpleClassDiagrams hierarchy: " + name!
 							set_add_node(to_ramify, create_tuple(key, mm))
 							set_add_node(to_ramify, create_tuple(key, mm))
@@ -1371,22 +1431,22 @@ String function cmd_transformation_add_MT(user_id : String, source_models : Elem
 	modify(merged_formalism, True)
 	modify(merged_formalism, True)
 
 
 	ramified_metamodel = ramify(merged_formalism)
 	ramified_metamodel = ramify(merged_formalism)
-	model_create(ramified_metamodel, "__RAM_" + operation_name, user_id, get_model_id("SimpleClassDiagrams"), "Model")
-	ramified_metamodel_id = get_model_id("__RAM_" + operation_name)
+	model_create(ramified_metamodel, "__RAM_" + operation_name, user_id, get_entry_id("SimpleClassDiagrams"), "Model")
+	ramified_metamodel_id = get_entry_id("__RAM_" + operation_name)
 	
 	
 	// Now use the RAMified model to create the instance
 	// Now use the RAMified model to create the instance
-	if (get_model_id(operation_name) == ""):
+	if (get_entry_id(operation_name) == ""):
 		String new_model
 		String new_model
 		// Finished with all information, now create the model itself!
 		// Finished with all information, now create the model itself!
 		output("Waiting for model constructors...")
 		output("Waiting for model constructors...")
-		new_model = construct_model_raw(get_full_model(ramified_metamodel_id, get_model_id("SimpleClassDiagrams")))
+		new_model = construct_model_raw(get_full_model(ramified_metamodel_id, get_entry_id("SimpleClassDiagrams")))
 		model_create(new_model, operation_name, user_id, ramified_metamodel_id, "ModelTransformation")
 		model_create(new_model, operation_name, user_id, ramified_metamodel_id, "ModelTransformation")
-		model_id = get_model_id(operation_name)
+		model_id = get_entry_id(operation_name)
 
 
 		// Write out a merged metamodel containing all these models: this is the MM for the manual operation
 		// Write out a merged metamodel containing all these models: this is the MM for the manual operation
 		// New location is available, so write
 		// New location is available, so write
-		model_create(merged_formalism, "__merged_" + operation_name, user_id, get_model_id("SimpleClassDiagrams"), "Model")
-		merged_formalism_id = get_model_id("__merged_" + operation_name)
+		model_create(merged_formalism, "__merged_" + operation_name, user_id, get_entry_id("SimpleClassDiagrams"), "Model")
+		merged_formalism_id = get_entry_id("__merged_" + operation_name)
 
 
 		// Add tracability links at this level
 		// Add tracability links at this level
 		tracability_link = instantiate_link(core, "tracability", "", model_id, merged_formalism_id)
 		tracability_link = instantiate_link(core, "tracability", "", model_id, merged_formalism_id)
@@ -1418,50 +1478,11 @@ String function cmd_transformation_add_MT(user_id : String, source_models : Elem
 	else:
 	else:
 		return "Model exists: " + operation_name!
 		return "Model exists: " + operation_name!
 
 
-String function cmd_transformation_list():
-	// List all models
-	Element models
-	String m
-	String type
-	String result
-
-	result = "Success: "
-	models = allInstances(core, "Transformation")
-	while (set_len(models) > 0):
-		m = set_pop(models)
-		result = result + ((string_join(("[" + read_type(core, m)) + "]", string_join((string_join(" ", read_attribute(core, m, "name")) + " : "), read_attribute(core, set_pop(allAssociationDestinations(core, m, "instanceOf")), "name")))) + "\n")
-
-	return result!
-
-String function cmd_transformation_list_full():
-	// List all models with full info
-	Element models
-	String m
-	String permissions
-	String owner
-	String group
-	String name
-	String type
-	String result
-
-	result = ""
-	models = allInstances(core, "Transformation")
-	while (set_len(models) > 0):
-		m = set_pop(models)
-		permissions = read_attribute(core, m, "permissions")
-		owner = read_attribute(core, set_pop(allAssociationDestinations(core, m, "owner")), "name")
-		group = read_attribute(core, set_pop(allAssociationDestinations(core, m, "group")), "name")
-		name = read_attribute(core, m, "name")
-		type = read_attribute(core, set_pop(allAssociationDestinations(core, m, "instanceOf")), "name")
-		result = result + (((((((((("  " + permissions) + " ") + owner) + " ") + group) + " ") + ((("[" + read_type(core, m)) + "] ") + name)) + " : ") + type) + "\n")
-
-	return result!
-
 String function cmd_permission_modify(user_id : String, model_name : String, permissions : String):
 String function cmd_permission_modify(user_id : String, model_name : String, permissions : String):
 	Integer permission
 	Integer permission
 	String model_id
 	String model_id
 
 
-	model_id = get_model_id(model_name)
+	model_id = get_entry_id(model_name)
 	if (model_id != ""):
 	if (model_id != ""):
 		if (get_relation_to_model(user_id, model_id) == 0):
 		if (get_relation_to_model(user_id, model_id) == 0):
 			Boolean fail
 			Boolean fail
@@ -1492,7 +1513,7 @@ String function cmd_permission_owner(user_id : String, model_name : String, new_
 	String model_id
 	String model_id
 	String new_user_id
 	String new_user_id
 
 
-	model_id = get_model_id(model_name)
+	model_id = get_entry_id(model_name)
 	if (model_id != ""):
 	if (model_id != ""):
 		if (bool_or(get_relation_to_model(user_id, model_id) == 0, is_admin(user_id))):
 		if (bool_or(get_relation_to_model(user_id, model_id) == 0, is_admin(user_id))):
 			new_user_id = get_user_id(new_user_name)
 			new_user_id = get_user_id(new_user_name)
@@ -1511,7 +1532,7 @@ String function cmd_permission_group(user_id : String, model_name : String, new_
 	String model_id
 	String model_id
 	String group_id
 	String group_id
 
 
-	model_id = get_model_id(model_name)
+	model_id = get_entry_id(model_name)
 	if (model_id != ""):
 	if (model_id != ""):
 		if (bool_or(get_relation_to_model(user_id, model_id) == 0, is_admin(user_id))):
 		if (bool_or(get_relation_to_model(user_id, model_id) == 0, is_admin(user_id))):
 			group_id = get_group_id(new_group_name)
 			group_id = get_group_id(new_group_name)
@@ -1744,7 +1765,7 @@ String function cmd_user_password(user_id : String, user_name : String, new_pass
 
 
 String function cmd_transformation_signature(user_id : String, transformation_name : String):
 String function cmd_transformation_signature(user_id : String, transformation_name : String):
 	String model_id
 	String model_id
-	model_id = get_model_id(transformation_name)
+	model_id = get_entry_id(transformation_name)
 
 
 	if (model_id != ""):
 	if (model_id != ""):
 		if (is_nominal_instance(core, model_id, "Transformation")):
 		if (is_nominal_instance(core, model_id, "Transformation")):
@@ -1758,26 +1779,26 @@ String function cmd_transformation_signature(user_id : String, transformation_na
 				inputs = allOutgoingAssociationInstances(core, model_id, "transformInput")
 				inputs = allOutgoingAssociationInstances(core, model_id, "transformInput")
 				while (set_len(inputs) > 0):
 				while (set_len(inputs) > 0):
 					elem = set_pop(inputs)
 					elem = set_pop(inputs)
-					result = string_join(string_join(string_join(string_join("I ", read_attribute(core, elem, "name")), " "), read_attribute(core, readAssociationDestination(core, elem), "name")), "\n")
+					result = string_join(string_join(string_join(string_join("I ", read_attribute(core, elem, "name")), " "), full_name(readAssociationDestination(core, elem))), "\n")
 
 
 				outputs = allOutgoingAssociationInstances(core, model_id, "transformOutput")
 				outputs = allOutgoingAssociationInstances(core, model_id, "transformOutput")
 				while (set_len(outputs) > 0):
 				while (set_len(outputs) > 0):
 					elem = set_pop(outputs)
 					elem = set_pop(outputs)
-					result = string_join(string_join(string_join(string_join("O ", read_attribute(core, elem, "name")), " "), read_attribute(core, readAssociationDestination(core, elem), "name")), "\n")
+					result = string_join(string_join(string_join(string_join("O ", read_attribute(core, elem, "name")), " "), full_name(readAssociationDestination(core, elem))), "\n")
 
 
 				return result!
 				return result!
 			else:
 			else:
-				return "Permission denied to transformation: " + transformation_name!
+				return "Permission denied to operation: " + transformation_name!
 		else:
 		else:
-			return "Model is not a transformation: " + transformation_name!
+			return "Model is not an operation: " + transformation_name!
 	else:
 	else:
-		return "No such transformation: " + transformation_name!
+		return "No such operation: " + transformation_name!
 	
 	
 String function cmd_element_list_nice(user_id : String, model_name : String, metamodel_name : String):
 String function cmd_element_list_nice(user_id : String, model_name : String, metamodel_name : String):
-	if (get_model_id(model_name) != ""):
-		if (allow_read(user_id, get_model_id(model_name))):
+	if (get_entry_id(model_name) != ""):
+		if (allow_read(user_id, get_entry_id(model_name))):
 			Element mm
 			Element mm
-			mm = get_full_model(get_model_id(model_name), get_model_id(metamodel_name))
+			mm = get_full_model(get_entry_id(model_name), get_entry_id(metamodel_name))
 			if (element_eq(mm, read_root())):
 			if (element_eq(mm, read_root())):
 				return "No conformance relation between these models"!
 				return "No conformance relation between these models"!
 			return "Success: " + JSON_print(mm)!
 			return "Success: " + JSON_print(mm)!
@@ -1793,6 +1814,19 @@ Void function user_function_skip_init(user_id : String):
 	caches = dict_create()
 	caches = dict_create()
 	dict_add_fast(caches, "models", dict_create())
 	dict_add_fast(caches, "models", dict_create())
 	dict_add_fast(caches, "users", dict_create())
 	dict_add_fast(caches, "users", dict_create())
+	dict_add_fast(caches, "full_name", dict_create())
+
+	// Find root element
+	Element elems
+	String elem
+	elems = allInstances(core, "Folder")
+	while (set_len(elems) > 0):
+		elem = set_pop(elems)
+		if (value_eq(read_attribute(core, elem, "name"), "")):
+			if (set_len(allIncomingAssociationInstances(core, elem, "contains")) == 0):
+				dict_add_fast(caches["models"], "", dict_create())
+				dict_add_fast(caches["models"][""], "", elem)
+				break!
 
 
 	output("Welcome to the Model Management Interface v2.0!")
 	output("Welcome to the Model Management Interface v2.0!")
 	output("Use the 'help' command for a list of possible commands")
 	output("Use the 'help' command for a list of possible commands")
@@ -1822,19 +1856,15 @@ Void function user_function_skip_init(user_id : String):
 		elif (cmd == "model_delete"):
 		elif (cmd == "model_delete"):
 			output(cmd_model_delete(user_id, single_input("Model name?")))
 			output(cmd_model_delete(user_id, single_input("Model name?")))
 		elif (cmd == "model_list"):
 		elif (cmd == "model_list"):
-			output(cmd_model_list())
+			output(cmd_model_list(single_input("Location?")))
 		elif (cmd == "model_list_full"):
 		elif (cmd == "model_list_full"):
-			output(cmd_model_list_full())
+			output(cmd_model_list_full(single_input("Location?")))
 		elif (cmd == "transformation_add_MANUAL"):
 		elif (cmd == "transformation_add_MANUAL"):
 			output(cmd_transformation_add_MANUAL(user_id, dict_input("Source model names?"), dict_input("Target model names?"), single_input("Operation name?")))
 			output(cmd_transformation_add_MANUAL(user_id, dict_input("Source model names?"), dict_input("Target model names?"), single_input("Operation name?")))
 		elif (cmd == "transformation_add_AL"):
 		elif (cmd == "transformation_add_AL"):
 			output(cmd_transformation_add_AL(user_id, dict_input("Source model names?"), dict_input("Target model names?"), single_input("Operation name?")))
 			output(cmd_transformation_add_AL(user_id, dict_input("Source model names?"), dict_input("Target model names?"), single_input("Operation name?")))
 		elif (cmd == "transformation_add_MT"):
 		elif (cmd == "transformation_add_MT"):
 			output(cmd_transformation_add_MT(user_id, dict_input("Source model names?"), dict_input("Target models?"), single_input("Operation name?")))
 			output(cmd_transformation_add_MT(user_id, dict_input("Source model names?"), dict_input("Target models?"), single_input("Operation name?")))
-		elif (cmd == "transformation_list"):
-			output(cmd_transformation_list())
-		elif (cmd == "transformation_list_full"):
-			output(cmd_transformation_list_full())
 		elif (cmd == "permission_modify"):
 		elif (cmd == "permission_modify"):
 			output(cmd_permission_modify(user_id, single_input("Model name?"), single_input("Permissions?")))
 			output(cmd_permission_modify(user_id, single_input("Model name?"), single_input("Permissions?")))
 		elif (cmd == "permission_owner"):
 		elif (cmd == "permission_owner"):

+ 0 - 1
integration/test_powerwindow.py

@@ -110,7 +110,6 @@ class TestPowerWindow(unittest.TestCase):
 
 
         def get_function(filename):
         def get_function(filename):
             def func():
             def func():
-                print("Uploading " + filename)
                 global called
                 global called
                 if called > len(callbacks):
                 if called > len(callbacks):
                     raise Exception("Seemingly called some operation twice!")
                     raise Exception("Seemingly called some operation twice!")

+ 1 - 1
interface/HUTN/hutn_compiler/model_bootstrap_visitor.py

@@ -139,7 +139,7 @@ class ModelBootstrapVisitor(Visitor):
                 contains_link = ""
                 contains_link = ""
             entry = self.visit(tree.get_children("model_element")[0])
             entry = self.visit(tree.get_children("model_element")[0])
             #self.constructors.extend(["instantiate_link", self.current_model, contains_link, "__%s" % self.free_id, self.current_element[-1], entry])
             #self.constructors.extend(["instantiate_link", self.current_model, contains_link, "__%s" % self.free_id, self.current_element[-1], entry])
-            self.code += '\tinstantiate_link(%s, %s, "__%s", %s, %s)\n' % (self.current_model, contains_link, self.free_id, self.current_element[-1], entry)
+            self.code += '\tinstantiate_link(%s, "%s", "__%s", "%s", "%s")\n' % (self.current_model, contains_link, self.free_id, self.current_element[-1], entry)
             self.names.add("__%s" % self.free_id)
             self.names.add("__%s" % self.free_id)
             self.free_id += 1
             self.free_id += 1