diff --git a/plugins/org.etsi.mts.tdl.model/model/tdl-constraints.ocl b/plugins/org.etsi.mts.tdl.model/model/tdl-constraints.ocl index 246dc6888aa537902ac00f657f5749c19d94e770..440da9392ff33b57bb1c29920b575a50574d78b5 100644 --- a/plugins/org.etsi.mts.tdl.model/model/tdl-constraints.ocl +++ b/plugins/org.etsi.mts.tdl.model/model/tdl-constraints.ocl @@ -401,8 +401,8 @@ context DataElementUse -- 'DataElement' reference or non-empty 'argument' or non-empty 'item' inv DataInstanceOrArgumentsOrItemsInDataElementUse ('If a \'dataElement\' is not specified, or if the \'dataElement\' is resolved to a \'StructuredDataType\' or a \'CollectionDataType\', either a non-empty \'argument\' set or a non-empty \'item\' set shall be specified.' + self.toString()): not (self.dataElement.oclIsUndefined() and self.argument->isEmpty() and self.item->isEmpty()) - and not (self.dataElement.oclIsKindOf(StructuredDataType) and self.argument->isEmpty()) - and not (self.dataElement.oclIsKindOf(CollectionDataType) and self.item->isEmpty()) + and (self.dataElement.oclIsKindOf(StructuredDataInstance) or not (self.resolveDataType().oclIsKindOf(StructuredDataType) and self.argument->isEmpty())) + and (self.dataElement.oclIsKindOf(CollectionDataInstance) or not (self.resolveDataType().oclIsKindOf(CollectionDataType) and self.item->isEmpty())) -- Valid 'DataType' for items @@ -584,7 +584,7 @@ context TestConfiguration context Block -- Guard shall evaluate to Boolean inv GuardType ('The type of \'guard\' shall be \'Boolean\'.' + self.toString()): - self.guard ->forAll(g | g.expression.resolveDataType().name = 'Boolean') + self.guard ->forAll(g | g.expression.resolveDataType().conformsTo('Boolean')) -- No directly contained 'ExceptionalBehaviour's and 'PeriodicBehaviour's. @@ -637,7 +637,7 @@ context LocalExpression context BoundedLoopBehaviour -- No guard constraint inv BoundedGuard ('The \'Block\' of a \'BoundedLoopBehaviour\' shall not have a \'guard\'.' + self.toString()): - self.block->forAll(b | b.guard.oclIsUndefined()) + self.block.guard->isEmpty() -- Iteration number shall be countable and positive @@ -750,7 +750,7 @@ context AlternativeBehaviour context ConditionalBehaviour -- Guard for 'ConditionalBehaviour' with single block inv ConditionalFirstGuard ('If there is only one \'Block\' specified, it shall have a \'guard\'.' + self.toString()): - self.block->size() > 1 or self.block->first().guard->size() > 1 + self.block->size() > 1 or self.block->first().guard->size() > 0 -- Possible else block for 'ConditionalBehaviour' with multiple blocks @@ -1091,7 +1091,8 @@ context TestDescriptionReference -- Compatible test configurations inv CompatibleConfiguration ('The \'TestConfiguration\' of the referenced (invoked) \'TestDescription\' shall be compatible with the \'TestConfiguration\' of the referencing (invoking) \'TestDescription\' under the provided \'ComponentInstanceBinding\'s between the \'ComponentInstance\'s of the \'TestConfiguration\'s of referenced and referencing \'TestDescription\'s. ' + self.toString()): - self.testDescription.testConfiguration.compatibleWith( + self.componentInstanceBinding->isEmpty() + or self.testDescription.testConfiguration.compatibleWith( self.getParentTestDescription().testConfiguration, self.componentInstanceBinding)