Skip to main content



      Home
Home » Modeling » M2T (model-to-text transformation) » [Acceleo] Duplicate query/operation detection, bug?
[Acceleo] Duplicate query/operation detection, bug? [message #1752181] Thu, 19 January 2017 08:45 Go to next message
Eclipse UserFriend
Hi,

I'm working on a project that uses Acceleo 3.6.3 in Eclipse Mars.2 for generating C++ code. I came across a rather hard to find issue in our generator, that was caused by the accidental presence of duplicate operations.

I'm trying to understand how it is intended to work, so that I can avoid or detect the problem in the future.

An operation with this exact signature is embedded in Ecore, why is the following not flagged as an illegal duplicate of the embedded operation?
[query public isSuperTypeOf(someClass : EClass) : EBoolean = false /]

Should I file a bug for this?

EClassifier is a super type of EClass. Should adding the following query result in a warning? (or maybe should it even be illegal?)
[query public isSuperTypeOf(someClass : EClassifier) : EBoolean = false /]


If templates with these kinds of "duplicates" are in fact correct, how does the Acceleo interpreter decide which of the three available matching queries is invoked in the following case?
[anEClass.isSuperTypeOf(anEClass) /]


Greetings,
Jelle
Re: [Acceleo] Duplicate query/operation detection, bug? [message #1753530 is a reply to message #1752181] Tue, 07 February 2017 09:20 Go to previous message
Eclipse UserFriend
Hi,

I've added a bug report for the first question at: https://bugs.eclipse.org/bugs/show_bug.cgi?id=511837.

From the Acceleo interpreter code it looks like the second query is allowed by design. It looks like an ordering is attempted according to the inheritance relation of the parameters, such that the most specific version of the query that applies is tried first.

Greetings,
Jelle

[Updated on: Tue, 07 February 2017 09:40] by Moderator

Previous Topic:Operation Setereotype -> get Value
Next Topic:[Acceleo] Parse multiple models of 1 metamodel
Goto Forum:
  


Current Time: Thu Aug 28 03:35:32 EDT 2025

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

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

Back to the top