RE: asking about OCL



RE: asking about OCL

From: Jrn Guy S <jgsuess_at_itee.uq.edu.au>
Date: Tue, 16 May 2006 18:19:58 +1000
Message-ID: <009c01c678c1$89dc8670$4e406682@itee.uq.edu.au>
Hi,

 

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

 


 <http://www.uq.edu.au/> The University of Queensland

 <http://www.itee.uq.edu.au/~jgsuess/> Jrn Guy S, Research Officer
<http://www.itee.uq.edu.au/> School of ITEE

  
School of ITEE


Division of 
Systems & Software Engineering
Queensland 4072 AUSTRALIA

 
<http://www.uq.edu.au/maps/index.html?menu=1&x=j.89&y=9.9&z=1&xc%5b%5d=j.89&
yc%5b%5d=9.9&id=71&facilityType=&backURL=> Room 350,
General Purpose South Building (Building 78)

email:  <mailto:jgsuess@itee.uq.edu.au> jgsuess@itee.uq.edu.au
Phone: +61 7 3365 2883
Fax: +61 7 3365 4999

 

  _____  

From: puml-list-request@cs.york.ac.uk
[mailto:puml-list-request@cs.york.ac.uk] On Behalf Of Steffen Zschaler
Sent: Tuesday, 16 May 2006 17:30
To: puml-list@cs.york.ac.uk; puml-list@cs.york.ac.uk
Subject: Re: asking about OCL

 

Hi,

Two small corrections:

1.	IIRC you cannot simply say allInstances(), but have to say
A::allInstances().
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,

Steffen

Jrn Guy S wrote: 

package AjareesMetamodel
 
context A 
 
inv requiredInstanceOfA :
allInstances()->size()=1
 
endpackage
 
 
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
 
email: jgsuess@itee.uq.edu.au
 
 
-----Original Message-----
From: puml-list-request@cs.york.ac.uk
[mailto:puml-list-request@cs.york.ac.uk] On Behalf Of ajaree naco
Sent: Tuesday, 16 May 2006 16:14
To: puml-list@cs.york.ac.uk
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
level. 
 
How can we write an OCL expression to restrict this
thing ?
 
Thank you,
Ajaree
 
__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
 
 
 
To remove yourself from this list please mail
puml-list-request@cs.york.ac.uk
with a message containing the word "unsubscribe".
 
 
 
 
 
 
To remove yourself from this list please mail
puml-list-request@cs.york.ac.uk
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
Email Steffen.Zschaler@tu-dresden.de
WWW   http://www.steffen-zschaler.de.vu/





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