1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- include "primitives.alh"
- SimpleAttribute Natural{
- name = "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{
- name = "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 {
- name = "Boolean"
- }
- Class Named {
- name = "Named"
- name : String
- }
- Class Place : Named {
- name = "Place"
- tokens : Natural
- }
- Class Transition : Named {
- name = "Transition"
- }
- Class Port : Named {
- name = "Port"
- }
- Association P2T (Place, Transition) {
- name = "P2T"
- }
- Association T2P (Transition, Place) {
- name = "T2P"
- }
- Association PortPlace (Port, Place) {
- name = "PortPlace"
- }
- Association Related (Port, Port) {
- name = "Related"
- }
|