projet-mini-genie-logiciel-.../fr.n7.simplePDL/nouveau.ocl
2021-10-03 22:23:04 +02:00

27 lines
718 B
Plaintext

import 'SimplePDL.ecore'
package simplepdl
context Process
inv uniqNames: self.processElements
->select(pe | pe.oclIsKindOf(WorkDefinition))
->collect(pe | pe.oclAsType(WorkDefinition))
->forAll(w1, w2 | w1 = w2 or w1.name <> w2.name)
context WorkSequence
inv notReflexive: self.predecessor <> self.successor
context Process
inv nameMin2Char: self.processElements
->select(pe | pe.oclIsKindOf(WorkDefinition))
->collect(pe | pe.oclAsType(WorkDefinition))
->forAll(w | w.name.matches('..+'))
context Process
inv weirdName: self.processElements
->select(pe | pe.oclIsKindOf(WorkDefinition))
->collect(pe | pe.oclAsType(WorkDefinition))
->forAll(w | not w.name.matches('([0-9]*|[a-zA-Z]*|_*)'))
endpackage