RE: OCL question



RE: OCL question

From: Jorn Guy Suess <jgsuess_at_itee.uq.edu.au>
Date: Tue, 26 Feb 2008 16:42:11 +1000
Message-ID: <DFA741BE6218FD4B8D9CE78434D60AAED1E226@UQEXMB3.soe.uq.edu.au>
Umberto,

In the case you are eventually interested an executable and hence testable platform, I would advise using the flattened eMof implementation of UML2 that is part of the UML project of eclipse and the example visual OCL parser interface that is also part of MDT. You will need to create a test model that describes your desired situation. Subsequently the parser will be able to support you in creating correct statements providing syntax and type suggestions. Finally, you can test the execution of the statements by running the test.

Jörn Guy Süß

-----Original Message-----
From: puml-list-request@cs.york.ac.uk [mailto:puml-list-request@cs.york.ac.uk] On Behalf Of Nicolás
Sent: Sunday, 24 February 2008 18:40To: puml-list@cs.york.ac.uk
Subject: Re: OCL question

Hi Jörn,

I talk about the collaboration and collaboration use concepts in UML 2.1, and I use OCL 2.0.

Cheers,
Humberto

Jorn Guy Suess wrote:
> Umberto,
> 
> It would help if you provided the portion or version of the underlying metamodel UML (1.x, 2x) and the version of OCL you are using. I believe there is at least one glitch in your statement, but I would wait to say anything until I have that information.
> 
> Kind regards,
> 
> Jörn Guy Süß
> 
> -----Original Message-----
> From: puml-list-request@cs.york.ac.uk [mailto:puml-list-request@cs.york.ac.uk] On Behalf Of Humberto Castejon
> Sent: Saturday, 23 February 2008 12:58 PM
> To: puml-list@cs.york.ac.uk
> Subject: Re: OCL question
> 
> Hi again!
> 
> I attach a diagram that may help to better understand my question.
> 
> Cheers,
> Humberto
> 
> Humberto Castejon wrote:
>> Hi!
>>
>> I have some problems using OCL together with collaborations and 
>> collaboration uses. I would be very grateful if you oculd help me with 
>> the following.
>>
>> Imagine we have a Sale collaboration with two roles: buyer and seller. 
>> Now, by means of a collaboration use, we bind both roles to the same 
>> classifier, namely Person. An instance of Person may then behave either 
>> as a seller or as a buyer in a Sale collaboration. However, we do not 
>> want the same instance of Person to play both the seller and the buyer 
>> roles in the same occurrence of a Sale collaboration (i.e. we do not 
>> want a person to sell to herself).
>>
>> Would the following OCL invariant, specified in the context of the 
>> collaboration use, be correct?
>>
>> Context s:Sale
>> inv s.roleBinding->forAll(b1, b2 | b1.client.allInstances->forall(Person 
>> p1 | b2.client.allInstances->forall(Person p2 | p1 <> p2)))
>>
>> Thanks for you help!
>>
>> Cheers,
>> Humberto
>>
> 
> 
> 
> 
> 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".
Received on Tue 26 Feb 2008 - 06:42:14 GMT