GrammaticalFramework/gf-core

Canonical GF may include references to undefined parameters

johnjcamilleri opened this issue · 1 comments

Sometimes in canonical GF, an unused parameter is removed from the param definitions but still referred to elsewhere.
Example discovered in PhrasebookBul.gf:

$ gf --batch --output-format=canonical_gf PhrasebookBul.gf
Writing canonical/Phrasebook.gf...
Writing canonical/PhrasebookBul.gf...

$ gf --batch canonical/PhrasebookBul.gf 
- compiling canonical/Phrasebook.gf...   write file canonical/Phrasebook.gfo
- compiling canonical/PhrasebookBul.gf... 
canonical/PhrasebookBul.gf:245703-245727:
  Happened in the renaming of Zoo
   constant not found: ResBul_Pref
   given PhrasebookBul
...

The parameter-cleaning code is probably slightly too enthusiastic.

Turns out this is a special case of #101