Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-dev] Migration and tests

Hi Felix,

1) a floating-point literal is fine. The expression is evaluated by the scriptengine which does not distiguinsh between different kinds of numeric datatypes. If you want the result to be an integer literal you need to convert the sum of the parameters accordingly: (p1+p2).toFixed(0)

2) Well, PriorityUnits are existentially quantified, while SequentialUnits are universally quantified, meaning that for a PriorityUnit there must exist an applicable subUnit and for a SequentialUnit all subUnits must be applicable. Naturally an universally quantified statement is satisfied for an empty domain. An existentially quantified statement requires the existance of something and therefore can not be satisfied for an empty domain. So the semantics for PriorityUnits and SequentialUnits make sense the way they are. Think of an IndependentUnit as a randomizing proxy. The subUnits are potential targets and you always know that it will delegate to exactly one of them, you just never know which it will be. A proxy without a target is simply invalid. So there has to be at least one.

Regards,
Gregor

Am 22.01.2012 19:46, schrieb Riegerf@xxxxxxxxxxxxxxxxxxxxxxx:
Hi everyone,

I carried out some tests using the MultiRule interpreter, the model in the model2011 branch and the migration and tests from the 2010to2011migration branch. The tests work after some very minor adjustments. However, some of them will still fail due to previously unexpected behavior, which should be fixed before the release (either by fixing the interpreter or by changing the tests): 1) testParameterComposition2 tests parameter composition. For this, two integers are added in an attribute of type String. As they are integers, I expected to get an integer literal in the string as the result. However, this is not the case (the result is a floating-point literal).
What's the expected behavior here?
2) Empty IndependentUnits and empty PriorityUnits can not be executed (they return false), while empty SequentialUnits can. We should either make this consistent or explain the reason for this inconsistency.

The migration works just fine with these settings, so I will just integrate it in the trunk as soon as possible.

Felix

_______________________________________________
henshin-dev mailing list
henshin-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/henshin-dev




Back to the top