123456789101112131415161718192021222324252627282930313233343536373839404142 |
- include "primitives.alh"
- SimpleClassDiagrams PetriNetsPorts {
- 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 {
- selected? : Boolean
- }
- Association P2T (Place, Transition) {}
- Association T2P (Transition, Place) {}
- Association PortPlace (Port, Place) {}
- Association Related (Port, Port) {}
- }
|