projet-mini-genie-logiciel-.../eclipse-workspace/fr.n7.petrinet/petriNet.ocl
Laurent Fainsin ce79718fa6 test: renommage des simplepdl en simplePDL
et renommage des petrinet en petriNet
2021-10-10 14:44:16 +02:00

19 lines
375 B
Plaintext

import 'petriNet.ecore'
package petrinet
context Network
inv validName('Invalid name: ' + self.name):
self.name.matches('[A-Za-z_][A-Za-z0-9_]*')
context Node
inv nameMin2Char: self.name.matches('..+')
inv weirdName: not self.name.matches('([0-9]*|_*)')
context Place
inv negativeQuantity: self.tokens >= 0
context Arc
inv negativeQuantity: self.weight >= 0
endpackage