BaseStmtRanges Class ReferenceAbstract collection of ranges for a single statement.
More...
#include <BaseStmtRanges.h>
Inheritance diagram for BaseStmtRanges:
[legend]List of all members.
Detailed Description
Abstract collection of ranges for a single statement.
Polaris Range - See also:
- BaseStmtRanges.h
BaseStmtRanges.h
BaseStmtRanges.cc
A BaseStmtRanges object is a collection of ranges for each program variable for a single statement. This class is abstract in that it doesn't actually describe how these ranges are stored.
This object holds all the ranges of a single statement. However, the data structures that hold these ranges are not provided. The user must create a subclass that holds these ranges as well as provide the interfaces to these data structures, (i.e, get_range_ref(), etc.).
Several methods have been provided to aid the computation of ranges in a ProgramUnit. The method extract_ranges() will extract all the ranges that can be determined from a logical expression and intersect (AND) these ranges with the ranges in the BaseStmtRanges. The method union_constriants() unions (ORs) the ranges of two BaseStmtRangess. The method subst_in_ranges() can be used to replace all accesses of a certain variable in all ranges with some other value. This method is useful for handling variable modifications by statements. Finally, a set of low level methods are provided for accessing and modifying individual ranges in a BaseStmtRanges.
Definition at line 50 of file BaseStmtRanges.h.
Constructor & Destructor Documentation
| BaseStmtRanges::BaseStmtRanges |
( |
const Symtab & |
symtab |
) |
|
|
Member Function Documentation
| void BaseStmtRanges::extract_ranges |
( |
const Expression & |
expr, |
|
|
bool |
complement_expr = false |
|
) |
|
|
|
|
Extract all possible ranges from the given logical expression and intersect these ranges with the current constraints.
The given expression must be a logical expression (i.e. made up of relation and .AND., .OR., and .NOT. operators) or it will be ignored. If complement_expr is true, this method will extract the ranges from the complement of this expression.
Referenced by _update_do_succs(), and _update_if_succs(). |
| void BaseStmtRanges::subst_in_ranges |
( |
const Symbol & |
var, |
|
|
const Expression * |
subst_expr |
|
) |
|
|
| int BaseStmtRanges::operator== |
( |
const BaseStmtRanges & |
other |
) |
const [virtual] |
|
| int BaseStmtRanges::operator!= |
( |
const BaseStmtRanges & |
other |
) |
const [virtual] |
|
| void BaseStmtRanges::widen_range |
( |
const Symbol & |
var, |
|
|
const Expression & |
range |
|
) |
|
|
| void BaseStmtRanges::narrow_range |
( |
const Symbol & |
var, |
|
|
const Expression & |
range |
|
) |
|
|
| const Expression * BaseStmtRanges::get_range_ref |
( |
const Symbol & |
var |
) |
[virtual] |
|
| virtual int BaseStmtRanges::entries |
( |
|
) |
const [pure virtual] |
|
| virtual void BaseStmtRanges::clear |
( |
|
) |
[pure virtual] |
|
| virtual RefSet<Symbol>* BaseStmtRanges::range_vars |
( |
|
) |
const [pure virtual] |
|
| void BaseStmtRanges::print |
( |
ostream & |
out |
) |
const [virtual] |
|
| void BaseStmtRanges::pretty_print |
( |
ostream & |
out |
) |
const |
|
| int BaseStmtRanges::structures_OK |
( |
|
) |
const [virtual] |
|
| virtual const Expression* BaseStmtRanges::_get_range_ref_c |
( |
const Symbol & |
var |
) |
const [protected, pure virtual] |
|
The documentation for this class was generated from the following files:
|