Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mdt-papyrus.dev] OCL question on a profile

Hi Séb,

 

It seems your example is working fine for me.

I did do the following things:

·         Created a new model test2

·         I opened your profile and defined it once more by saving (initially, it didn’t seem to work and I only had one of the two profiles available…)

·         On the RootElement, I applied both sub-profiles

·         I created a class diagram, a class and an operation

·         I applied NFP

·         I validated à model validation lists the issue

·         I applied ASIL as well

·         I validated à model validation disappears as expected.

 

I also changed Eclipse OCL executor’s preference from LPG to Pivot (the one I typically use).

Unfortunately, I don’t understand all and aspects of this choice, but for this case it doesn’t make any difference afaik.

 

Beware: Papyrus gives an error in the following scenario:

·         Redefine the profile

·         Open a model to which the profile was applied

·         Allow the automatic update (re-application)

·         Then validate

You first need to save the model, close it and reopen it in order to have a valid validation.

 

In attachment the current profile & test2 model.

 

Does this work for you as well?

 

BR,

Johan

 

Van: mdt-papyrus.dev-bounces@xxxxxxxxxxx [mailto:mdt-papyrus.dev-bounces@xxxxxxxxxxx] Namens GERARD Sebastien
Verzonden: vrijdag 19 mei 2017 16:28
Aan: Papyrus Project list <mdt-papyrus.dev@xxxxxxxxxxx>
Onderwerp: Re: [mdt-papyrus.dev] OCL question on a profile

 

My test is on NEON

 

 

 

cid:image001.png@01D1C880.5C951BE0

 

 

Sébastien Gérard

Head of the LISE labs

CEA Research Director

Papyrus project Leader (www.eclipse.org/papyrus)

cid:image002.jpg@01D1C880.5C951BE0

Commissariat à l’énergie atomique et aux énergies alternatives

Institut List | CEA Saclay Nano-INNOV | Bât. 862- PC174

F-91191 Gif-sur-Yvette Cedex

M. +33 6 88 20 00 47

T. +33 1 69 08 58 24

sebastien.gerard@xxxxxx  www-list.cea.fr

 

 

 

icone_youtube

  cid:image004.png@01D1C880.5C951BE0  cid:image005.jpg@01D1C880.5C951BE0   

 

 

De : mdt-papyrus.dev-bounces@xxxxxxxxxxx [mailto:mdt-papyrus.dev-bounces@xxxxxxxxxxx] De la part de GERARD Sebastien
Envoyé : vendredi 19 mai 2017 16:23
À : Papyrus Project list <mdt-papyrus.dev@xxxxxxxxxxx>
Objet : [PROVENANCE INTERNET] Re: [mdt-papyrus.dev] OCL question on a profile

 

Not yet running…

Here is my example model. There is an additional complexity coming from the fact my profile consists of two subprofiles…

And when I define  the profile, I try to use the option to save the OCL constraint in the profile as shown below:

 

 

 

 

cid:image001.png@01D1C880.5C951BE0

 

 

Sébastien Gérard

Head of the LISE labs

CEA Research Director

Papyrus project Leader (www.eclipse.org/papyrus)

cid:image002.jpg@01D1C880.5C951BE0

Commissariat à l’énergie atomique et aux énergies alternatives

Institut List | CEA Saclay Nano-INNOV | Bât. 862- PC174

F-91191 Gif-sur-Yvette Cedex

M. +33 6 88 20 00 47

T. +33 1 69 08 58 24

sebastien.gerard@xxxxxx  www-list.cea.fr

 

 

 

icone_youtube

  cid:image004.png@01D1C880.5C951BE0  cid:image005.jpg@01D1C880.5C951BE0   

 

 

De : mdt-papyrus.dev-bounces@xxxxxxxxxxx [mailto:mdt-papyrus.dev-bounces@xxxxxxxxxxx] De la part de Ed Willink
Envoyé : vendredi 19 mai 2017 15:48
À : mdt-papyrus.dev@xxxxxxxxxxx
Objet : Re: [mdt-papyrus.dev] OCL question on a profile

 

Hi Sebastien

This is the magic/horror of profiles. You define it in one place and it works somewhere else. What is defined in a Stereotype is kind of added to the stereotyped Element.

    Regards

        Ed

 

On 19/05/2017 14:34, GERARD Sebastien wrote:

It could work if I define this constraint a model. In my case, the constraint is defined in the profile defining the aforementioned stereotype.

 

 

 

cid:image001.png@01D1C880.5C951BE0

 

 

Sébastien Gérard

Head of the LISE labs

CEA Research Director

Papyrus project Leader (www.eclipse.org/papyrus)

cid:image002.jpg@01D1C880.5C951BE0

Commissariat à l’énergie atomique et aux énergies alternatives

Institut List | CEA Saclay Nano-INNOV | Bât. 862- PC174

F-91191 Gif-sur-Yvette Cedex

M. +33 6 88 20 00 47

T. +33 1 69 08 58 24

sebastien.gerard@xxxxxx  www-list.cea.fr

 

 

 

icone_youtube

  cid:image004.png@01D1C880.5C951BE0  cid:image005.jpg@01D1C880.5C951BE0   

 

 

De : mdt-papyrus.dev-bounces@xxxxxxxxxxx [mailto:mdt-papyrus.dev-bounces@xxxxxxxxxxx] De la part de Christian Damus
Envoyé : vendredi 19 mai 2017 14:59
À : Papyrus Project list
<mdt-papyrus.dev@xxxxxxxxxxx>
Objet : Re: [mdt-papyrus.dev] OCL question on a profile

 

Hi, Sébastien,

 

Try this:  self.extension_NFP->notEmpty() implies self.extension_ASIL->notEmpty()


HTH,

 

Christian


On May 19, 2017, 08:56 -0400, GERARD Sebastien <Sebastien.GERARD@xxxxxx>, wrote:

Hi all,

 

Who can tell how to write the following rule in OCL?

On the profile denoted below, I would like to have a rule to check that is an Operation has the <<NFP>> applied stereotype, then it has also the <<ASIL>> one.

 

cid:image018.png@01D2D0BB.0B0319A0

 

 

Thanks.

 

 

 

cid:image001.png@01D1C880.5C951BE0

 

 

Sébastien Gérard

Head of the LISE labs

CEA Research Director

Papyrus project Leader (www.eclipse.org/papyrus)

cid:image002.jpg@01D1C880.5C951BE0

Commissariat à l’énergie atomique et aux énergies alternatives

Institut List | CEA Saclay Nano-INNOV | Bât. 862- PC174

F-91191 Gif-sur-Yvette Cedex

M. +33 6 88 20 00 47

T. +33 1 69 08 58 24

sebastien.gerard@xxxxxx  www-list.cea.fr

 

 

 

icone_youtube

  cid:image004.png@01D1C880.5C951BE0  cid:image005.jpg@01D1C880.5C951BE0   

 

 

_______________________________________________
mdt-papyrus.dev mailing list
mdt-papyrus.dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/mdt-papyrus.dev

 

_______________________________________________
mdt-papyrus.dev mailing list
mdt-papyrus.dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/mdt-papyrus.dev

 

 

https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif

Virus-free. www.avast.com

 

Attachment: BacASable.zip
Description: BacASable.zip


Back to the top