WARNING! Gitlab maintenance operation scheduled for Thursday, 18 June between 19:00 and 20:00 (CET). During this time window, short service interruptions (less than 5 minutes) may occur. Thank you in advance for your understanding.
check: self.componentInstance.debugCheck() and self.componentInstance.type.variable->contains(self.variable)
and self.componentInstance.role.name = 'Tester'
message: self.prefix()+"All variables used in a 'DataUse' specification via a 'VariableUse' shall be local to the same 'componentInstance' and the 'componentInstance' shall be in the role 'Tester'."
//Iteration number shall be countable and positive
// The expression assigned to the 'numIteration' property shall evaluate to a countable 'SimpleDataInstance' of an arbitrary user-defined data type, e.g. a positive Integer value.
//Single numIteration in totally ordered test description
message: self.prefix()+"If the 'BoundedLoopBehaviour' is contained in a totally ordered 'TestDescription' then there shall be exactly one numIteration."
check: self.condition.debugCheck() and self.condition.getDataType().name = 'Boolean'
message: self.prefix()+"The 'condition' shall evaluate to predefined 'DataType' 'Boolean'."
}
//Otherwise of type 'Verdict'
@@ -657,7 +664,8 @@ context Assertion {
}
context Interaction {
//TODO:split for message and procedure
context Message {
//Constraints
//Gate references of an interaction shall be different
// constraint DistinctInteractionGates {
@@ -712,8 +720,9 @@ context Interaction {
//Matching data type for 'argument' and 'variable'
constraint InteractionArgumentAndVariableType {
check: self.target.forAll(t |
t.variable.oclIsUndefined()
or t.variable.dataType = self.argument.getDataType())
t.valueAssignment.oclIsUndefined()
or not t.valueAssignment.variable.oclIsUndefined() and t.valueAssignment.variable.dataType = self.argument.getDataType())
//TODO: add parameters?
message: self.prefix()+"The 'DataUse' specification of the 'argument' and the referenced 'Variable' of any 'Target' shall refer to the same 'DataType'."
}
@@ -730,13 +739,13 @@ context Target {
//Constraints
//Variable and target gate of the same component instance
constraint TargetComponent {
check: self.variable.oclIsUndefined()
or self.targetGate.component.type.variable->contains(self.variable)
check: self.valueAssignment.oclIsUndefined()
or self.targetGate.component.type.variable->contains(self.valueAssignment.variable)
message: self.prefix()+"The referenced 'Variable' shall exist in the same 'ComponentType' as the 'GateInstance' that is referred to by the 'GateReference' of the 'targetGate'."
}
//Variable of a tester component only
constraint TargetVariableComponentRole {
check: self.variable.oclIsUndefined()
check: self.valueAssignment.oclIsUndefined()
or self.targetGate.component.role.name = 'Tester'
message: self.prefix()+"If a 'Variable' is specified, the 'ComponentInstance' referenced by 'targetGate' shall be in the role 'Tester'."
message: self.prefix()+"The number of actual parameters in the 'TestDescriptionReference' shall be equal to the number of formal parameters of the referenced 'TestDescription'."
}
//No use of variables in actual parameters
constraint NoVariables {
//TODO: this is utterly broken -> should be argument and treated as parameter binding -> so in the implementation it is still actualParameter...
//TODO: test..
//TODO: need better / faster testing..
// check: self.actualParameter.forAll(p | not p.dataUse.oclIsKindOf(VariableUse))
//and p.argument->forAll(a | not a.dataUse.oclIsKindOf(VariableUse))
// and self.argument->closure(a | a.dataUse.argument)->forAll(a | not a.dataUse.oclIsKindOf(VariableUse))
check: self.actualParameter.forAll(p |
not p.oclIsKindOf(VariableUse)
and p.argument->forAll(a | not a.dataUse.oclIsKindOf(VariableUse))
and p.argument->closure(a | a.dataUse.argument)->forAll(a | not a.dataUse.oclIsKindOf(VariableUse)))
not p.dataUse.oclIsKindOf(VariableUse)
and p.dataUse.argument->forAll(a | not a.dataUse.oclIsKindOf(VariableUse))
and p.dataUse.argument->closure(a | a.dataUse.argument)->forAll(a | not a.dataUse.oclIsKindOf(VariableUse)))
message: self.prefix()+"The 'DataUse' expressions used to describe actual parameters shall not contain variables directly or indirectly."
and ap.getDataType() = self.testDescription.formalParameter->at(self.actualParameter.indexOf(ap)).dataType)
message: self.prefix()+"The actual parameter AP[i] of index i in the ordered list of 'actualParameter's shall match 'DataType' of the 'FormalParameter' FP[i] of index i in the ordered list of formal parameters of the referenced 'TestDescription'."
message: self.prefix()+"For each 'FormalParameter' defined in 'formalParameter' of the referenced 'TestDescription' there shall be a 'ParameterBinding' in 'argument' that refers to that 'FormalParameter' in 'parameter'."
message: self.prefix()+"The actual parameter AP[i] of index i in the ordered set of 'actualParameter's shall match the 'DataType' of the 'FormalParameter' FP[i] of index i in the ordered set of formal parameters of the referenced 'Action'."
//TODO: same problem as test description reference
message: self.prefix()+"For each 'FormalParameter' defined in 'formalParameter of' the referenced 'Action' there shall be a 'ParameterBinding' in 'argument' that refers to that 'FormalParameter' in 'parameter'."