Element function import_metamodel(): // TODO // For the moment, we make the assumption that it doesn't exist yet. // We create both the Simple Class Diagrams model, retype it, and then make the metamodel as an instance of this // In the future, this should already exist though... // Instatiate as bottom Element scd Element scd_model scd = create_node() scd_model = create_node() dict_add(scd, "model", scd_model) instantiate_bottom_node(scd, "Class") instantiate_bottom_value(scd, "__Type", Type) instantiate_bottom_value(scd, "__String", String) instantiate_bottom_edge(scd, "__Attribute_", dict_read(scd_model, "Class"), dict_read(scd_model, "__Type")) instantiate_bottom_edge(scd, "__AttributeAttrs", dict_read(scd_model, "__Attribute_"), dict_read(scd_model, "__Type")) instantiate_bottom_edge(scd, "__Attribute", dict_read(scd_model, "Class"), dict_read(scd_model, "__Type")) instantiate_bottom_edge(scd, "__Name", dict_read(scd_model, "__Attribute"), dict_read(scd_model, "__String")) instantiate_bottom_edge(scd, "Association", dict_read(scd_model, "Class"), dict_read(scd_model, "Class")) instantiate_bottom_edge(scd, "Inheritance", dict_read(scd_model, "Class"), dict_read(scd_model, "Class")) instantiate_bottom_edge(scd, "__inh_1", dict_read(scd_model, "Association"), dict_read(scd_model, "Class")) instantiate_bottom_edge(scd, "__inh_2", dict_read(scd_model, "__Attribute_"), dict_read(scd_model, "Class")) // Instantiated, now retype to make sure that everything is correct Element mapping mapping = create_node()