#include <rangechecker.hh>
Public Member Functions | |
RangeChecker (TimedAutomataSystem *) | |
RangeChecker (TimedAutomataSystem *, const process_t &) | |
range_t | getRange (expression_t) const |
Returns the range of an expression taking the current mapping into account. | |
range_t | getDeclaredRange (expression_t expr) const |
Returns the declared range of a variable. | |
range_t | getDeclaredRange (symbol_t symbol) const |
Returns the declared range of a variable. | |
Protected Member Functions | |
range_t | getRange (symbol_t symbol) const |
Returns the range of a symbol taking the current mapping into account. | |
range_t | rangeOfBinary (expression_t, uint32_t op, expression_t) const |
Returns the range of a binary expression. | |
bool | evaluate (expression_t expr, int32_t &value) const |
For both situations the result might depend on the process context, e.g. a template parameter might be used in the expression or might have been used in the range declaration of an integer variable. So in these cases it is important to provide the process in which the expression should be evaluated.
For constant expressions, the actual value of the expression is returned. If the expression cannot be evaluated (it is not constant), then a range is computed based on the declared ranges of variables used in the expression (and on the values of any constants used).
|
|
|
|
|
|
|
Returns the declared range of a variable. The argument must be the symbol of a variable. The range returned is the declared range of that variable, which might depend on the current mapping. |
|
Returns the declared range of a variable. The argument must be an expression referring to a variable. The range returned is the declared range of that variable, which might depend on the current mapping. |
|
Returns the range of an expression taking the current mapping into account.
|
|
Returns the range of a symbol taking the current mapping into account.
|
|
Returns the range of a binary expression.
|