Commit 787b5074 authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+ fixes for ProcedureCall constraints, #176

parent 16abcb3f
Loading
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -1009,7 +1009,7 @@ context ProcedureCall

  -- Each call has a reply
  inv ProcedureCallHasReply ('For every \'ProcedureCall\' with empty \'replyTo\' there shall be one or more \'ProcedureCall\'s that have this \'ProcedureCall\' as \'replyTo\'. ' + self.toString()):
        ProcedureCall.allInstances()->exists(pc | pc.replyTo = self)
        self.replyTo.oclIsUndefined() implies ProcedureCall.allInstances()->exists(pc | pc.replyTo = self)
  

  -- Call and reply within the same 'TestDescription'
@@ -1041,8 +1041,11 @@ context ProcedureCall
                  and (not b.oclAsType(TestDescriptionReference).componentInstanceBinding->isEmpty()
                      and not b.oclAsType(TestDescriptionReference).componentInstanceBinding
                          .actualComponent->includes(self))),
          following = affectingBehaviours ->at(affectingBehaviours->indexOf(self))
          in (following.oclIsKindOf(ProcedureCall) and following.oclAsType(ProcedureCall).replyTo = self)
          selfIndex = affectingBehaviours->indexOf(self),
          following = affectingBehaviours ->reject(b | affectingBehaviours->indexOf(b) <= selfIndex)->first()
          in following.oclIsUndefined()
          or not self.replyTo.oclIsUndefined() 
          or (following.oclIsKindOf(ProcedureCall) and following.oclAsType(ProcedureCall).replyTo = self)
          or (following.oclIsKindOf(AlternativeBehaviour)
              and following.oclAsType(AlternativeBehaviour).block->exists(
                  b | b.behaviour->first().oclIsKindOf(ProcedureCall)
+1 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ public class Validator {
		Validator.removeValidator(StructuredObjectivesPackage.eINSTANCE);
		Validator.removeValidator(ExtendedConfigurationsPackage.eINSTANCE);
		validator = null;
		org.eclipse.ocl.pivot.model.OCLstdlib.install(); //needed? move to create?
		Validator.registerValidator("model/tdl-constraints.ocl", tdlPackage.eINSTANCE);
		Validator.registerValidator("model/tdl-structured-constraints.ocl", StructuredObjectivesPackage.eINSTANCE);
		Validator.registerValidator("model/tdl-configurations-constraints.ocl", ExtendedConfigurationsPackage.eINSTANCE);