include "primitives.alh" SimpleAttribute String { constraint = $ String function constraint(value : Element): if (is_physical_string(value)): return "OK"! else: return "String has a non-string value"! $ } SimpleAttribute Integer { constraint = $ String function constraint(value : Element): if (is_physical_int(value)): return "OK"! else: return "Integer has a non-integer value"! $ } SimpleAttribute Boolean { constraint = $ String function constraint(value : Element): if (is_physical_boolean(value)): return "OK"! else: return "Boolean has a non-boolean value"! $ } Class Model { name = "Model" descr : String is_example : Boolean } Class Node { name = "Node" typeID : String } Association Edge(Node, Node) { name = "Edge" directed : Boolean } Class Attribute { name = "Attribute" key : String value : String } Association NodeAttribute(Node, Attribute) { name = "NodeAttribute" }