OCL 2.1 RTF Avatar
  1. OMG Issue

OCL21 — sub evaluations (in sequence bodyEvals) have different environment.

  • Key: OCL21-226
  • Legacy Issue Number: 7513
  • Status: closed  
  • Source: OpenModeling ( Jos Warmer)
  • Summary:

    5. – [3] All sub evaluations (in the sequence bodyEvals) have a different
    – environment. The environment is the same environment as the one from the
    – previous bodyEval, where the iterator variable or variables are bound to the
    – subsequent elements of the source.
    context LoopExpEval
    inv:
    let SS: Integer = source.value->size()
    in if iterators->size() = 1 then
    Sequence

    {2..SS}

    ->forAll( i: Integer |
    bodyEvals->at.environment = bodyEvals->at(i-1).environment
    >replace( NameValueBinding( iterators>at(1).varName,
    source.value->asSequence()->at )))
    else – iterators->size() = 2
    Sequence

    {2..SS*SS}

    ->forAll( i: Integer |
    bodyEvals->at.environment = bodyEvals->at(i-1).environment
    >replace( NameValueBinding( iterators>at(1).varName,
    source->asSequence()->at(i.div(SS) + 1) ))
    >replace( NameValueBinding( iterators>at(2).varName,
    source.value->asSequence()->at(i.mod(SS)) )) ) endif
    ==> two closing brackets before ’endif’ should be removed

  • Reported: OCL 2.0b2 — Thu, 10 Jun 2004 04:00 GMT
  • Disposition: Resolved — OCL 2.1
  • Disposition Summary:

    yes

  • Updated: Fri, 6 Mar 2015 20:58 GMT