#include "nusmv/core/compile/type_checking/checkers/CheckerBase.h"
#include "nusmv/core/node/node.h"
#include "nusmv/core/opt/opt.h"
Go to the source code of this file.
typedef boolean(* TypeCheckingViolationHandler_ptr)(CheckerBase_ptr checker, TypeSystemViolation violation, node_ptr expression) |
The type of a type violation handler function.
The violation handler function is invoked when an expression being checked violates the type system.
The violation function takes as parameters the checker it is begin called, a kind of the type system violation (see TypeSystemViolation), and the expression where this violation has been detected. The function returns a boolean value indicating whether the given kind of violation should be considered as an error, i.e. the type checking has to terminate. So, if the violation handler returns false, the type checking will try to continue.
In the case of violations related to the incorrectly formed types, the input expression should be CONS with the variable name (the problematic type belongs to) as the left child and the type's body as the left child. The line info of this expression should be correct (suitable for error messages).
NB: Not all kinds of type system violation may be ignored.
enum TypeSystemViolation |
The private interface of the checkers sub-package.
A set of constants, each of which identifies particular kinds of possible type system violations. These constants are one of the parameters passed to a violation handler when a type system violation is encountered. Depending on the kind of the type violation, the violation handler will output an error or warning message or possibly ignore the violation.
boolean TypeSystemViolation_is_valid | ( | TypeSystemViolation | violation | ) |
Returns true iff given violation number is supported by the system.