Re: asking about OCL



Re: asking about OCL

From: Steffen Zschaler <sz9_at_inf.tu-dresden.de>
Date: Tue, 16 May 2006 11:48:24 +0200
Message-ID: <44699FE8.9070805@inf.tu-dresden.de>
Hi,

Achim D. Brucker wrote:
<snip />
> And by the way, the Dresden OCL Parser also uses this as concrete syntax :-). 
>   
Well 'touchť', I guess. This should probably convince me ;-)
> In the old OCL 1.1 standard,  "allInstances()" is declared
> as operation of type OclType. This leads just to another concrete
> syntax:
>    context Person:
>    inv: Person.allInstances->size() >1
>
> The notion "Person::allInstances" emerges often, but I have no idea
> from where it comes, albeit I have often used it myself :-)
>   
Well, I can still remember that we kept using it during development of 
the OCL 2.0 proposal. So, I looked into the standard and found under 
OperationCallExpCS [G] in the concrete syntax the following rule:

    OperationCallExpCS ::= pathNameCS '(' argumentsCS? ')'
      

which tells us that A::allInstances() is valid OCL from the point of 
view of concrete syntax. The transformation to abstract syntax appears a 
little underspecified, though. This is based on ptc/2003-10-14, which 
was what I had lying around at the moment.

Best regards,

Steffen

-- 
Dipl.-Inf. Steffen Zschaler
Research Assistant

Technische Universitšt Dresden
Department of Computer Science

Phone +49 351 463 38555
Fax   +49 351 463 38459
Email Steffen.Zschaler@tu-dresden.de
WWW   http://www.steffen-zschaler.de.vu/
Received on Tue 16 May 2006 - 10:48:25 BST