Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

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.

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 range of a variable.

range_t getDeclaredRange (symbol_t symbol) const
 Returns the range of a symbol.


Protected Member Functions

bool isInteger (expression_t) const
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


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

RangeChecker::RangeChecker TimedAutomataSystem  ) 
 

RangeChecker::RangeChecker TimedAutomataSystem ,
const process_t
 


Member Function Documentation

bool UTAP::RangeChecker::evaluate expression_t  expr,
int32_t &  value
const [protected]
 

range_t RangeChecker::getDeclaredRange symbol_t  symbol  )  const
 

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.

range_t RangeChecker::getDeclaredRange expression_t  expr  )  const
 

Returns the range of a variable.

The argument must be an expression referring to a variable.

range_t RangeChecker::getRange expression_t  expr  )  const
 

Returns the range of an expression taking the current mapping into account.

bool RangeChecker::isInteger expression_t   )  const [protected]
 

range_t RangeChecker::rangeOfBinary expression_t  left,
uint32_t  op,
expression_t  right
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 doxygen 1.3.7