Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » QVT in OCL implementation
QVT in OCL implementation [message #44857] Tue, 27 November 2007 08:16 Go to next message
Eclipse UserFriend
Originally posted by: nafariss.gmx.de

Hello!

I have to implement the abstract Syntact of QVT in eclipse OCL.
transformation variable is one of the thing that make me problem:

transformation is a subclass of both a Package and a Class (both from EMOF).

wenn i wante to create a silbing in OCL.ecore, i can only do one thing,
as EClass or as EPackage.

how can i bind this Class to EPackage, wenn i cant see the elements of
emf in OCL.ecore.

Please help me.

Thank you very much.

Naima
Re: QVT in OCL implementation [message #45071 is a reply to message #44857] Tue, 27 November 2007 13:23 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Fariss,

First, I have to ask whether you know that there are at least two
implementations of QVT abstract syntax underway at Eclipse already? The
UMLX component of the GMT project has an implementation of the Relational
QVT syntax, and the QVTo component of the M2M project has an implementation
of the Operational QVT syntax.

I don't understand what you mean by "create a sibling in OCL.ecore." In
your metamodel (perhaps called QVT.ecore), you need simply create an EClass
that has EPackage and EClass as its eSuperTypes. I don't see how the
OCL.ecore from MDT OCL enters into the question.

HTH,

Christian


Fariss wrote:

> Hello!
>
> I have to implement the abstract Syntact of QVT in eclipse OCL.
> transformation variable is one of the thing that make me problem:
>
> transformation is a subclass of both a Package and a Class (both from
> EMOF).
>
> wenn i wante to create a silbing in OCL.ecore, i can only do one thing,
> as EClass or as EPackage.
>
> how can i bind this Class to EPackage, wenn i cant see the elements of
> emf in OCL.ecore.
>
> Please help me.
>
> Thank you very much.
>
> Naima
Re: QVT in OCL implementation [message #45156 is a reply to message #45071] Tue, 27 November 2007 18:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nafariss.gmx.de

Hi, Christian,

Thanks for your answer.
That is an implementation of QVT Relation in eclipse ocl implementation,
the grammer of QVT Relation is implemented in ocllpgparser.g. That mean,
i use the ocl for my QVT implementation (Diploma thesis)
the CST of QVT is implemented in OCLCST.ecore and i mus implement the
AST in OCL.ecore.

In the specification of the QVT Abstract syntax, the transformation is a
subclass of Classs and Package (EMOF)

from QVT Specification:
<<Syntactically, a Transformation is a subclass of both a Package and a
Class. As a Package it provides a
namespace for the rules contained in it. As a Class it can define
properties and operations - properties to specify
configuration values, if any, needed at runtime and operations to
implement utility functions, if any, required by the
transformation.>>>

Wenn i create transformation as Eclass (in OCL.ecore), i muss make
Package (emof) as Supertype, but i cant see any Package Type to do that.

how can i do that?

thank you.
Naima

Christian W. Damus schrieb:
> Hi, Fariss,
>
> First, I have to ask whether you know that there are at least two
> implementations of QVT abstract syntax underway at Eclipse already? The
> UMLX component of the GMT project has an implementation of the Relational
> QVT syntax, and the QVTo component of the M2M project has an implementation
> of the Operational QVT syntax.
>
> I don't understand what you mean by "create a sibling in OCL.ecore." In
> your metamodel (perhaps called QVT.ecore), you need simply create an EClass
> that has EPackage and EClass as its eSuperTypes. I don't see how the
> OCL.ecore from MDT OCL enters into the question.
>
> HTH,
>
> Christian
>
>
> Fariss wrote:
>
>> Hello!
>>
>> I have to implement the abstract Syntact of QVT in eclipse OCL.
>> transformation variable is one of the thing that make me problem:
>>
>> transformation is a subclass of both a Package and a Class (both from
>> EMOF).
>>
>> wenn i wante to create a silbing in OCL.ecore, i can only do one thing,
>> as EClass or as EPackage.
>>
>> how can i bind this Class to EPackage, wenn i cant see the elements of
>> emf in OCL.ecore.
>>
>> Please help me.
>>
>> Thank you very much.
>>
>> Naima
>
Re: QVT in OCL implementation [message #45186 is a reply to message #45156] Tue, 27 November 2007 19:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Naima,

See some replies in-line, below.

HTH,

Christian


Fariss wrote:

> Hi, Christian,
>
> Thanks for your answer.
> That is an implementation of QVT Relation in eclipse ocl implementation,
> the grammer of QVT Relation is implemented in ocllpgparser.g. That mean,

Which version of MDT OCL are you using? This file doesn't exist in the 1.2
release. In MDT OCL 1.2, there is

EssentialOCL.g
OCLParser.g

neither of which is a grammar for relational QVT. I suppose a relational
QVT grammar might *import* one or both of these grammars to define a
superset of OCL.

MDT OCL does not have an implementation of relational QVT.


> i use the ocl for my QVT implementation (Diploma thesis)
> the CST of QVT is implemented in OCLCST.ecore and i mus implement the
> AST in OCL.ecore.

The CST of *OCL* is defined in OCLCST.ecore and the AST of *OCL* is defined
in OCL.ecore. QVT is something else, probably extending the CST and AST
metamodels of OCL.

If you look in the source code of the UMLX component in the Eclipse GMT
project, you will see how Ed is already implementing the Relational QVT
grammar by extending the MDT OCL grammar and metamodels.


> In the specification of the QVT Abstract syntax, the transformation is a
> subclass of Classs and Package (EMOF)
>
> from QVT Specification:
> <<Syntactically, a Transformation is a subclass of both a Package and a
> Class. As a Package it provides a
> namespace for the rules contained in it. As a Class it can define
> properties and operations - properties to specify
> configuration values, if any, needed at runtime and operations to
> implement utility functions, if any, required by the
> transformation.>>>
>
> Wenn i create transformation as Eclass (in OCL.ecore), i muss make
> Package (emof) as Supertype, but i cant see any Package Type to do that.
>
> how can i do that?

You shouldn't create anything in OCL.ecore because that is in MDT OCL. You
should create your Transformation EClass in your QVT metamodel, perhaps in
a resource named QVT.ecore. EClass and EPackage are not defined by OCL,
but by Ecore. You will find them in Ecore.ecore from the EMF project
(org.eclipse.emf.ecore plug-in).

I'm afraid I am completely misunderstanding what you are asking ...


> thank you.
> Naima
>

-----8<-----
Re: QVT in OCL implementation [message #45516 is a reply to message #45186] Wed, 28 November 2007 20:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nafariss.gmx.de

Hello,

i know, it is difficult to understand me: that's a Diploma thesis, that
i began 3 Months ago.

but generally wenn i want to add some Classes in OCL.ecore, that has as
ESuper Type an Element in emof, but i cant see that Element in the
Dialog of the properties (ESuper Types), what can i do?

I think, my problem is like TypedElement, it has a SuperType
ENamedElement, but in OCL.ECORE, it has no Super Type.

Thank you for your efforts.

Naima



Christian W. Damus schrieb:
> Hi, Naima,
>
> See some replies in-line, below.
>
> HTH,
>
> Christian
>
>
> Fariss wrote:
>
>> Hi, Christian,
>>
>> Thanks for your answer.
>> That is an implementation of QVT Relation in eclipse ocl implementation,
>> the grammer of QVT Relation is implemented in ocllpgparser.g. That mean,
>
> Which version of MDT OCL are you using? This file doesn't exist in the 1.2
> release. In MDT OCL 1.2, there is
>
> EssentialOCL.g
> OCLParser.g
>
> neither of which is a grammar for relational QVT. I suppose a relational
> QVT grammar might *import* one or both of these grammars to define a
> superset of OCL.
>
> MDT OCL does not have an implementation of relational QVT.
>
>
>> i use the ocl for my QVT implementation (Diploma thesis)
>> the CST of QVT is implemented in OCLCST.ecore and i mus implement the
>> AST in OCL.ecore.
>
> The CST of *OCL* is defined in OCLCST.ecore and the AST of *OCL* is defined
> in OCL.ecore. QVT is something else, probably extending the CST and AST
> metamodels of OCL.
>
> If you look in the source code of the UMLX component in the Eclipse GMT
> project, you will see how Ed is already implementing the Relational QVT
> grammar by extending the MDT OCL grammar and metamodels.
>
>
>> In the specification of the QVT Abstract syntax, the transformation is a
>> subclass of Classs and Package (EMOF)
>>
>> from QVT Specification:
>> <<Syntactically, a Transformation is a subclass of both a Package and a
>> Class. As a Package it provides a
>> namespace for the rules contained in it. As a Class it can define
>> properties and operations - properties to specify
>> configuration values, if any, needed at runtime and operations to
>> implement utility functions, if any, required by the
>> transformation.>>>
>>
>> Wenn i create transformation as Eclass (in OCL.ecore), i muss make
>> Package (emof) as Supertype, but i cant see any Package Type to do that.
>>
>> how can i do that?
>
> You shouldn't create anything in OCL.ecore because that is in MDT OCL. You
> should create your Transformation EClass in your QVT metamodel, perhaps in
> a resource named QVT.ecore. EClass and EPackage are not defined by OCL,
> but by Ecore. You will find them in Ecore.ecore from the EMF project
> (org.eclipse.emf.ecore plug-in).
>
> I'm afraid I am completely misunderstanding what you are asking ...
>
>
>> thank you.
>> Naima
>>
>
> -----8<-----
Re: QVT in OCL implementation [message #45545 is a reply to message #45516] Wed, 28 November 2007 20:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Fariss,

Comments below.


Fariss wrote:
> Hello,
>
> i know, it is difficult to understand me: that's a Diploma thesis,
> that i began 3 Months ago.
>
> but generally wenn i want to add some Classes in OCL.ecore, that has
> as ESuper Type an Element in emof, but i cant see that Element in the
> Dialog of the properties (ESuper Types), what can i do?
As Christian says, I don't think you should be modifying OCL.ecore
directly. In general, if you want some EClass to be visible in the
Sample Ecore Editor and it's not already available, you need to load the
Ecore model that contains it. For example, you'd use "Sample Ecore
Editor->Load Resource...->Browse Registered Package" and locate the
package is nsURI "http://www.eclipse.org/emf/2002/Ecore". Once you load
that Ecore model, the Ecore.ecore in this case, things like EClass and
EPackage will be available for for use in the Ecore you are editing.
Making something extend both EPackage and EClass sounds horrible to me
though...
>
> I think, my problem is like TypedElement, it has a SuperType
> ENamedElement, but in OCL.ECORE, it has no Super Type.
>
> Thank you for your efforts.
>
> Naima
>
>
>
> Christian W. Damus schrieb:
>> Hi, Naima,
>>
>> See some replies in-line, below.
>>
>> HTH,
>>
>> Christian
>>
>>
>> Fariss wrote:
>>
>>> Hi, Christian,
>>>
>>> Thanks for your answer.
>>> That is an implementation of QVT Relation in eclipse ocl
>>> implementation,
>>> the grammer of QVT Relation is implemented in ocllpgparser.g. That
>>> mean,
>>
>> Which version of MDT OCL are you using? This file doesn't exist in
>> the 1.2
>> release. In MDT OCL 1.2, there is
>>
>> EssentialOCL.g
>> OCLParser.g
>>
>> neither of which is a grammar for relational QVT. I suppose a
>> relational
>> QVT grammar might *import* one or both of these grammars to define a
>> superset of OCL.
>>
>> MDT OCL does not have an implementation of relational QVT.
>>
>>
>>> i use the ocl for my QVT implementation (Diploma thesis)
>>> the CST of QVT is implemented in OCLCST.ecore and i mus implement the
>>> AST in OCL.ecore.
>>
>> The CST of *OCL* is defined in OCLCST.ecore and the AST of *OCL* is
>> defined
>> in OCL.ecore. QVT is something else, probably extending the CST and AST
>> metamodels of OCL.
>>
>> If you look in the source code of the UMLX component in the Eclipse GMT
>> project, you will see how Ed is already implementing the Relational QVT
>> grammar by extending the MDT OCL grammar and metamodels.
>>
>>
>>> In the specification of the QVT Abstract syntax, the transformation
>>> is a
>>> subclass of Classs and Package (EMOF)
>>>
>>> from QVT Specification:
>>> <<Syntactically, a Transformation is a subclass of both a Package and a
>>> Class. As a Package it provides a
>>> namespace for the rules contained in it. As a Class it can define
>>> properties and operations - properties to specify
>>> configuration values, if any, needed at runtime and operations to
>>> implement utility functions, if any, required by the
>>> transformation.>>>
>>>
>>> Wenn i create transformation as Eclass (in OCL.ecore), i muss make
>>> Package (emof) as Supertype, but i cant see any Package Type to do
>>> that.
>>>
>>> how can i do that?
>>
>> You shouldn't create anything in OCL.ecore because that is in MDT
>> OCL. You
>> should create your Transformation EClass in your QVT metamodel,
>> perhaps in
>> a resource named QVT.ecore. EClass and EPackage are not defined by OCL,
>> but by Ecore. You will find them in Ecore.ecore from the EMF project
>> (org.eclipse.emf.ecore plug-in).
>>
>> I'm afraid I am completely misunderstanding what you are asking ...
>>
>>
>>> thank you.
>>> Naima
>>>
>>
>> -----8<-----
Re: QVT in OCL implementation [message #45575 is a reply to message #45516] Thu, 29 November 2007 08:23 Go to previous messageGo to next message
Miguel Garcia is currently offline Miguel GarciaFriend
Messages: 40
Registered: July 2009
Member
Naima,

If you're trying to write the missing well-formedness rules (in OCL) for
QVT-Relations then I guess we can join efforts (I would also like
to see them, as the standard is silent on that).

You may consider using OCL Tools,
http://www.sts.tu-harburg.de/~mi.garcia/pubs/2007/ocltools/O CLTools.pdf
to make life easier ...

Miguel

--
Miguel Garcia miguel.garcia@tuhh.de
Institute for Software Systems (STS), E-16
Technische Universitaet Hamburg-Harburg
Harburger Schlossstr. 20, 21073 Hamburg Fax: (+49)40-42878-2515
http://www.sts.tu-harburg.de/~mi.garcia





Fariss wrote:
> Hello,
>
> i know, it is difficult to understand me: that's a Diploma thesis, that
> i began 3 Months ago.
>
> but generally wenn i want to add some Classes in OCL.ecore, that has as
> ESuper Type an Element in emof, but i cant see that Element in the
> Dialog of the properties (ESuper Types), what can i do?
>
> I think, my problem is like TypedElement, it has a SuperType
> ENamedElement, but in OCL.ECORE, it has no Super Type.
>
> Thank you for your efforts.
>
> Naima
>
>
>
> Christian W. Damus schrieb:
>> Hi, Naima,
>>
>> See some replies in-line, below.
>>
>> HTH,
>>
>> Christian
>>
>>
>> Fariss wrote:
>>
>>> Hi, Christian,
>>>
>>> Thanks for your answer.
>>> That is an implementation of QVT Relation in eclipse ocl implementation,
>>> the grammer of QVT Relation is implemented in ocllpgparser.g. That mean,
>>
>> Which version of MDT OCL are you using? This file doesn't exist in
>> the 1.2
>> release. In MDT OCL 1.2, there is
>>
>> EssentialOCL.g
>> OCLParser.g
>>
>> neither of which is a grammar for relational QVT. I suppose a relational
>> QVT grammar might *import* one or both of these grammars to define a
>> superset of OCL.
>>
>> MDT OCL does not have an implementation of relational QVT.
>>
>>
>>> i use the ocl for my QVT implementation (Diploma thesis)
>>> the CST of QVT is implemented in OCLCST.ecore and i mus implement the
>>> AST in OCL.ecore.
>>
>> The CST of *OCL* is defined in OCLCST.ecore and the AST of *OCL* is
>> defined
>> in OCL.ecore. QVT is something else, probably extending the CST and AST
>> metamodels of OCL.
>>
>> If you look in the source code of the UMLX component in the Eclipse GMT
>> project, you will see how Ed is already implementing the Relational QVT
>> grammar by extending the MDT OCL grammar and metamodels.
>>
>>
>>> In the specification of the QVT Abstract syntax, the transformation is a
>>> subclass of Classs and Package (EMOF)
>>>
>>> from QVT Specification:
>>> <<Syntactically, a Transformation is a subclass of both a Package and a
>>> Class. As a Package it provides a
>>> namespace for the rules contained in it. As a Class it can define
>>> properties and operations - properties to specify
>>> configuration values, if any, needed at runtime and operations to
>>> implement utility functions, if any, required by the
>>> transformation.>>>
>>>
>>> Wenn i create transformation as Eclass (in OCL.ecore), i muss make
>>> Package (emof) as Supertype, but i cant see any Package Type to do that.
>>>
>>> how can i do that?
>>
>> You shouldn't create anything in OCL.ecore because that is in MDT
>> OCL. You
>> should create your Transformation EClass in your QVT metamodel,
>> perhaps in
>> a resource named QVT.ecore. EClass and EPackage are not defined by OCL,
>> but by Ecore. You will find them in Ecore.ecore from the EMF project
>> (org.eclipse.emf.ecore plug-in).
>>
>> I'm afraid I am completely misunderstanding what you are asking ...
>>
>>
>>> thank you.
>>> Naima
>>>
>>
>> -----8<-----
Re: QVT in OCL implementation [message #45606 is a reply to message #45545] Fri, 30 November 2007 08:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nafariss.gmx.de

Hi,

thanks for your answer.

i will do this idea, but i had hoped, it exist an other solution.

Thanks.

Naima

Ed Merks schrieb:
> Fariss,
>
> Comments below.
>
>
> Fariss wrote:
>> Hello,
>>
>> i know, it is difficult to understand me: that's a Diploma thesis,
>> that i began 3 Months ago.
>>
>> but generally wenn i want to add some Classes in OCL.ecore, that has
>> as ESuper Type an Element in emof, but i cant see that Element in the
>> Dialog of the properties (ESuper Types), what can i do?
> As Christian says, I don't think you should be modifying OCL.ecore
> directly. In general, if you want some EClass to be visible in the
> Sample Ecore Editor and it's not already available, you need to load the
> Ecore model that contains it. For example, you'd use "Sample Ecore
> Editor->Load Resource...->Browse Registered Package" and locate the
> package is nsURI "http://www.eclipse.org/emf/2002/Ecore". Once you load
> that Ecore model, the Ecore.ecore in this case, things like EClass and
> EPackage will be available for for use in the Ecore you are editing.
> Making something extend both EPackage and EClass sounds horrible to me
> though...
>>
>> I think, my problem is like TypedElement, it has a SuperType
>> ENamedElement, but in OCL.ECORE, it has no Super Type.
>>
>> Thank you for your efforts.
>>
>> Naima
>>
>>
>>
>> Christian W. Damus schrieb:
>>> Hi, Naima,
>>>
>>> See some replies in-line, below.
>>>
>>> HTH,
>>>
>>> Christian
>>>
>>>
>>> Fariss wrote:
>>>
>>>> Hi, Christian,
>>>>
>>>> Thanks for your answer.
>>>> That is an implementation of QVT Relation in eclipse ocl
>>>> implementation,
>>>> the grammer of QVT Relation is implemented in ocllpgparser.g. That
>>>> mean,
>>>
>>> Which version of MDT OCL are you using? This file doesn't exist in
>>> the 1.2
>>> release. In MDT OCL 1.2, there is
>>>
>>> EssentialOCL.g
>>> OCLParser.g
>>>
>>> neither of which is a grammar for relational QVT. I suppose a
>>> relational
>>> QVT grammar might *import* one or both of these grammars to define a
>>> superset of OCL.
>>>
>>> MDT OCL does not have an implementation of relational QVT.
>>>
>>>
>>>> i use the ocl for my QVT implementation (Diploma thesis)
>>>> the CST of QVT is implemented in OCLCST.ecore and i mus implement the
>>>> AST in OCL.ecore.
>>>
>>> The CST of *OCL* is defined in OCLCST.ecore and the AST of *OCL* is
>>> defined
>>> in OCL.ecore. QVT is something else, probably extending the CST and AST
>>> metamodels of OCL.
>>>
>>> If you look in the source code of the UMLX component in the Eclipse GMT
>>> project, you will see how Ed is already implementing the Relational QVT
>>> grammar by extending the MDT OCL grammar and metamodels.
>>>
>>>
>>>> In the specification of the QVT Abstract syntax, the transformation
>>>> is a
>>>> subclass of Classs and Package (EMOF)
>>>>
>>>> from QVT Specification:
>>>> <<Syntactically, a Transformation is a subclass of both a Package and a
>>>> Class. As a Package it provides a
>>>> namespace for the rules contained in it. As a Class it can define
>>>> properties and operations - properties to specify
>>>> configuration values, if any, needed at runtime and operations to
>>>> implement utility functions, if any, required by the
>>>> transformation.>>>
>>>>
>>>> Wenn i create transformation as Eclass (in OCL.ecore), i muss make
>>>> Package (emof) as Supertype, but i cant see any Package Type to do
>>>> that.
>>>>
>>>> how can i do that?
>>>
>>> You shouldn't create anything in OCL.ecore because that is in MDT
>>> OCL. You
>>> should create your Transformation EClass in your QVT metamodel,
>>> perhaps in
>>> a resource named QVT.ecore. EClass and EPackage are not defined by OCL,
>>> but by Ecore. You will find them in Ecore.ecore from the EMF project
>>> (org.eclipse.emf.ecore plug-in).
>>>
>>> I'm afraid I am completely misunderstanding what you are asking ...
>>>
>>>
>>>> thank you.
>>>> Naima
>>>>
>>>
>>> -----8<-----
Re: QVT in OCL implementation [message #58997 is a reply to message #45606] Wed, 02 July 2008 09:25 Go to previous messageGo to next message
Adolfo Sanchez-Barbudo Herrera is currently offline Adolfo Sanchez-Barbudo HerreraFriend
Messages: 254
Registered: July 2009
Senior Member
Hi Folks,

Fariss. First at all, you have to take into account that QVT
especification is described in terms of EMOF and EssentialOCL. Both
metamodels are implemented inside Eclipse using Ecore (as meta-metamodel).

I guess that you are trying to implement QVT metamodel (desribed in the
specification) inside Eclipse as well. So you have several options:

-Considering to use Ecore terms instead of EMOF terms, so that, if
specification says that transformation inherits from Class and Package,
you should make it inherit from EClass and EPackage instead. In that
case, I would recommend you to use OCLEcore.ecore metamodel
(org.eclipse.ocl.ecore project) when EssentialOcl terms are requiered.

-Define an EMOF metamodel in terms of Ecore, so that, you would have
Class, Package, etc.

As Christian says I would recommend you to have a look to GMT UMLX
project. You have a EQVTRelation (Ecore-based) metamodel, which extends
Ecore.ecore and OCLEcore.ecore metamodels. Try
org.eclipse.gmt.umlx.eqvt project.

You also have a QVTRelation (EMOF-based) metamodel, which extends
EMOF.ecore and EssentialOCL.ecore metamodels. Try
org.eclipse.gmt.umlx.qvt project.

You should not use modify any existing metamodel. Just create a new one,
and load the metamodels on which yours depends, as Ed explained.

P.S: Transformation (for QVTRelation), as same as Module (for
QVTOperational) inherits from Class and Package due to they can define
types and operations inside of them.

Cheers,
Adolfo.

Fariss escribió:
> Hi,
>
> thanks for your answer.
>
> i will do this idea, but i had hoped, it exist an other solution.
>
> Thanks.
>
> Naima
>
> Ed Merks schrieb:
>> Fariss,
>>
>> Comments below.
>>
>>
>> Fariss wrote:
>>> Hello,
>>>
>>> i know, it is difficult to understand me: that's a Diploma thesis,
>>> that i began 3 Months ago.
>>>
>>> but generally wenn i want to add some Classes in OCL.ecore, that has
>>> as ESuper Type an Element in emof, but i cant see that Element in the
>>> Dialog of the properties (ESuper Types), what can i do?
>> As Christian says, I don't think you should be modifying OCL.ecore
>> directly. In general, if you want some EClass to be visible in the
>> Sample Ecore Editor and it's not already available, you need to load
>> the Ecore model that contains it. For example, you'd use "Sample
>> Ecore Editor->Load Resource...->Browse Registered Package" and locate
>> the package is nsURI "http://www.eclipse.org/emf/2002/Ecore". Once
>> you load that Ecore model, the Ecore.ecore in this case, things like
>> EClass and EPackage will be available for for use in the Ecore you are
>> editing. Making something extend both EPackage and EClass sounds
>> horrible to me though...
>>>
>>> I think, my problem is like TypedElement, it has a SuperType
>>> ENamedElement, but in OCL.ECORE, it has no Super Type.
>>>
>>> Thank you for your efforts.
>>>
>>> Naima
>>>
>>>
>>>
>>> Christian W. Damus schrieb:
>>>> Hi, Naima,
>>>>
>>>> See some replies in-line, below.
>>>>
>>>> HTH,
>>>>
>>>> Christian
>>>>
>>>>
>>>> Fariss wrote:
>>>>
>>>>> Hi, Christian,
>>>>>
>>>>> Thanks for your answer.
>>>>> That is an implementation of QVT Relation in eclipse ocl
>>>>> implementation,
>>>>> the grammer of QVT Relation is implemented in ocllpgparser.g. That
>>>>> mean,
>>>>
>>>> Which version of MDT OCL are you using? This file doesn't exist in
>>>> the 1.2
>>>> release. In MDT OCL 1.2, there is
>>>>
>>>> EssentialOCL.g
>>>> OCLParser.g
>>>>
>>>> neither of which is a grammar for relational QVT. I suppose a
>>>> relational
>>>> QVT grammar might *import* one or both of these grammars to define a
>>>> superset of OCL.
>>>>
>>>> MDT OCL does not have an implementation of relational QVT.
>>>>
>>>>
>>>>> i use the ocl for my QVT implementation (Diploma thesis)
>>>>> the CST of QVT is implemented in OCLCST.ecore and i mus implement the
>>>>> AST in OCL.ecore.
>>>>
>>>> The CST of *OCL* is defined in OCLCST.ecore and the AST of *OCL* is
>>>> defined
>>>> in OCL.ecore. QVT is something else, probably extending the CST and
>>>> AST
>>>> metamodels of OCL.
>>>>
>>>> If you look in the source code of the UMLX component in the Eclipse GMT
>>>> project, you will see how Ed is already implementing the Relational QVT
>>>> grammar by extending the MDT OCL grammar and metamodels.
>>>>
>>>>
>>>>> In the specification of the QVT Abstract syntax, the transformation
>>>>> is a
>>>>> subclass of Classs and Package (EMOF)
>>>>>
>>>>> from QVT Specification:
>>>>> <<Syntactically, a Transformation is a subclass of both a Package
>>>>> and a
>>>>> Class. As a Package it provides a
>>>>> namespace for the rules contained in it. As a Class it can define
>>>>> properties and operations - properties to specify
>>>>> configuration values, if any, needed at runtime and operations to
>>>>> implement utility functions, if any, required by the
>>>>> transformation.>>>
>>>>>
>>>>> Wenn i create transformation as Eclass (in OCL.ecore), i muss make
>>>>> Package (emof) as Supertype, but i cant see any Package Type to do
>>>>> that.
>>>>>
>>>>> how can i do that?
>>>>
>>>> You shouldn't create anything in OCL.ecore because that is in MDT
>>>> OCL. You
>>>> should create your Transformation EClass in your QVT metamodel,
>>>> perhaps in
>>>> a resource named QVT.ecore. EClass and EPackage are not defined by
>>>> OCL,
>>>> but by Ecore. You will find them in Ecore.ecore from the EMF project
>>>> (org.eclipse.emf.ecore plug-in).
>>>>
>>>> I'm afraid I am completely misunderstanding what you are asking ...
>>>>
>>>>
>>>>> thank you.
>>>>> Naima
>>>>>
>>>>
>>>> -----8<-----
Re: QVT in OCL implementation [message #59023 is a reply to message #58997] Wed, 02 July 2008 12:01 Go to previous message
Adolfo Sanchez-Barbudo Herrera is currently offline Adolfo Sanchez-Barbudo HerreraFriend
Messages: 254
Registered: July 2009
Senior Member
Ooops...

Sorry, but I got confused after installing the newsgroup manager, and I
didn't realize that this was an old thread ;P.

Cheers,
Adolfo.

Adolfo Sanchez-Barbudo escribió:
> Hi Folks,
>
> Fariss. First at all, you have to take into account that QVT
> especification is described in terms of EMOF and EssentialOCL. Both
> metamodels are implemented inside Eclipse using Ecore (as meta-metamodel).
>
> I guess that you are trying to implement QVT metamodel (desribed in the
> specification) inside Eclipse as well. So you have several options:
>
> -Considering to use Ecore terms instead of EMOF terms, so that, if
> specification says that transformation inherits from Class and Package,
> you should make it inherit from EClass and EPackage instead. In that
> case, I would recommend you to use OCLEcore.ecore metamodel
> (org.eclipse.ocl.ecore project) when EssentialOcl terms are requiered.
>
> -Define an EMOF metamodel in terms of Ecore, so that, you would have
> Class, Package, etc.
>
> As Christian says I would recommend you to have a look to GMT UMLX
> project. You have a EQVTRelation (Ecore-based) metamodel, which extends
> Ecore.ecore and OCLEcore.ecore metamodels. Try
> org.eclipse.gmt.umlx.eqvt project.
>
> You also have a QVTRelation (EMOF-based) metamodel, which extends
> EMOF.ecore and EssentialOCL.ecore metamodels. Try
> org.eclipse.gmt.umlx.qvt project.
>
> You should not use modify any existing metamodel. Just create a new one,
> and load the metamodels on which yours depends, as Ed explained.
>
> P.S: Transformation (for QVTRelation), as same as Module (for
> QVTOperational) inherits from Class and Package due to they can define
> types and operations inside of them.
>
> Cheers,
> Adolfo.
>
> Fariss escribió:
>> Hi,
>>
>> thanks for your answer.
>>
>> i will do this idea, but i had hoped, it exist an other solution.
>>
>> Thanks.
>>
>> Naima
>>
>> Ed Merks schrieb:
>>> Fariss,
>>>
>>> Comments below.
>>>
>>>
>>> Fariss wrote:
>>>> Hello,
>>>>
>>>> i know, it is difficult to understand me: that's a Diploma thesis,
>>>> that i began 3 Months ago.
>>>>
>>>> but generally wenn i want to add some Classes in OCL.ecore, that has
>>>> as ESuper Type an Element in emof, but i cant see that Element in
>>>> the Dialog of the properties (ESuper Types), what can i do?
>>> As Christian says, I don't think you should be modifying OCL.ecore
>>> directly. In general, if you want some EClass to be visible in the
>>> Sample Ecore Editor and it's not already available, you need to load
>>> the Ecore model that contains it. For example, you'd use "Sample
>>> Ecore Editor->Load Resource...->Browse Registered Package" and locate
>>> the package is nsURI "http://www.eclipse.org/emf/2002/Ecore". Once
>>> you load that Ecore model, the Ecore.ecore in this case, things like
>>> EClass and EPackage will be available for for use in the Ecore you
>>> are editing. Making something extend both EPackage and EClass sounds
>>> horrible to me though...
>>>>
>>>> I think, my problem is like TypedElement, it has a SuperType
>>>> ENamedElement, but in OCL.ECORE, it has no Super Type.
>>>>
>>>> Thank you for your efforts.
>>>>
>>>> Naima
>>>>
>>>>
>>>>
>>>> Christian W. Damus schrieb:
>>>>> Hi, Naima,
>>>>>
>>>>> See some replies in-line, below.
>>>>>
>>>>> HTH,
>>>>>
>>>>> Christian
>>>>>
>>>>>
>>>>> Fariss wrote:
>>>>>
>>>>>> Hi, Christian,
>>>>>>
>>>>>> Thanks for your answer.
>>>>>> That is an implementation of QVT Relation in eclipse ocl
>>>>>> implementation,
>>>>>> the grammer of QVT Relation is implemented in ocllpgparser.g. That
>>>>>> mean,
>>>>>
>>>>> Which version of MDT OCL are you using? This file doesn't exist in
>>>>> the 1.2
>>>>> release. In MDT OCL 1.2, there is
>>>>>
>>>>> EssentialOCL.g
>>>>> OCLParser.g
>>>>>
>>>>> neither of which is a grammar for relational QVT. I suppose a
>>>>> relational
>>>>> QVT grammar might *import* one or both of these grammars to define a
>>>>> superset of OCL.
>>>>>
>>>>> MDT OCL does not have an implementation of relational QVT.
>>>>>
>>>>>
>>>>>> i use the ocl for my QVT implementation (Diploma thesis)
>>>>>> the CST of QVT is implemented in OCLCST.ecore and i mus implement the
>>>>>> AST in OCL.ecore.
>>>>>
>>>>> The CST of *OCL* is defined in OCLCST.ecore and the AST of *OCL* is
>>>>> defined
>>>>> in OCL.ecore. QVT is something else, probably extending the CST
>>>>> and AST
>>>>> metamodels of OCL.
>>>>>
>>>>> If you look in the source code of the UMLX component in the Eclipse
>>>>> GMT
>>>>> project, you will see how Ed is already implementing the Relational
>>>>> QVT
>>>>> grammar by extending the MDT OCL grammar and metamodels.
>>>>>
>>>>>
>>>>>> In the specification of the QVT Abstract syntax, the
>>>>>> transformation is a
>>>>>> subclass of Classs and Package (EMOF)
>>>>>>
>>>>>> from QVT Specification:
>>>>>> <<Syntactically, a Transformation is a subclass of both a Package
>>>>>> and a
>>>>>> Class. As a Package it provides a
>>>>>> namespace for the rules contained in it. As a Class it can define
>>>>>> properties and operations - properties to specify
>>>>>> configuration values, if any, needed at runtime and operations to
>>>>>> implement utility functions, if any, required by the
>>>>>> transformation.>>>
>>>>>>
>>>>>> Wenn i create transformation as Eclass (in OCL.ecore), i muss make
>>>>>> Package (emof) as Supertype, but i cant see any Package Type to do
>>>>>> that.
>>>>>>
>>>>>> how can i do that?
>>>>>
>>>>> You shouldn't create anything in OCL.ecore because that is in MDT
>>>>> OCL. You
>>>>> should create your Transformation EClass in your QVT metamodel,
>>>>> perhaps in
>>>>> a resource named QVT.ecore. EClass and EPackage are not defined by
>>>>> OCL,
>>>>> but by Ecore. You will find them in Ecore.ecore from the EMF project
>>>>> (org.eclipse.emf.ecore plug-in).
>>>>>
>>>>> I'm afraid I am completely misunderstanding what you are asking ...
>>>>>
>>>>>
>>>>>> thank you.
>>>>>> Naima
>>>>>>
>>>>>
>>>>> -----8<-----
Previous Topic:[Announce] MDT OCL 1.2.0 is available
Next Topic:UML and generate code
Goto Forum:
  


Current Time: Wed Nov 26 14:21:53 GMT 2014

Powered by FUDForum. Page generated in 0.03693 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software