The NaBL generator emits incorrect (does not compile) code for the following NaBL specification:

  Assign(_, _, e, _):
    implicitly defines Variable "_"
      in e

Emits:

  nabl-external-def-site(|partition__) =
    ?Assign(_, _, e, _)
    ; origin-track-forced(
        Assign(id, id, nabl-def-alias(|partition__, uri__), id)
      |
      )

Where variable uri__ is not bound. Leaving out the scope part (i.e. without in e) emits correct code.

Submitted by Vlad Vergu on 8 January 2014 at 13:57


On 9 January 2014 at 23:18 Guido Wachsmuth closed this issue.

On 10 January 2014 at 12:07 Vlad Vergu reopened this issue.

On 10 January 2014 at 12:11 Vlad Vergu commented:

This doesn’t work for me yet. It compiles fine but it breaks at runtime. It actually breaks a few extra things. All defines N n in t are broken in the sense that for no such definition does a reference to n in t actually resolve. I.e. i get only Unresolved reference. This happens for all defines in ... and implicitly defines in ....


On 10 January 2014 at 12:11 Vlad Vergu tagged major

On 10 January 2014 at 12:11 Vlad Vergu tagged @guwac

On 14 January 2014 at 11:30 Guido Wachsmuth commented:

After some analysis, I found the issue.

  1. The scope of the definition is correctly annotated with an anonymous scope.
  2. The definition is correctly created in another anonymous scope (in the root scope).
  3. The alias from the name in the first scope to the actual definition is missing.

On 14 January 2014 at 13:25 Guido Wachsmuth commented:

Ok, the missing alias was caused by a name collision for uri__, which is used to pass a dictionary for URIs around and was now used to store the URI of the definition. This is fixed now.

However, implicit definitions in external scopes still produce uncompilable code, since they need to retrieve def-uri__ from an implicit definition.


On 14 January 2014 at 16:22 Vlad Vergu commented:

Thank you. Problem fixed!


On 14 January 2014 at 16:22 Vlad Vergu closed this issue.

Log in to post comments