|
@@ -348,14 +348,12 @@ String function add_AL(model : Element, element : Element):
|
|
|
|
|
|
return reverseKeyLookup(model["model"], element)
|
|
|
|
|
|
-Void function add_constraint(model : Element, element : String):
|
|
|
+Void function add_constraint(model : Element, element : String, constraint : Action):
|
|
|
// Add local constraints to an element
|
|
|
- Action constraint
|
|
|
Element attr_type
|
|
|
String link_name
|
|
|
String constraint_name
|
|
|
|
|
|
- constraint = construct_function()
|
|
|
constraint_name = add_AL(model, constraint)
|
|
|
attr_type = find_attribute_type(model, element, "constraint")
|
|
|
instantiate_link(model, attr_type, "", element, constraint_name)
|
|
@@ -391,6 +389,6 @@ Void function construct_model():
|
|
|
elif (command == "define_inheritance"):
|
|
|
define_inheritance(input(), input())
|
|
|
elif (command == "add_constraint"):
|
|
|
- add_constraint(input(), input())
|
|
|
+ add_constraint(input(), input(), construct_function())
|
|
|
else:
|
|
|
log("Modelling error: did not understand command " + command)
|