Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » MoDisco » Java Model not linked to GASTM
Java Model not linked to GASTM [message #876407] Thu, 24 May 2012 14:33 Go to next message
Benjamin Klatt is currently offline Benjamin KlattFriend
Messages: 36
Registered: September 2010
Member
Hi all,

in the current implementation (0.9), the java ecore model (org.eclipse.gmt.modisco.java/model/java.ecore) is not derived from the GASTM ecore model (org.eclipse.modisco.omg.gastm/model/gastm.ecore). Instead many elements (e.g. Statement or TypeDeclaration) are specified twice.

Beside of the redundancy, I assumed I can write code based on the GASTM model types which is then automatically able to process models extracted with the Java discoverer.

So why are the models not linked and how to achieve compatibility with other discoverers later on?

regards
Benjamin
Re: Java Model not linked to GASTM [message #876770 is a reply to message #876407] Fri, 25 May 2012 09:02 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Hello Benjamin,

The MoDisco Java & GASTM metamodels are two different & distinct ones.

The Java metamodel is based on the JDT specification, and the corresponding Java model discoverer allows to automatically get a full Java model out of any Java project(s).
It is specifically targeting the Java technology, and there is currently no plan to deeply modify it.

The GASTM metamodel is the direct implementation of the corresponding specification as defined by the OMG Architecture Driven Modernization Task Force.
It is targeting the generic description of program ASTs independently from any particular language or technology.
Note that MoDisco does not provide any associated model discoverer in its current version.

Having said that, it is still possible to obtain a more generic GASTM model from a previously discovered Java model by implementing a corresponding Java-to-GASTM model transformation (cf. model transformation technologies such as ATL http://www.eclipse.org/atl/).
This transformation component is currently not available in MoDisco, but could be a nice and useful contribution to the project Smile .

Best regards,

Hugo


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: Java Model not linked to GASTM [message #876831 is a reply to message #876770] Fri, 25 May 2012 10:54 Go to previous messageGo to next message
Benjamin Klatt is currently offline Benjamin KlattFriend
Messages: 36
Registered: September 2010
Member
Hi Hugo,

hm, I hoped to get a different answer Smile

We understood the OMG ASTM specification to define a GAST model representing elements of a general OOP language and specialized AST models, extending the GAST model for different languages such as JAVA oder C#. This is because we expected the MoDisco Java model to be such an extending AST model.

Our plan was to implement our tooling in a way that operates as much as possible on the generic level with only small extensions that are language specific.

A transformation should be a manageable task, but what we need is the link back to the source entities and the inventory model. So we would still need a link between the GAST and the Java model. This would lead to an additional linking infrastructure such as a tracemodel in between and the model as well as the processing would become very large for bigger projects Sad

all the best
Benjamin

Re: Java Model not linked to GASTM [message #876837 is a reply to message #876831] Fri, 25 May 2012 11:11 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
We already have in MoDisco a composition framework that could be a bit similar to what you are mentioning.
I encourage you to take a look to the "Infrastructure/KDM Source Extension" & "Technologies/Composition" sections of the MoDisco documentation: http://download.eclipse.org/modeling/mdt/modisco/doc/org.eclipse.modisco.doc/

Basically, this framework is currently used to link a Java model with a KDM inventory model so that model<->code traceability can be provided.

Best regards,

Hugo


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: Java Model not linked to GASTM [message #876904 is a reply to message #876837] Fri, 25 May 2012 13:55 Go to previous messageGo to next message
Benjamin Klatt is currently offline Benjamin KlattFriend
Messages: 36
Registered: September 2010
Member
This model is what we are using so far and what we were really happy about.
However, this does not help to provide calculations and analysis in a generic way, which can be reused later one for example for cpp when we develop a discoverer for an cpp2kdm model.

Or does I miss something?

Cheers
Benjamin
Re: Java Model not linked to GASTM [message #876926 is a reply to message #876904] Fri, 25 May 2012 14:34 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
No, I was just mentioning this framework as an example of linking framework between related models.
In your case, you would probably need a different type of support even if following a relatively similar approach.

Best regards,

Hugo


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: Java Model not linked to GASTM [message #878553 is a reply to message #876837] Tue, 29 May 2012 14:13 Go to previous messageGo to next message
Benjamin Klatt is currently offline Benjamin KlattFriend
Messages: 36
Registered: September 2010
Member
Hugo,

based on your experience with the OMG GAST model and MoDisco, would you recommend to
* build a java specific AST model (let's call it JavaASTM) which derives from the GASTM and includes the java specific language constructs
* build a transformation to create this model based on the MoDisco discoverer results

Or would you recommend to work on a contribution for MoDisco to adapt the current java ecore model and the current discoverer and code generation to connect the java specific and GAST models as recommended by the OMG specification?

Thanks
Benjamin
Re: Java Model not linked to GASTM [message #878585 is a reply to message #878553] Tue, 29 May 2012 15:06 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Hi Benjamin,

In my opinion, the first solution you proposed is lighter to implement: 1) build a specific extension of the ASTM metamodel for Java and 2) create a model-to-model transformation from the MoDisco java metamodel to this new JavaASTM one.
The second option is an alternative but would require more work as you would also have to implement a new model discoverer.

Talking about easier integration in MoDisco and afterward maintenance of the components, the first option is also preferable.

Best regards,

Hugo



--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: Java Model not linked to GASTM [message #879916 is a reply to message #878585] Fri, 01 June 2012 05:41 Go to previous messageGo to next message
Benjamin Klatt is currently offline Benjamin KlattFriend
Messages: 36
Registered: September 2010
Member
Hi Hugo,

we started to work on this transformation. Unfortunatly, their is some lack of clarity about the OMG GASTM standard and how to use the model elements. Do you know any existing GASTM instance to take a look on?

Thanks
Benjamin
Re: Java Model not linked to GASTM [message #879977 is a reply to message #879916] Fri, 01 June 2012 08:21 Go to previous message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Hi Benjamin,

Sorry but we currently don't have any GASTM model available in MoDisco. Only the metamodel EMF implementation is provided right now.
Our single reference is actually the official OMG ADM specification: http://www.omg.org/spec/ASTM/
However, it could be great in the future to also provide such model examples as part of MoDisco.

Best regards,

Hugo


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Previous Topic:KDM Method Invocation
Next Topic:XMI from java discoverer
Goto Forum:
  


Current Time: Thu Apr 25 13:02:46 GMT 2024

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

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

Back to the top