Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-user] Error processing attribute update

hi,

I haven't used Henshin much before, so this may well be a simple
beginner's error. Unfortunately, the error message I am provided with
isn't awfully helpful and I couldn't figure out what's going on.

I have created a simple transformation using the Henshin diagram editor.
This moves one object from one place to another and updates some
attributes. To express attribute updates, I have used the -> notation as
shown in the Bank tutorial. So, one of the attributes reads
"spaceRemaining=x->x+a.spaceRequired*a.quantity" where "a" refers to a
different node in my rule, which has the attributes mentioned.

> When I run this rule on a model, it is matched (as I would expect), but
> I get the following error:
>> java.lang.RuntimeException: ReferenceError: "x" is not defined in
>> <eval> at line number 1
>>     at
>> org.eclipse.emf.henshin.interpreter.impl.EngineImpl.evalAttributeExpression(EngineImpl.java:946)
>>

please add screenshots in the future, this helps to pinpoint problems.

My assumption based on your description is that you do not have added x as a parameter to the rule.

See the bank example (Rule transferMoney)

https://www.eclipse.org/henshin/examples.php?example=bank

Cheers,

Matthias


--
Prof. Dr. Matthias Tichy
Institute of Software Engineering and Compiler Construction
Faculty of Engineering, Computer Science and Psychology
University of Ulm
89069 Ulm, Germany

Tel.:  +49 731 50-24160
Fax:   +49 731 50-24162
email: matthias.tichy@xxxxxxxxxx

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


Back to the top