Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mdt-papyrus.dev] Suite question sur OCL...

Hi

I see a few very unwise practices

- no URI on the root profile / no URIs on the leaf profiles
- 25 copies of Ecore variants with specific URIs

but https://bugs.eclipse.org/516285 fixed references to nested packages below URI less packages at M7.

Completion assist shows that self.extension_NFP exists but self.extensionASIL does not. Both should exist.

Looking closer there is no extension_ASIL.

ASIL is a derived Stereotype. The extension association is base_Operation <=> extension_Generic, so as you expected you need to use extension_Generic but as:

self.extension_NFP->notEmpty() implies self.extension_Generic->selectByKind(AutoML::VehicleFeatureNFP::ASIL)->notEmpty()

or if you really like oclIsKindOf

self.extension_NFP->notEmpty() implies self.extension_Generic->select(oclIsKindOf(AutoML::VehicleFeatureNFP::ASIL))->notEmpty()
 
    Regards

        Ed Willink

On 23/05/2017 15:28, GERARD Sebastien wrote:

Hi all,

 

First of all, thanks to Christain, Johan, and ED for their responses on my previous question. Finally, it was ok. The pb is indeed that I did not know really suddenly it was ok…. :-(

I did a modification on my profile introducing an intermediate stereotype called <<Generic>> which extends Operation, and now the <<ASIL>> stereotype is a generalization of <<Generic>>.

 

Following constraint allow me to check that an Operation on which <<NFP>> is applied must also have the applied <<Generic>> stereotype:

self.extension_NFP->notEmpty() implies self.extension_Generic->notEmpty()

 

I would like also to check that an Operation on which <<NFP>> is applied must also have the applied stereotype <<ASIL>>.

I tried to write the following OCL statement (using the Xtext console directly on my model): self.extension_NFP->notEmpty() implies self.extension_ASIL->notEmpty()

But in that case .extension_ASIL is not resolved. Why?

I tried the following alternative:

self.extension_NFP->notEmpty() implies self.extension_Generic.ocIsKindOf()->notEmpty() but it does not work.

AM I wrong?

 

Thanks,

Best,

Sébastien

 

 

 

 

 

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


Virus-free. www.avast.com

Back to the top