UTAP::RangeChecker Class Reference
A RangeChecker object is an oracle for predicting ranges of integer expressions and declared ranges of symbols.
More...
#include <rangechecker.hh>
List of all members.
Detailed Description
A RangeChecker object is an oracle for predicting ranges of integer expressions and declared ranges of symbols.
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).
Constructor & Destructor Documentation
Member Function Documentation
bool UTAP::RangeChecker::evaluate |
( |
expression_t |
expr, |
|
|
int32_t & |
value |
|
) |
const [protected] |
|
|
Returns the range of a symbol.
If the symbol is a constant value, then this value is returned. Otherwise the declared range is returned. The function substitutes formal parameters with actual arguments before computing the range. In case of arrays, the range of the base type is returned. |
|
Returns the range of a variable.
The argument must be an expression referring to a variable. |
|
Returns the range of an expression taking the current mapping into account.
|
bool RangeChecker::isInteger |
( |
expression_t |
|
) |
const [protected] |
|
|
Returns the range of a binary expression.
|
The documentation for this class was generated from the following files:
Generated on Sat May 15 12:33:42 2004 for libutap by
1.3.7