Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Overlapping guards give unpredictable behaviour(The order-based priority is not honored)
Overlapping guards give unpredictable behaviour [message #1468243] Mon, 10 November 2014 17:50
Elie Richa is currently offline Elie RichaFriend
Messages: 1
Registered: November 2014
Location: Paris, France
Junior Member

I've encountered this error and have reported on bugzilla a while ago, but I'm not sure it got anyone's attention there so I'm reposting a summary here.

I'm also attaching what I hope to be a bugfix to the Acceleo engine.

In the following example,

[template public generate(...) ? (A())]
[template public generate(...) ? (B())]
[template public generate(...)]

It sometimes happens that the unguarded version is executed even though A() or B() evaluate to true. So the order-based priority of templates is not preserved in the evaluation.

I do not have a reproducer since the error shows up only every once in a while. However I think I have found the bug in the Acceleo engine in

This class is supposed to provide a CompactLinkedHashSet which preserves the order of insertion of elements. Instead, it provides a CompactHashSet which does not preserve the order of insertion, yielding the unpredictable behavior.

Can an Acceleo developer take a look at the problem and hopefully include the fix in the upcoming release?


Elie Richa
  • Attachment: bugfix.patch
    (Size: 1.80KB, Downloaded 235 times)
Previous Topic:Acceleo
Next Topic:[ACCELEO] Problem with casting
Goto Forum:

Current Time: Sat Feb 24 07:24:39 GMT 2024

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

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

Back to the top