The fully resolved abstract syntax tree (AST) representation of the constraint language.
The interfaces in this package specify what a fully resolved representation of a rule file looks
like.
The package specifies no implementation. In order to obtain an AST instance, use
a concrete implementation, for example using the public classes in the 'antlr' subpackage.
The main interface here is IRuleFile. In order to get to a fully resolved
implementation of this class, a number of steps have to be performed:
- An NRL file has to be parsed, into an AST representation that is specific to
a parser, for example an ANTLR AST.
- The textual cross-references in the parsed AST, for example references to properties,
have to be resolved into proper object cross-references in the AST. This means
that when we come across a "property application", we can directly look up the
referenced property instead of retrieving its name and performing a look-up.
- An underlying model has to be loaded, and the AST has to be resolved against it. After this
step, it is possible to navigate from element references within rules directly to
model elements.
- Additional static semantic checks are performed.
If any of the above steps fail, the AST is unsafe and has to be discarded.
For this reason, during all of the above steps, SyntaxError
and
SemanticError
entries are collected.