When inventing terms (strings) during desugaring, they do not have a NaBL2 attachment.

Before desugaring:

module debug

  model
    entity Student {
    }
    entity Course { }
    relation Enrollment {
      Student *
      Course *
      
      course.students <-> student.courses
    }

After desugaring:

module debug

model

  entity Student {
  }

  entity Course {
  }

  relation Enrollment {
    Student.enrollment *(unordered) -> student
    Course.enrollment *(unordered) -> course
    course.students <-> student.courses
  }

Error if processing non-desugared example:

19:19 | INFO  | stderr                         - The following terms do not have an nabl2 attachment ["enrollment","student","enrollment","course"]

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 19:20

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

Suggested fix: add attachments to AST nodes after desugaring, rather than before.


On 19 January 2017 at 02:53 Hendrik van Antwerpen commented:

Attaching indices are already being attached after desugaring. I think the problem is that custom analysis was passed the original AST instead of the desugared one. I've pushed a small fix that passes the desugared to custom analysis, so I expect that should fix this.

I'm closing this for now, but please reopen if the issue is not solved by the next build.


On 19 January 2017 at 02:53 Hendrik van Antwerpen closed this issue.

Log in to post comments