Currently, the most common constraint (duplicate definitions) is hard coded and integrated into the collection of definitions. I prefer a separate consideration of such constraints. This means, for now, these constraints should be expressed explicitly.

An API which supports task creation for common constraints can help here. We need at least checks for

  1. unresolved references
  2. duplicate definitions
    1. duplicate definitions
    2. duplicate definitions with same property
    3. duplicate definitions with similar property (e.g. modulo sub typing)
    4. 2 and 3 with multiple properties, e.g. parameter types and return type
    5. 2, 3, and 4 with outer scopes
  3. hiding
  4. ambiguity (multiple unique defs for a use)

In a next step, we can add a constraint section to NaBL’s concrete syntax.

Submitted by Guido Wachsmuth on 24 July 2013 at 00:53

On 24 July 2013 at 00:53 Guido Wachsmuth tagged !guwac

On 24 July 2013 at 01:01 Gabriël Konat commented:

I think the most common constrain is the unresolved constraint. There are already some tasks for producing these errors here: https://github.com/metaborg/runtime-libraries/blob/master/org.spoofax.meta.runtime.libraries/nbl/check.str, they can be modified to require explicit calls.


On 24 July 2013 at 01:12 Guido Wachsmuth commented:

Great. So this is the place to add more from the list above. The issue should be closed, if we cover this list, and reopened, if we need more.

Log in to post comments