Polaris: ControlRangeDict Class Reference

ControlRangeDict Class Reference

file ControlRangeDict.h Collection of ranges extracted from program's control flow More...

#include <ControlRangeDict.h>

Inheritance diagram for ControlRangeDict:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 ControlRangeDict (ProgramUnit &pgm, int debug=0)
virtual ~ControlRangeDict ()
 Destructor.
virtual void print (ostream &o) const
 Print out the range dictionary.
virtual void pretty_print (ostream &o, const Statement &stmt) const
 Print out the range dictionary in a more user-readable manner.
virtual Listablelistable_clone (void) const
 listable_clone
virtual int structures_OK () const
 Methods required by Listable.

Protected Member Functions

virtual void _set_range (const Symbol &var, const Statement &stmt, Expression *range)
 Not implemented. Will p_assert if called.
virtual void _del_range (const Symbol &var, const Statement &stmt)
 Not implemented. Will p_assert if called.
virtual const Expression_get_range_ref (const Symbol &var, const Statement &stmt)
 Return the range associated with the given variable.

Detailed Description

file ControlRangeDict.h Collection of ranges extracted from program's control flow

Polaris Range

See also:
ControlRangeDict.h

ControlRangeDict.h

ControlRangeDict.cc

Overview

A ControlRangeDict object is a repository for variable ranges for a program unit. Only those ranges that originate from FORTRAN control flow statements are collected.

Description

A ControlRangeDict object is a repository of the variable ranges for all points of a program unit. These ranges are extracted from the control flow statements of the program; that is, they are taken from IF conditional tests, DO statements, and CSRD$ ASSERT statements.

The ControlRangeDict class was designed to generate variable ranges quickly, at the cost of accuracy. If one wishes a more accurate set of variable ranges, AIRangeDict should be used.

Definition at line 43 of file ControlRangeDict.h.


Constructor & Destructor Documentation

ControlRangeDict::ControlRangeDict ProgramUnit pgm,
int  debug = 0
 

ControlRangeDict::~ControlRangeDict  )  [virtual]
 

Destructor.

... nothing to do

Definition at line 653 of file ControlRangeDict.cc.


Member Function Documentation

void ControlRangeDict::print ostream &  o  )  const [virtual]
 

Print out the range dictionary.

This operation is essentially just a dump of the data structures of the range dictionary.

Implements Listable.

Definition at line 700 of file ControlRangeDict.cc.

References KeyIterator< S, T >::current_data(), KeyIterator< S, T >::current_key(), Symbol::name_ref(), and KeyIterator< S, T >::valid().

void ControlRangeDict::pretty_print ostream &  o,
const Statement stmt
const [virtual]
 

Print out the range dictionary in a more user-readable manner.

Implements RangeDict.

Definition at line 727 of file ControlRangeDict.cc.

References Iterator< T >::current(), KeyIterator< S, T >::current_key(), ProtoDatabase< S, T >::find_ref(), RefList< T >::ins_last(), pretty_print_range(), sort_sym_list(), Statement::tag(), Iterator< T >::valid(), and KeyIterator< S, T >::valid().

Listable * ControlRangeDict::listable_clone void   )  const [virtual]
 

listable_clone

Implements Listable.

Definition at line 767 of file ControlRangeDict.cc.

int ControlRangeDict::structures_OK  )  const [virtual]
 

Methods required by Listable.

Definition at line 777 of file ControlRangeDict.cc.

References BaseMapRoot::structures_OK(), and ExprSet::structures_OK().

void ControlRangeDict::_set_range const Symbol var,
const Statement stmt,
Expression range
[protected, virtual]
 

Not implemented. Will p_assert if called.

Implements RangeDict.

Definition at line 662 of file ControlRangeDict.cc.

void ControlRangeDict::_del_range const Symbol var,
const Statement stmt
[protected, virtual]
 

Not implemented. Will p_assert if called.

Implements RangeDict.

Definition at line 673 of file ControlRangeDict.cc.

const Expression * ControlRangeDict::_get_range_ref const Symbol var,
const Statement stmt
[protected, virtual]
 

Return the range associated with the given variable.

If the variable doesn't have an associated range, return 0;

Implements RangeDict.

Definition at line 684 of file ControlRangeDict.cc.

References ProtoRefMap< S, T >::find_ref(), ProtoDatabase< S, T >::find_ref(), and Statement::tag().


The documentation for this class was generated from the following files:
 © 1995-2005 University of Illinois, Urbana-Champaign. All rights reserved.  Fri Mar 25 23:07:08 2005