metaborg / nabl

Spoofax' Name Binding Language
Apache License 2.0
7 stars 12 forks source link

Double name qualification #82

Open AZWN opened 2 years ago

AZWN commented 2 years ago

Bug description Statix qualifies qualified initial constraint names twice.

Versions Spoofax version: Spoofax 3, 0.16

Steps to reproduce the behavior

  1. In a new project with single-file analysis, move the main statics file to src/statics/statics.stx
  2. In analysis.str, call statix with editor-analyze = stx-editor-analyze(pre-analyze, post-analyze|"statics/statics", "statics/statics!programOk").
  3. Open an arbitrary example file.

Observed behavior A error statics/statics!statics/programOk(Program([FuncDef2Definition(…)],[IfElse(…,…,…)])). The error is caused by incorrect name qualification (statics after !).

Expected behavior Correct initial constraint (statics/statics!programOk) called by statix runtime.

Additional context

Workaround: use unqualified predicate names, such as editor-analyze = stx-editor-analyze(pre-analyze, post-analyze|"statics/statics", "programOk").