include "primitives.alh" SimpleAttribute Natural{ constraint = $ String function constraint(model : Element, name : String): if (is_physical_int(model["model"][name])): return "OK"! else: return "Natural has non-integer value"! $ } SimpleAttribute String{ constraint = $ String function constraint(model : Element, name : String): if (is_physical_string(model["model"][name])): return "OK"! else: return "String has non-string value"! $ } SimpleAttribute Boolean {} Class Named { name : String } Class Place : Named { tokens : Natural } Class Transition : Named {} Class Port : Named {} Association P2T (Place, Transition) {} Association T2P (Transition, Place) {} Association PortPlace (Port, Place) {} Association Related (Port, Port) {}