When I generate stratego-core from a stratego file, the output does not contain all subtype constraints of the original file. Here is the compilation command I used:

java -Xms512m -Xmx1024m -Xss16m -jar strategoxt.jar --lib -F -i go2js.str > go2js.aterm

The file go2js.str contains the subtype constraints such as

: Function -> FunOrSig
: FunctionSignature -> FunOrSig

All subtype constraints are removed in go2js.aterm.

Submitted by Sven Keidel on 18 May 2017 at 09:09
go2jspp.aterm18 May 2017 at 09:10
go2js-desugared.str18 May 2017 at 09:10

On 18 May 2017 at 09:59 Sven Keidel commented:

If I compile with --ast, it includes the full type signature, but does not desugar the rules and strategies to core.

On 18 May 2017 at 10:05 Gabriƫl Konat commented:

I was confused for a moment about subtype constraints. We call these signatures, and these signature specifically are called injections. The compiler may perform some optimizations that remove unused signatures. What if you call the compiler with flag -O 0 to disable optimisations?

On 18 May 2017 at 11:25 Sven Keidel commented:

Sorry for the confusion. I tried to to compile with -O 0, same effect. In any case, I found a solution. I extract the signature from the result of compiling with --ast and extract the core code of the strategies from the result of compiling with -F. That works.

On 19 May 2017 at 08:31 Sven Keidel commented:


On 19 May 2017 at 08:31 Sven Keidel closed this issue.

Log in to post comments