|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ITypeChecker
A type checker traverses an AST and assigns a data type to every node. After
the traversal is complete,
IConstraint.getNRLDataType()
for a
constraint will return its type.
The traveral method also returns a collection
SemanticError
objects in case of any type
checking errors.
Use:
check(IOperators)
to check operator files - this should be done
before checking the rule files the operators are used in
check(IRuleFile)
to check rule files
CAUTION: The checker relies on the AST being in absolute order. If any resolver or model resolver errors occurred previously, the type checker must not be used.
Method Summary | |
---|---|
void |
addTypeMapping(ITypeMapping mapping)
Add a type mapping for the checker to map model types to abstract internal types. |
List<NRLError> |
check(IOperators operators)
Type check an operator collection. |
List<NRLError> |
check(IRuleFile ruleFile)
Type check a rule file and assign a type to all constraints. |
Method Detail |
---|
void addTypeMapping(ITypeMapping mapping)
mapping
- the mappingList<NRLError> check(IRuleFile ruleFile)
ruleFile
- the rule file to check
List<NRLError> check(IOperators operators)
operators
- the operators to check
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |