Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » MoDisco » java2kdm.atl
java2kdm.atl [message #1769573] Tue, 01 August 2017 18:12 Go to next message
Guisella Angulo is currently offline Guisella AnguloFriend
Messages: 17
Registered: September 2016
Junior Member
Hi,
In the ATL 'java2kdm.atl' for transformation JAVA in KDM Model, I do not understand the transformation rule 'InfixExpressionToActionElement'.
In the rule, the java's elements leftOperand e rightOperand of type "Expression" are transforms in 'CodeElements' through the helper 'filterExpression'. However, the type 'Expression' can be 'SingleVariableAccess' that are discarded in the helper.
As a consequence if the Java Model has a 'java: InfixExpression' (+) e nested has a rightOperand of type 'SingleVariableAccess' and a leftOperand of type 'NumberLiteral', only the 'NumberLiteral' will be displayed in the Model KDM.
The information are lost? it's correct?
Thanks!

rule InfixExpressionToActionElement extends ASTNodeToAbstractCodeElement {
from
src: java!InfixExpression
to
tgt: kdm!ActionElement (
kind <- 'infix expression',
name <- src.operator.toString() ,
codeElement <- thisModule -> filterExpression(src.leftOperand),
codeElement <- thisModule -> filterExpression(src.rightOperand),
codeElement <- src.extendedOperands -> collect(e | thisModule ->
filterExpression(e)) -> flatten()
)}
Re: java2kdm.atl [message #1769609 is a reply to message #1769573] Wed, 02 August 2017 08:04 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Hi,

The Java-to-KDM transformation is not 100% complete, thus there can be some information lost from the Java model (that is complete) to the KDM one in current version.
Please feel free to complete the transformation and submit a patch you may find relevant to improve the KDM support in MoDisco.

Kind regards,


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: java2kdm.atl [message #1773041 is a reply to message #1769609] Wed, 20 September 2017 16:37 Go to previous messageGo to next message
Guisella Angulo is currently offline Guisella AnguloFriend
Messages: 17
Registered: September 2016
Junior Member
thanks,
I will to modify, the transformation rules in the link are the last version? https://opensourceprojects.eu/p/mondo/itmfactorybenchmark/ci/9e5b7d7ee01f3645fb7f8de53652feadc327964a/tree/eu.opensourceprojects.mondo.benchmarks.itmfactory/transformations/java2kdm.atl
Thanks
Re: java2kdm.atl [message #1773047 is a reply to message #1773041] Wed, 20 September 2017 19:28 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Hello,

Yes, it seems that this is a copy of the current version of the transformation as stored on the MoDisco project Git
http://git.eclipse.org/c/modisco/org.eclipse.modisco.git/tree/org.eclipse.modisco.java.discoverer/src/org/eclipse/modisco/java/discoverer/internal/resources/transformations/javaToKdm.atl.

Kind regards


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: java2kdm.atl [message #1774682 is a reply to message #1773047] Wed, 18 October 2017 15:12 Go to previous messageGo to next message
Guisella Angulo is currently offline Guisella AnguloFriend
Messages: 17
Registered: September 2016
Junior Member
Hello,
I send the patch bug: 526229 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=526229)
Thanks.
Re: java2kdm.atl [message #1774851 is a reply to message #1774682] Fri, 20 October 2017 14:08 Go to previous message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Thanks, we are going to look to this.

--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Previous Topic:The linenumber of Source-Code in KDM
Next Topic:C/C++ Discoverer
Goto Forum:
  


Current Time: Wed Apr 24 16:54:24 GMT 2024

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

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

Back to the top