OCL 2.5 RTF Avatar
  1. OMG Issue

OCL25 — OCL 2.3 : Introduce Lambda functions

  • Key: OCL25-24
  • Legacy Issue Number: 16018
  • Status: open  
  • Source: Model Driven Solutions ( Ed Willink)
  • Summary:

    OCL already has an implicit form of Lambda function in the intuitive declaration of collect(). This should be formalised and made more versatile. It doesn't seem to be possible to formulate a declaration for collect() without a Lambda Function:

    Sequence(T1)::collect(T2)(iterator : T1 | body : Lambda T1() : T2) : Sequence(T2)

    The mandatory collect body is a parameter-less Lambda function whose context-type is the class template parameter T1 and the return-type is the operation template parameter T2.

    For other iterators the declaration can be just OclExpression since the type is not exploited.

  • Reported: OCL 2.1 — Sat, 12 Feb 2011 05:00 GMT
  • Updated: Thu, 8 Oct 2015 14:11 GMT