Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-dev] Specifying out parameters

Hi Subramanya,

there is no specific syntax for in/out parameters. Whether a parameter is input and/or output depends on how the unit/rule is used. For example, consider you have a rule with a parameter "x" which should be equal to a "name" attribute of a node in the rule. If you assign a value to this parameter before the rule application, the rule will find the node with this name. In this scenario it is basically an input scenario. If you do not specify a value the rule will match all corresponding nodes and essentially produce all possible values of names as outputs.

If you are using the graphical editor, the parameter passing is defined by the name of parameters. Say the first rule has a parameter "x". If you want to pass it to the third rule, simply call the parameter of the third rule also "x". In the tree-based editor you have a more fine-grained control. There the parameter passing is modeled using ParameterMappings. Maybe it helps if you play around with it in the graphical editor and then open the *.henshin file to see the model that is been produced. 

Cheers,
Christian



2013/8/26 Subramanya K G <subramanya.kg@xxxxxxxxx>
Hello All,

I am creating few henshin rules and I have encountered a problem.

I have read that I can specify a parameter as out parameter and can be passed to other rules which are in the sequential unit. But can any one say how can I pass a parameter whose value was created in first rule and pass it to other rule. (what is the syntax for out parameter.)



--


Thanks & Regards,
Subramanya


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



Back to the top