| Hi,
 my guess would be the same as the one by Matthias.
 
 These kind of errors, related to parameter use, seem to occur
      frequently. Recently, we discussed an error related to parameter
      names conflicting with certain Java keywords (such as "new"). The
      error message in this case was cryptic as well and, in addition,
      only occurred at runtime.
 
 I think we could detect such errors statically to show meaningful
      error messages right during editing. Would you all agree that it
      makes sense to add a check for correct parameter use (all
      parameters are defined, no keywords used as names) in the
      validator class?
 
 Regards,
 Daniel
 
 Am 11.03.2016 um 16:22 schrieb Matthias Tichy:
 
 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
 
 
 
 
 
 _______________________________________________
henshin-user mailing list
henshin-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/henshin-user
 
 
 -- 
Dr. rer. nat. Daniel Strüber, Dipl.-Inf.
Software Engineering Research Group
Philipps-Universität Marburg, Germany
 |