[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| [henshin-user] Error processing attribute update | 
Hi all,
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)
    at 
org.eclipse.emf.henshin.interpreter.info.VariableInfo.createConstraints(VariableInfo.java:189)
    at 
org.eclipse.emf.henshin.interpreter.info.VariableInfo.createVariables(VariableInfo.java:111)
    at 
org.eclipse.emf.henshin.interpreter.info.VariableInfo.<init>(VariableInfo.java:77)
    at 
org.eclipse.emf.henshin.interpreter.info.RuleInfo.<init>(RuleInfo.java:26)
    at 
org.eclipse.emf.henshin.interpreter.impl.EngineImpl.getRuleInfo(EngineImpl.java:748)
    at 
org.eclipse.emf.henshin.interpreter.impl.EngineImpl$MatchFinder.<init>(EngineImpl.java:323)
    at 
org.eclipse.emf.henshin.interpreter.impl.EngineImpl$MatchGenerator.iterator(EngineImpl.java:268)
    at 
org.eclipse.emf.henshin.interpreter.impl.RuleApplicationImpl.execute(RuleApplicationImpl.java:89)
    at 
org.eclipse.emf.henshin.interpreter.impl.UnitApplicationImpl.executeRule(UnitApplicationImpl.java:175)
    at 
org.eclipse.emf.henshin.interpreter.impl.UnitApplicationImpl.doExecute(UnitApplicationImpl.java:99)
    at 
org.eclipse.emf.henshin.interpreter.impl.UnitApplicationImpl.execute(UnitApplicationImpl.java:89)
...
Shouldn't this variable be made available by Henshin and be made to 
contain the old attribute value?
What's going on here?
Many thanks,
Steffen
--
Dr. rer. nat. Steffen Zschaler AHEA
Senior Lecturer
King's College London
Department of Informatics
Email szschaler@xxxxxxx
Phone +44 (020) 7848 1513
WWW   http://www.steffen-zschaler.de/