|
@@ -420,16 +420,51 @@ Element function constraint(model : Element, name : String):
|
|
|
\tassociations = allOutgoingAssociationInstances(model, name, "tile_left")
|
|
|
\twhile (0 < list_len(associations)):
|
|
|
\t\tassociation = set_pop(associations)
|
|
|
-\t\tdestination = reverseKeyLookup(model["model"], read_edge_dst(model["model"][association]))
|
|
|
+\t\tdestination = readAssociationDestination(model, association)
|
|
|
\t\tback_associations = allOutgoingAssociationInstances(model, destination, "tile_right")
|
|
|
\t\tif (list_len(back_associations) < 1):
|
|
|
-\t\t\treturn "Left link does not have a right link back at "
|
|
|
+\t\t\treturn "Left link does not have a right link back"
|
|
|
\t\telse:
|
|
|
\t\t\tassociation = set_pop(back_associations)
|
|
|
-\t\t\tdestination = reverseKeyLookup(model["model"], read_edge_dst(model["model"][association]))
|
|
|
+\t\t\tdestination = readAssociationDestination(model, association)
|
|
|
\t\t\tif (destination != name):
|
|
|
-\t\t\t\treturn "Left link does not have a right link back to the same node at "
|
|
|
-\tlog("All OK for " + name)
|
|
|
+\t\t\t\treturn "Right link does not have a left link back to the same tile"
|
|
|
+\tassociations = allOutgoingAssociationInstances(model, name, "tile_right")
|
|
|
+\twhile (0 < list_len(associations)):
|
|
|
+\t\tassociation = set_pop(associations)
|
|
|
+\t\tdestination = readAssociationDestination(model, association)
|
|
|
+\t\tback_associations = allOutgoingAssociationInstances(model, destination, "tile_left")
|
|
|
+\t\tif (list_len(back_associations) < 1):
|
|
|
+\t\t\treturn "Right link does not have a left link back"
|
|
|
+\t\telse:
|
|
|
+\t\t\tassociation = set_pop(back_associations)
|
|
|
+\t\t\tdestination = readAssociationDestination(model, association)
|
|
|
+\t\t\tif (destination != name):
|
|
|
+\t\t\t\treturn "Right link does not have a left link back to the same tile"
|
|
|
+\tassociations = allOutgoingAssociationInstances(model, name, "tile_top")
|
|
|
+\twhile (0 < list_len(associations)):
|
|
|
+\t\tassociation = set_pop(associations)
|
|
|
+\t\tdestination = readAssociationDestination(model, association)
|
|
|
+\t\tback_associations = allOutgoingAssociationInstances(model, destination, "tile_bottom")
|
|
|
+\t\tif (list_len(back_associations) < 1):
|
|
|
+\t\t\treturn "Top link does not have a bottom link back"
|
|
|
+\t\telse:
|
|
|
+\t\t\tassociation = set_pop(back_associations)
|
|
|
+\t\t\tdestination = readAssociationDestination(model, association)
|
|
|
+\t\t\tif (destination != name):
|
|
|
+\t\t\t\treturn "Top link does not have a bottom link back to the same tile"
|
|
|
+\tassociations = allOutgoingAssociationInstances(model, name, "tile_bottom")
|
|
|
+\twhile (0 < list_len(associations)):
|
|
|
+\t\tassociation = set_pop(associations)
|
|
|
+\t\tdestination = readAssociationDestination(model, association)
|
|
|
+\t\tback_associations = allOutgoingAssociationInstances(model, destination, "tile_top")
|
|
|
+\t\tif (list_len(back_associations) < 1):
|
|
|
+\t\t\treturn "Bottom link does not have a top link back"
|
|
|
+\t\telse:
|
|
|
+\t\t\tassociation = set_pop(back_associations)
|
|
|
+\t\t\tdestination = readAssociationDestination(model, association)
|
|
|
+\t\t\tif (destination != name):
|
|
|
+\t\t\t\treturn "Bottom link does not have a top link back to the same tile"
|
|
|
\treturn "OK"
|
|
|
"""
|
|
|
|