An API for generic constraints (1)
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
- unresolved references
- duplicate definitions
- duplicate definitions
- duplicate definitions with same property
- duplicate definitions with similar property (e.g. modulo sub typing)
- 2 and 3 with multiple properties, e.g. parameter types and return type
- 2, 3, and 4 with outer scopes
- hiding
- 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
Issue Log
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.
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