[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-user] Sequential unit non strict behaviour

Hello Pierre-Yves,

I just had a look at the code for executing sequential units. It's on lines 213-238 in [1]. The behavior there precisely matches your observation: If a subunit fails, the else-branch in Line 226 is reached, which ends with a "break" in Line 233 -Â causing the for-loop to be exited without executing the remaining sub-units.

I acknowledge that this behavior contradicts the documentation in the Wiki [2]. So it's either a bug in the implementation or in the documentation. I do think it's an implementation bug: With the current implementation, the only difference between "strict, without rollback" and "non-strict" mode is the boolean return value of the execution, while the behavior is the same. This seems counterintuitive.

So my proposal is that I will align the implementation with the documentation by removing the "break" statement in Line 233.

Before doing this in the next days, I cross-post this e-mail to the dev-list to see if there are any concerns.

[1] http://git.eclipse.org/c/henshin/org.eclipse.emft.henshin.git/tree/plugins/org.eclipse.emf.henshin.interpreter/src/org/eclipse/emf/henshin/interpreter/impl/UnitApplicationImpl.java?h=R140
[2] at https://wiki.eclipse.org/Henshin/Transformation_Meta-Model#Control_flow:_Units

Best regards,

On 06.02.2018 18:27, py.schmerber wrote:
Hello again Henshin users,
The current behaviour of the sequential unit in non strict mode feels strange to me.
The unit stops at the first subunit in failure, without starting the remaining subunits as I expected from the wiki documentation page.
Is it an unlisted bug or my misunderstanding of the documentation?
Best regards,
Pierre-Yves Schmerber

henshin-user mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit