When I call a primitive like this prim("SPX_interpreter_introspect_strategies", strat*), it triggers an internal compiler error:


compile-to-ctree:
[exec] [ strc | info ] Compiling ‘src/main/stratego/spoofax/interpreter/frontend.str’
[exec] error: cannot type ListVar(““)
[exec] inferred types of subterms:
[exec] typed "" as EmptyId, ID, UCID, LCID, Id, ModName, String, Real, Int,
[exec] [ strc | info ] abstract syntax in ‘target/share/frontend.sci.fe-cong.Stratego-Core’
[exec] [ strc | info ] concrete syntax in ‘target/share/frontend.sci.fe-cong.Stratego-Core.txt’
[exec] [ strc | critical ] file /tmp/StrategoXTNCzOTadoes not satisfy format Stratego-Core
[exec] This indicates a bug in the compiler
[exec] Please notify stratego-bugs@cs.uu.nl
[exec] FILE(”/tmp/StrategoXTNCzOTa”)

The same code compiles fine after renaming strat* to strats.

EDIT: minimal example code that triggers the ICE:


module test
strategies
main = ?x*; prim(“bar”, x*)


$ strc -i test.str
[ strc | info ] Compiling ‘test.str’
error: cannot type ListVar(““)
inferred types of subterms:
typed "" as EmptyId, ID, UCID, LCID, Id, ModName, String, Real, Int,
[ strc | info ] abstract syntax in ‘test.sci.fe-cong.Stratego-Core’
[ strc | info ] concrete syntax in ‘test.sci.fe-cong.Stratego-Core.txt’
[ strc | critical ] file /tmp/StrategoXTiAcuAidoes not satisfy format Stratego-Core
This indicates a bug in the compiler
Please notify stratego-bugs@cs.uu.nl
FILE(”/tmp/StrategoXTiAcuAi”)

Submitted by Tobi Vollebregt on 2 March 2012 at 13:24

On 2 March 2012 at 13:35 Lennart Kats commented:

Sounds like another missing desugaring rule.


On 2 March 2012 at 13:35 Lennart Kats tagged shell

On 2 March 2012 at 13:35 Lennart Kats tagged interpreter

On 2 March 2012 at 13:59 Tobi Vollebregt commented:

This is in the actual compiler though (strc), though indeed its probably a missing desugaring rule.


On 2 March 2012 at 14:00 Tobi Vollebregt removed tag interpreter

On 2 March 2012 at 14:01 Tobi Vollebregt removed tag shell

Log in to post comments