[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [henshin-user] How to easily increment (add 1 to) a parameter?
- From: "S. John" <stefan.john@xxxxxxxxxxxxxx>
- Date: Mon, 30 Jul 2018 09:52:51 +0200
- Delivered-to: email@example.com
- User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0
as Steffen already said, doing increments is not a strength of Henshin.
The way you are doing this is the best workaround I know.
However, if you don't want to abuse elements of your current models you
could use the Henshin Trace model and its name attribute as supplement.
Obviously, in that case you might need to parse the EString of the name
On 26.07.2018 15:35, Benjamin Heidelmeier wrote:
Dear Henshin Users,
in the process of creating a set of Henshin Units and Rules I stumbled
upon a task, which ideally should be easy to deal with: I want to
increment an integer parameter. I attached an image of the units and
rules I set up to do this. It feels very bloated if you consider the
only thing which should be done is incrementing a parameter.
The attached image shows the unit incrementHour which takes the IN
parameter "hour" and outputs the OUT parameter "oneMore" which is
hour+1. The object Temp you can see in the rules exists for the sole
purpose to make incrementing possible. It has one attribute "tempInt" of
type EInt, which temporarily stores the parameter value that is going to
Do you have any idea how to do this "better"? E.g. one of the following
- less rules/units,
- without an instance object,
- or whatever you consider smarter
I would be happy to hear any suggestions from you.
henshin-user mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit