Term attachments missing
Some terms do not have an ast-index (during custom-analysis).
Input program:
module debug model entity Node{} relation Node.a 1 <-> Node.be data n:Node{ be=n }
Console output:
18:18 | INFO | stderr - The following terms do not have an nabl2 attachment ["Node","be","n"] 18:18 | INFO | stderr - missing nabl2 attachments
Ast attachments code check:
check-nabl2-attachments = where(collect-all(is-string);(map(nabl2--get-ast-index) <+ filter(not(nabl2--get-ast-index)); debug(!"The following terms do not have an nabl2 attachment ");fail)) nabl2--get-ast-index = fail //is an internal nabl2 strategy
IceDust version:
https://github.com/MetaBorgCube/IceDust/tree/58d9a18cb400778b81434b91a3f921e2f9173e21Spoofax version:
Submitted by Daco Harkes on 18 January 2017 at 18:23Eclipse: org.eclipse.platform.ide 4.6.2.M20161124-1400 Spoofax: org.metaborg.spoofax.eclipse 2.2.0.20170118-154836-master System: Mac OS X x86_64 10.12.2
Issue Log
For some reason the attachments missing are exactly the things in the data section in this example:
module debug model entity Node { } relation Node.a 1 <-> Node.be data n : Node { be = n } execute n.be 1 + 1
Console output:
18:39 | INFO | stderr - The following terms do not have an nabl2 attachment ["n","Node","be","n"]
Idem in other examples, for example:
https://github.com/MetaBorgCube/IceDust/blob/174516c16825d4d2c1275b0dd8ebcad80257d650/icedust2.example/incometax/incometax.ice2
Well, this was a traversal exploding and imploding terms, which includes exploding and imploding strings.
This issue can be closed. (Though creating new terms in desugarings should be possible. I made a new issue for this: https://yellowgrass.org/issue/NaBL2/26)
I pushed a fix for issue 26, so this should be resolved.
Log in to post comments