difference in semantics between interpreted and compiled-to-Java Stratego code
I found that the following piece of Stratego code works fine when it is run from the .ctree file and fails when it is compiled to Java:
elem : String -> X
fetch-elem(|name) = fetch(?x@elem(name)); !x
t -> None()
!" when given one element, fetch-elem works as expected",
!" when given two elements, fetch-elem works as expected",
The first test succeeds both in the .ctree and .jar cases, the second test succeeds in the .ctree case and fails in the .jar case (fetch-elem strategy fails).
Initially I thought it might have to do with string sharing, but the first test seems to exclude that.
Tested with Spoofax 0.6.0.2.Submitted by Tobi Vollebregt on 5 January 2011 at 11:28