12345678910111213141516171819202122232425262728 |
- import models/SimpleClassDiagrams as SCD
- include "primitives.alh"
- SCD PetriNets{
- Class Natural {
- $
- if (bool_not(is_physical_int(self))):
- return "Natural has no integer value"
- elif (integer_lt(self, 0)):
- return "Natural does not have a positive or zero value"
- else:
- return "OK"
- $
- }
- Class Place{
- tokens : Natural
- }
- Class Transition{}
- Association P2T (Place, Transition) {
- weight : Natural
- }
- Association T2P (Transition, Place) {
- weight : Natural
- }
- }
- export PetriNets to models/PetriNets
|