Commit 125c950a authored by Martti Käärik's avatar Martti Käärik
Browse files

Fixed constraints.

parent 525589b4
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -572,9 +572,9 @@ context TestConfiguration
  -- At most one connection between any two 'GateInstance'/'ComponentInstance' pairs
  inv UniqueConnections ('Given the set of \'Connection\'s contained in a \'TestConfiguration\'. There shall be no two \'Connection\'s containing \'GateReference\'s that in turn refer to identical pairs of \'GateInstance\'/\'ComponentInstance\'.' + self.toString()):
        self.connection->forAll(c1 | self.connection->one(c2 |
              not c1.endPoint->reject(ep1 | c2.endPoint->any(ep2 |
              not c1.endPoint->reject(ep1 | not c2.endPoint->exists(ep2 |
                  ep1.component = ep2.component and ep1.gate = ep2.gate
              ) = null)->isEmpty()
              ))->isEmpty()
      ))
  

@@ -594,7 +594,8 @@ context Block

  -- Guard for each participating tester in locally ordered test descriptions
  inv GuardsForParticipatingComponents ('If the \'Block\' is contained in a locally ordered \'TestDescription\' then a guard shall be specified for every participating \'ComponentInstance\' in the associated \'TestConfiguration\' that has the role \'Tester\' or there shall be no guards at all. ' + self.toString()):
        self.getParticipatingComponents()->reject(c | c.role = ComponentInstanceRole::SUT)
        self.guard->size() = 0
          or self.getParticipatingComponents()->reject(c | c.role = ComponentInstanceRole::SUT)
              ->forAll(c | self.guard->exists(ex | ex.componentInstance = c))
          or not self.getParentTestDescription().isLocallyOrdered
  
+4 −3
Original line number Diff line number Diff line
@@ -572,9 +572,9 @@ context TestConfiguration
  -- At most one connection between any two 'GateInstance'/'ComponentInstance' pairs
  inv UniqueConnections ('Given the set of \'Connection\'s contained in a \'TestConfiguration\'. There shall be no two \'Connection\'s containing \'GateReference\'s that in turn refer to identical pairs of \'GateInstance\'/\'ComponentInstance\'.' + self.toString()):
        self.connection->forAll(c1 | self.connection->one(c2 |
              not c1.endPoint->reject(ep1 | c2.endPoint->any(ep2 |
              not c1.endPoint->reject(ep1 | not c2.endPoint->exists(ep2 |
                  ep1.component = ep2.component and ep1.gate = ep2.gate
              ) = null)->isEmpty()
              ))->isEmpty()
      ))
  

@@ -594,7 +594,8 @@ context Block

  -- Guard for each participating tester in locally ordered test descriptions
  inv GuardsForParticipatingComponents ('If the \'Block\' is contained in a locally ordered \'TestDescription\' then a guard shall be specified for every participating \'ComponentInstance\' in the associated \'TestConfiguration\' that has the role \'Tester\' or there shall be no guards at all. ' + self.toString()):
        self.getParticipatingComponents()->reject(c | c.role = ComponentInstanceRole::SUT)
        self.guard->size() = 0
          or self.getParticipatingComponents()->reject(c | c.role = ComponentInstanceRole::SUT)
              ->forAll(c | self.guard->exists(ex | ex.componentInstance = c))
          or not self.getParentTestDescription().isLocallyOrdered