|
@@ -31,20 +31,18 @@ Element function ramify(model : Element):
|
|
|
instantiate_node(new_model, "SimpleAttribute", "Location")
|
|
|
instantiate_attribute(new_model, "Location", "constraint", constraint_Location)
|
|
|
|
|
|
- instantiate_node(new_model, "ComplexAttribute", "ActionLanguage")
|
|
|
- instantiate_attribute(new_model, "ActionLanguage", "constraint", constraint_ActionLanguage)
|
|
|
- model_define_attribute(new_model, "ActionLanguage", "type", False, "Location")
|
|
|
+ instantiate_node(new_model, "ActionLanguage", "ActionCode")
|
|
|
|
|
|
// Add some default elements
|
|
|
// Class LHS_Root {
|
|
|
- // constraint? : ActionLanguage
|
|
|
+ // constraint? : ActionCode
|
|
|
// upper_cardinality = 1
|
|
|
// lower_cardinality = 1
|
|
|
// }
|
|
|
instantiate_node(new_model, "Class", "LHS_Root")
|
|
|
instantiate_attribute(new_model, "LHS_Root", "lower_cardinality", 1)
|
|
|
instantiate_attribute(new_model, "LHS_Root", "upper_cardinality", 1)
|
|
|
- model_define_attribute(new_model, "LHS_Root", "constraint", True, "ActionLanguage")
|
|
|
+ model_define_attribute(new_model, "LHS_Root", "constraint", True, "ActionCode")
|
|
|
|
|
|
// Class LHS : LHS_Root {}
|
|
|
instantiate_node(new_model, "Class", "LHS")
|
|
@@ -58,17 +56,17 @@ Element function ramify(model : Element):
|
|
|
|
|
|
// Class PreElement {
|
|
|
// label : String
|
|
|
- // constraint? : ActionLanguage
|
|
|
+ // constraint? : ActionCode
|
|
|
// }
|
|
|
instantiate_node(new_model, "Class", "PreElement")
|
|
|
model_define_attribute(new_model, "PreElement", "label", False, "String")
|
|
|
- model_define_attribute(new_model, "PreElement", "constraint", True, "ActionLanguage")
|
|
|
+ model_define_attribute(new_model, "PreElement", "constraint", True, "ActionCode")
|
|
|
|
|
|
// Association LHS_contains (LHS_Root, PreElement) {}
|
|
|
instantiate_link(new_model, "Association", "LHS_contains", "LHS_Root", "PreElement")
|
|
|
|
|
|
// Class RHS {
|
|
|
- // action? : ActionLanguage
|
|
|
+ // action? : ActionCode
|
|
|
// upper_cardinality = 1
|
|
|
// lower_cardinality = 1
|
|
|
// }
|
|
@@ -76,16 +74,16 @@ Element function ramify(model : Element):
|
|
|
instantiate_attribute(new_model, "RHS", "lower_cardinality", 1)
|
|
|
instantiate_attribute(new_model, "RHS", "upper_cardinality", 1)
|
|
|
instantiate_attribute(new_model, "RHS", "name", "RHS")
|
|
|
- model_define_attribute(new_model, "RHS", "action", True, "ActionLanguage")
|
|
|
+ model_define_attribute(new_model, "RHS", "action", True, "ActionCode")
|
|
|
|
|
|
// Class PostElement {
|
|
|
// label : String
|
|
|
- // action? : ActionLanguage
|
|
|
+ // action? : ActionCode
|
|
|
// }
|
|
|
instantiate_node(new_model, "Class", "PostElement")
|
|
|
model_define_attribute(new_model, "PostElement", "label", False, "String")
|
|
|
- model_define_attribute(new_model, "PostElement", "action", True, "ActionLanguage")
|
|
|
- model_define_attribute(new_model, "PostElement", "__id__", True, "ActionLanguage")
|
|
|
+ model_define_attribute(new_model, "PostElement", "action", True, "ActionCode")
|
|
|
+ model_define_attribute(new_model, "PostElement", "__id__", True, "ActionCode")
|
|
|
|
|
|
// Association RHS_contains (RHS, PostElement) {}
|
|
|
instantiate_link(new_model, "Association", "RHS_contains", "RHS", "PostElement")
|
|
@@ -154,8 +152,8 @@ Element function ramify(model : Element):
|
|
|
if (is_nominal_instance(model, old_source, "Element")):
|
|
|
// If the attribute is one used in the conformance check, we should mask it
|
|
|
// Add the attribute in the new model, altering its name and making it optional
|
|
|
- model_define_attribute(new_model, "Pre_" + old_source, "constraint_" + attr_name, True, "ActionLanguage")
|
|
|
- model_define_attribute(new_model, "Post_" + old_source, "value_" + attr_name, True, "ActionLanguage")
|
|
|
+ model_define_attribute(new_model, "Pre_" + old_source, "constraint_" + attr_name, True, "ActionCode")
|
|
|
+ model_define_attribute(new_model, "Post_" + old_source, "value_" + attr_name, True, "ActionCode")
|
|
|
else:
|
|
|
// Queue for later
|
|
|
list_append(keys, key)
|