Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-dev] Ascending tree traversal with parameters and multiple rules

Hi Enrico,

first of all: Thank you, your solution worked :-)

On the details...

Am Donnerstag, den 07.04.2011, 19:38 +0200 schrieb Enrico Biermann: 
> Hello Johannes,
> 
> I am not sure I completly understand your example.
> For your TransformationUnit processing program statements you have the
> following workflow:
> 1. use "statement" of getContainer to initialize "contained" of a random
> subunit
> 2. if subunit was applied, write value of "container" of subunit to
> "statement" of getContainer

Mostly correct. Because I have > 1 rule to be applied, the counted unit
(searchContainingClassMethod) contains an independent unit
(getContainer), which contains the rules---"statement" belongs to the
counted unit while "container" and "contained" belong to the independent
unit (IU) and to every rule contained in the IU. This is due to the fact
that the counted unit only needs the actual "statement" without knowing
if its a container or not and the container/contained-processing fully
belongs to the IU and its children.

> However I don't understand your intention in the last paragraph:
> Do you want:
> a) match the "container" parameter of every rule to "statement" (I think
> you meant "statement" because the surrounding unit doesn't have a
> "container" parameter)
> -> this is possible, just provide a parametermapping for every single
> "container" to "statement" in getContainer


Yes (see above: "mostly correct), I want to match the "container"
parameter of every rule to the "container" parameter of the IU---which
worked as I created the parameter mappings in the tree based Henshin
editor ("Henshin Transformation Model Editor"). When I used the Henshin
GUI-Editor, he only let me create one single "output" mapping from a
rule parameter to the IU parameter and deleted it, if i created a second
one. Probably a bug? I could try to produce a minimal example to
reproduce this behaviour, if needed.

Again, thanks for the help!

Regards,
Johannes




Back to the top