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

used in:
https://github.com/MetaBorgCube/IceDust/blob/58d9a18cb400778b81434b91a3f921e2f9173e21/icedust2/trans/analysis2/analysis2.str#L43-L47

IceDust version:
https://github.com/MetaBorgCube/IceDust/tree/58d9a18cb400778b81434b91a3f921e2f9173e21

Spoofax version:

Eclipse: 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
Submitted by Daco Harkes on 18 January 2017 at 18:23

On 18 January 2017 at 18:42 Daco Harkes commented:

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


On 18 January 2017 at 19:06 Daco Harkes commented:

Well, this was a traversal exploding and imploding terms, which includes exploding and imploding strings.


On 18 January 2017 at 19:28 Daco Harkes commented:

This issue can be closed. (Though creating new terms in desugarings should be possible. I made a new issue for this: http://yellowgrass.org/issue/NaBL2/26)


On 19 January 2017 at 03:00 Hendrik van Antwerpen commented:

I pushed a fix for issue 26, so this should be resolved.


On 19 January 2017 at 03:00 Hendrik van Antwerpen closed this issue.

Log in to post comments