|
@@ -408,6 +408,10 @@ include "primitives.alh"
|
|
|
include "object_operations.alh"
|
|
|
|
|
|
Element function constraint(model : Element, name : String):
|
|
|
+\treturn "OK"
|
|
|
+ """
|
|
|
+
|
|
|
+ """
|
|
|
\tElement associations
|
|
|
\tElement back_associations
|
|
|
\tElement association
|
|
@@ -424,9 +428,10 @@ Element function constraint(model : Element, name : String):
|
|
|
\t\t\tdestination = reverseKeyLookup(model["model"], read_edge_dst(association))
|
|
|
\t\t\tif (destination != name):
|
|
|
\t\t\t\treturn "Left link does not have a right link back to the same node"
|
|
|
- """
|
|
|
+ """
|
|
|
|
|
|
constructors = get_constructor(constraint_code)
|
|
|
+ print(constructors)
|
|
|
|
|
|
self.assertTrue(run_file(all_files,
|
|
|
['"new"', '"SimpleClassDiagrams"', '"RPGame"',
|
|
@@ -469,8 +474,9 @@ Element function constraint(model : Element, name : String):
|
|
|
'"attr_add"', '"tile_top"', '"target_upper_cardinality"', '1',
|
|
|
'"attr_add"', '"tile_bottom"', '"source_upper_cardinality"', '1',
|
|
|
'"attr_add"', '"tile_bottom"', '"target_upper_cardinality"', '1',
|
|
|
+ '"constrain"', '"Tile"',
|
|
|
] + constructors + [
|
|
|
'"verify"',
|
|
|
],
|
|
|
- init + new + loaded + (instantiate_node + prompt) * 7 + (instantiate_edge + prompt) * 10 + (attr_add + prompt) * 22 + ["OK"] + prompt,
|
|
|
+ init + new + loaded + (instantiate_node + prompt) * 7 + (instantiate_edge + prompt) * 10 + (attr_add + prompt) * 22 + ["Element to constrain (empty for global)?", "Give input to function constructors for LOCAL constraint!", "Added constraint to model!"] + prompt + ["OK"] + prompt,
|
|
|
mode))
|