123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- SimpleClassDiagrams Environment_PW{
- SimpleAttribute Integer{
- constraint = $
- String function constraint(model : Element, name : String):
- if (is_physical_int(model["model"][name])):
- return "OK"!
- else:
- return "Integer has non-integer value"!
- }
- SimpleAttribute Natural{
- constraint = $
- String function constraint(model : Element, name : String):
- if (is_physical_int(model["model"][name])):
- if (integer_gte(model["model"][name], 0)):
- return "OK"!
- else:
- return "Natural has negative value"!
- 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"!
- $
- }
- Class Named {
- name : String
- }
- Class Positionable {
- x : Integer
- y : Integer
- }
- Class Port : Named, Positionable {}
- Class Boundary : Named, Positionable {}
- Class Activity : Named, Positionable {}
- Class CommunicationSequence : Activity {}
- Class TopActivity : Activity {}
- Class Parallel : TopActivity {}
- Class Sequence : TopActivity {}
- Class Alternative : TopActivity {}
- Class Input : Event {}
- Class Output : Event {
- duration : Natural
- }
- Association Has1 (Boundary, TopActivity) {}
- Association Has2 (Boundary, Event) {}
- Association Has3 (Boundary, Port) {}
- Association HasActivity (TopActivity, Activity) {}
- Association HasEventSequence (CommunicationSequence, Event) {}
- Association NextEvent (Event, Event) {}
- Association PortEvent (Port, Event) {}
- }
|