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

If you’re defining this in the profile, is it the OpaqueExpression body of a Constraint owned by the NFP stereotype?

If so, then you be able to specify just this _expression_:

    self.base_Operation.extension_ASIL->notEmpty()

because the context implied by the placement in the profile is the NFP stereotype.

If it’s in an OCL document somehow associated with the profile application and loaded separately, then something like this:

    context uml::Operation
    inv ‘nfp_requires_asil’:
        self.extension_NFP->notEmpty() implies self.extension_ASIL->notEmpty()

In either case, this relies on the ability of OCL to navigate association ends (including metaclass extension ends) that are non-navigable according to ordinary UML semantics.  AFAIK, the Eclipse OCL implementation’s pivot implementation for UML supports this.

Cheers,

Christian

On May 19, 2017, 09:35 -0400, GERARD Sebastien <Sebastien.GERARD@xxxxxx>, 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.

 

 

 

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

Back to the top