1234567891011121314151617181920212223242526272829303132333435363738 |
- 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) {}
|