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 Icon { name = "Icon" typeID : String is_primitive : Boolean } Class Image { name = "Image" data : String } Class Primitive { name = "Primitive" } Class Rectangle : Primitive { name = "Rectangle" x : Integer y : Integer width : Integer height : Integer } Class Ellipse : Primitive { name = "Ellipse" x : Integer y : Integer width : Integer height : Integer } Class Line : Primitive { name = "Line" start_x : Integer start_y : Integer end_x : Integer end_y : Integer }