Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Is Papyrus Kepler supports OCL constraints(Is Papyrus Kepler supports OCL constraints?)
Is Papyrus Kepler supports OCL constraints [message #1016211] Tue, 05 March 2013 09:00 Go to next message
sabrina ing is currently offline sabrina ing
Messages: 39
Registered: February 2013
Member
Hi,

I'm modeling a real time operating system (RTOS) using Papyrus and using the Profile in Software Resource Modeling (SRM) of Standard MARTE.
Now my requirement is how can I add/associate OCL constraints to it?
My goal is to validate if a model that applies my RTOSModel is correct or not.

I'm using the following version of Eclipse:
Eclipse Kepler 4.3.0M5a
Build id: I20130204-1400
Papyrus Kepler version 0.10.0

Thanks in advance,

Best Regards,
Re: Is Papyrus Kepler supports OCL constraints [message #1016279 is a reply to message #1016211] Tue, 05 March 2013 14:21 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 3841
Registered: July 2009
Senior Member
Hi

It should all be there, but you might want to load a more recent OCL
I-build.

However you need to be quite an expert on the UML meta-model to
correctly install Operation or State constraints.

Even for invariants, you must specify the context in the Properties
View; the constrained elements in the diagram are just a visual comment
that may or may not be correct; they're certainly irrelevant.

Regards

Ed Willink

On 05/03/2013 14:00, Mariem Makni wrote:
> Hi,
>
> I'm modeling a real time operating system (RTOS) using Papyrus and
> using the Profile in Software Resource Modeling (SRM) of Standard MARTE.
> Now my requirement is how can I add/associate OCL constraints to it?
> My goal is to validate if a model that applies my RTOSModel is correct
> or not.
>
> I'm using the following version of Eclipse:
> Eclipse Kepler 4.3.0M5a
> Build id: I20130204-1400
> Papyrus Kepler version 0.10.0
>
> Thanks in advance,
>
> Best Regards,
Re: Is Papyrus Kepler supports OCL constraints [message #1016290 is a reply to message #1016279] Tue, 05 March 2013 15:51 Go to previous messageGo to next message
sabrina ing is currently offline sabrina ing
Messages: 39
Registered: February 2013
Member
Hi,

Thanks for your answer.
But I don't found the label of constraints in the properties view, I don't know how to load a more recent OCL I-build.
Can you help me please.
If you have some links, I would appreciate.

Thanks,

[Updated on: Tue, 05 March 2013 17:34]

Report message to a moderator

Re: Is Papyrus Kepler supports OCL constraints [message #1016355 is a reply to message #1016290] Wed, 06 March 2013 02:46 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 3841
Registered: July 2009
Senior Member
Hi

The latest OCL I-build downloads are available from
http://www.eclipse.org/modeling/mdt/downloads/?project=ocl or updated
from http://download.eclipse.org/modeling/mdt/ocl/updates/interim.

There is no Constraints label in the Properties View. You need to use
the relevant features.

Regards

Ed Willink


On 05/03/2013 20:51, Mariem Makni wrote:
> Hi,
>
> Thanks for your answer.
> But I don't found the label of constraints in the properties view, I
> don't know how to load a more recent OCL I-build.
> Can you help me please.
> If you have some links, I would appreciate.
>
> Thanks,
Re: Is Papyrus Kepler supports OCL constraints [message #1016389 is a reply to message #1016355] Wed, 06 March 2013 05:23 Go to previous messageGo to next message
sabrina ing is currently offline sabrina ing
Messages: 39
Registered: February 2013
Member
Hi,

Thanks for your answer.

But when I used the updated link:http://download.eclipse.org/modeling/mdt/ocl/updates/interim, I get an error message,as show below:
'Installing Software' has encountered a problem.An error occured while collecting items to be installed.

Can you help me please.

Thanks,

Re: Is Papyrus Kepler supports OCL constraints [message #1016566 is a reply to message #1016389] Wed, 06 March 2013 17:51 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 3841
Registered: July 2009
Senior Member
HI

Please provide the full error message.

Regards

Ed Willink

On 06/03/2013 10:23, Mariem Makni wrote:
> Hi,
>
> Thanks for your answer.
>
> But when I used the updated
> link:http://download.eclipse.org/modeling/mdt/ocl/updates/interim, I
> get an error message,as show below:
> 'Installing Software' has encountered a problem.An error occured while
> collecting items to be installed.
>
> Can you help me please.
>
> Thanks,
>
>
Re: Is Papyrus Kepler supports OCL constraints [message #1016727 is a reply to message #1016566] Thu, 07 March 2013 08:52 Go to previous messageGo to next message
sabrina ing is currently offline sabrina ing
Messages: 39
Registered: February 2013
Member
Hi,

Tanks a lot for your reply.
I have tried again using this link and it works Smile
Now, I have an example of an OCL Constraint which I want to add it to my Element Task in my RTOSModel, to validate if a model that applies my RTOSModel is correct or not, but I don't know how to add it using papyrus kepler:

context Task
inv:
if(Self.minPriorityLevel< Self.maxPriorityLevel) then
Self.minPriorityLevel < Self.PriorityValue < Self.maxPriorityLevel
else
Self.maxPriorityLevel< Self.PriorityValue < Self.minPriorityLevel
endif


Can you help me please.
Thanks,
Re: Is Papyrus Kepler supports OCL constraints [message #1017055 is a reply to message #1016727] Fri, 08 March 2013 14:04 Go to previous message
Ed Willink is currently offline Ed Willink
Messages: 3841
Registered: July 2009
Senior Member
Hi

Please use a new subject for a new topic.

Add A Constraint to the diagram.

(Quit the editor that auto-starts - Bugzilla raised).

Set the context to Task in the Properties View.

Edit the constraint to contain:
if(self.minPriorityLevel< self.maxPriorityLevel) then
Self.minPriorityLevel < Self.PriorityValue < Self.maxPriorityLevel
else
Self.maxPriorityLevel< Self.PriorityValue < Self.minPriorityLevel
endif

using the editor to help you fix the various errors.

Optionally draw a constraint link between constraint and Task.

Regards

Ed Willink



On 07/03/2013 13:52, Mariem Makni wrote:
> Hi,
>
> Tanks a lot for your reply.
> I have tried again using this link and it works :)
> Now, I have an example of an OCL Constraint which I want to add it to
> my Element Task in my RTOSModel, to validate if a model that applies
> my RTOSModel is correct or not, but I don't know how to add it using
> papyrus kepler:
>
> context Task
> inv:
> if(Self.minPriorityLevel< Self.maxPriorityLevel) then
> Self.minPriorityLevel < Self.PriorityValue < Self.maxPriorityLevel
> else
> Self.maxPriorityLevel< Self.PriorityValue < Self.minPriorityLevel
> endif
>
> Can you help me please.
> Thanks,
Previous Topic:Update site installation errors
Next Topic:Modifying statemachine diagram
Goto Forum:
  


Current Time: Thu Apr 17 05:40:36 EDT 2014

Powered by FUDForum. Page generated in 0.01937 seconds