projet-mini-genie-logiciel-.../fr.n7.simplePDL/nouveau.ocl

27 lines
718 B
Plaintext
Raw Normal View History

2021-10-03 20:23:04 +00:00
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