Commit ff0e427b authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+ fixes for constraints, #154 and #150

parent 1f55e63d
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -296,7 +296,7 @@ context DataUse
context ParameterBinding
  -- Matching data type
  inv ParameterBindingTypes ('The provided \'DataUse\' shall conform to the \'DataType\' of the referenced \'Parameter\'.' + self.toString()):
        self.dataUse.resolveDataType().conformsTo(self.parameter.dataType)
        self.dataUse.resolveDataType().conformsTo(self.resolveParameterType())
        
  -- Members in 'reduction' list of parameter
  inv ReductionMembers ('The \'Member\' referenced by the \'MemberReference\' at index i of a \'reduction\' shall be contained in or inherited by the \'StructuredDataType\' of the \'Member\' referenced by the \'MemberReference\' at index (i - 1) of that \'reduction\' or the \'StructuredDataType\' of the \'parameter\' if the \'MemberReference\' is the first element of the \'reduction\'.' + self.toString()):
@@ -433,7 +433,10 @@ context DataElementUse
        not (self.dataElement.oclIsUndefined() and self.argument->isEmpty() and self.item->isEmpty())
                and (self.dataElement.oclIsKindOf(StructuredDataInstance) 
                      or not (self.resolveDataType().oclIsKindOf(StructuredDataType) 
                          and self.argument->isEmpty()))
                          and self.argument->isEmpty())
                      or (self.resolveDataType().oclIsKindOf(StructuredDataType) 
                      	and self.dataElement.oclIsKindOf(CollectionDataInstance)
                      ))
                and (self.dataElement.oclIsKindOf(CollectionDataInstance) 
                      or not (self.resolveDataType().oclIsKindOf(CollectionDataType) 
                          and self.item->isEmpty()))