Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-dev] Semantics of multi-object creation in a rule

Hi Zille,

it depends on the specific example. For instance if you match two nodes a:A and b:B both with <<preserve*>> and then draw a link between them with <<create*>> it will create for every pair of a's and b' such a link. In this case, it is indeed the Cartesian product.

In general it is like this: the multi-rule is applied for every found match. If you have a rule with a single node of action <<create*>> (and nothing else) in the underlying model you have an empty LHS. There is exactly one match for this LHS, i.e. the empty match. Therefore, I would expect that the application of this rule will create exactly one object (though I have not tested it).

Hope this helps.

Cheers,
Christian




2014-03-06 10:50 GMT+01:00 Zille Huma <zille.huma@xxxxxx>:
Hi all,

During my work with the rules with multi-objects, I came across this problem and I would highly appreciate if someone could explain how this is handled in henshin. It is about the multi-object (universal quantified) in a rule.

As far as i understand, if a rule specifies deletion or preservation of multi-objects, it can be applied through the concept of parallel transformations in henshin. But how does henshin handle the case, if the rule specifies creation of multi-objects. What is the semantic interpretation of such a creation? the creation of a  link for the newly created multi-object means a link to every object in the set or to the whole as a collection? How are the links between multiple multi-objects interpreted? is it a single link or a cartesian product of the objects in the both the sets are linked with each other?

Best,
Zille

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


Back to the top