RE: asking about OCL

RE: asking about OCL

From: Jrn Guy S <>
Date: Tue, 16 May 2006 18:19:58 +1000
Message-ID: <009c01c678c1$89dc8670$>


One small correction:


allInstances can be used without a prefix, because both the instance and the
class are implicit variables in the context.

If the prefix A is used, then it has to be A.allInstances(), rather than
A::allInstances. The double-colon is a namespace separator.


Best regards,


Jrn Guy


 <> The University of Queensland

 <> Jrn Guy S, Research Officer
<> School of ITEE

School of ITEE

Division of 
Systems & Software Engineering
Queensland 4072 AUSTRALIA

yc%5b%5d=9.9&id=71&facilityType=&backURL=> Room 350,
General Purpose South Building (Building 78)

email:  <>
Phone: +61 7 3365 2883
Fax: +61 7 3365 4999



[] On Behalf Of Steffen Zschaler
Sent: Tuesday, 16 May 2006 17:30
Subject: Re: asking about OCL



Two small corrections:

1.	IIRC you cannot simply say allInstances(), but have to say
2.	It should probably be ->size() >= 1, because there was nothing in
Ajaree's mail about a maximum number of instances of A.

Best regards,


Jrn Guy S wrote: 

package AjareesMetamodel
context A 
inv requiredInstanceOfA :
Jrn Guy S
Research Officer
Room 350, General Purpose South Building (building 78) Division of Systems
and Software Engineering School of Information Technology and Electrical
Engineering The University of Queensland Queensland 4072 AUSTRALIA
Phone: +61 7 3365 2883; Fax: +61 7 3365 4999
-----Original Message-----
[] On Behalf Of ajaree naco
Sent: Tuesday, 16 May 2006 16:14
Subject: asking about OCL
Dear All,
I am a student who is interesting in OCL expression.
I have a question about writing an OCL expression in a
metamodel level.
Assuming that in a metamodel, there is a model element
named "A" which is a mandatory element. 
This element must be constructed as a class in a model
How can we write an OCL expression to restrict this
thing ?
Thank you,
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
To remove yourself from this list please mail
with a message containing the word "unsubscribe".
To remove yourself from this list please mail
with a message containing the word "unsubscribe".

Dipl.-Inf. Steffen Zschaler
Research Assistant
Technische Universitt Dresden
Department of Computer Science
Phone +49 351 463 38555
Fax   +49 351 463 38459

image001.gif image002.gif image003.gif
Received on Tue 16 May 2006 - 09:20:10 BST