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 152 times)
Previous Topic:Re: Run-time errors in queries and templates
Next Topic:Maven plugin difficulties
Goto Forum:

Current Time: Sat Mar 24 18:13:39 GMT 2018

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

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