ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Annotations Class Reference

#include <annotations.h>

Collaboration diagram for Annotations:

Public Types

enum  Adapt_Precision {
  UNIFY,
  FICI,
  FSCI,
  FICS,
  FSCS
}
 Current precision policy to use in adaptive mode. More...
 

Public Member Functions

 Annotations (std::string &filename, str_list *cpp_flags)
 Create new annotations. More...
 
 ~Annotations ()
 Delete annotations. More...
 
void clear ()
 Clear. More...
 
procedureAnninit () const
 The special init() procedure annotations. More...
 
void add_procedure (procedureAnn *new_procedure)
 Add a new procedure. More...
 
void add_globals (structuretree_list *structures)
 Add globals. More...
 
annVariableadd_one_global (const std::string &varname, bool is_io)
 Add one global. More...
 
void add_enum_property (enumPropertyAnn *property)
 Add an enum property. More...
 
void add_set_property (setPropertyAnn *set_property)
 Add a setProperty property. More...
 
procedureAnnlookup_procedure (const std::string &name)
 Lookup procedure annotation by name. More...
 
annVariablelookup_global (const std::string &name)
 Lookup global variable by name. More...
 
enumPropertyAnnlookup_enum_property (const std::string &name)
 Lookup header declaration by name. More...
 
setPropertyAnnlookup_set_property (const std::string &name)
 Lookup a set property by name. More...
 
propertyAnnlookup_property (const std::string &name)
 Lookup either kind of property. More...
 
enumPropertyAnnconstants_property () const
 Get the special constants property. More...
 
void clear_properties ()
 Reset the properties (including set properties) More...
 
const procedures_mapprocedures () const
 Get the procedures list. More...
 
const var_mapglobals () const
 Get the globals list. More...
 
const enum_property_mapenum_properties () const
 Get the enum properties list. More...
 
const set_property_mapset_properties () const
 Get the set properties list. More...
 
void Error (int where, const std::string &msg)
 Store the C header (used only in the parser) More...
 
void Warning (int where, const std::string &msg)
 
int errors () const
 
void print (std::ostream &o) const
 
std::string & filename ()
 

Static Public Attributes

static AnnotationsCurrent
 Current annotation object. More...
 
static bool debug
 Public debug flag: turns on all verbosity. More...
 
static bool Show_actions
 Show actions as they are applied. More...
 
static bool Show_reports
 Show reports as they are evaluated. More...
 
static bool Verbose_properties
 Debug properties. More...
 
static bool Verbose_pointers
 Debug pointers only. More...
 
static bool Flow_insensitive_properties
 Flow insensitive properties. More...
 
static bool Skip_traces
 Skip traces. More...
 
static int Adaptivity
 Adaptivity flag. More...
 
static bool Show_adaptivity
 Show adaptivity algorithm. More...
 
static Adapt_Precision Adapt_precision
 
static bool Adapt_uses_uba
 Is unification being used? More...
 
static bool Error_oriented_adaptivity
 Error-oriented adaptivity. More...
 
static bool Record_tested_objects
 Turn on tested object recording. More...
 
static bool Quiet_reports
 Quiet reports. More...
 
static bool Prune_context_sensitive
 Prune context sensitive. More...
 
static str_set Pruned_procedures
 Pruned procedures. More...
 
static double Analysis_time
 Analysis time. More...
 
static str_list Enabled_properties
 Enabled properties. More...
 
static str_list Disabled_properties
 Disabled properties. More...
 
static unsigned long int Start_brk
 Start of heap. More...
 
static bool Aggressive_pruning
 Aggressive adaptive pruning. More...
 
static int Num_enabled_properties
 Error reports. More...
 
static bool Diagnostic
 Error diagnostic. More...
 
static Adaptor_StatisticsAdaptor_statistics
 Collect statistics on data that affects precision policy built by the adaptor. More...
 

Private Member Functions

FILE * _open_input_file ()
 
annVariablenew_global (const std::string &varname, bool is_external, bool is_io)
 Create a new global. More...
 
void old_add_globals (parserid_list *vars)
 OLD add globals method. More...
 

Private Attributes

std::string _filename
 Annotation file name. More...
 
TREE var_map _globals
 Any global state variables. More...
 
TREE procedureAnn_init
 Global pointer structure. More...
 
TREE enum_property_map _enum_properties
 Properties for analysis. More...
 
REF enumPropertyAnn_constants
 Special constant propagation property. More...
 
TREE set_property_map _set_properties
 Set-based properties for analysis. More...
 
TREE procedures_map _procedures
 Annotations for each procedure. More...
 
int _errors
 Error count (during parsing) More...
 
str_list_cpp_flags
 header file More...
 

Friends

std::ostream & operator<< (std::ostream &o, const Annotations &anns)
 

Detailed Description

Definition at line 24 of file annotations.h.

Member Enumeration Documentation

Current precision policy to use in adaptive mode.

Enumerator
UNIFY 
FICI 
FSCI 
FICS 
FSCS 

Definition at line 73 of file annotations.h.

Constructor & Destructor Documentation

Annotations::Annotations ( std::string &  filename,
str_list cpp_flags 
)

Create new annotations.

Read in the annotations contained in the given filename, first preprocessing the file with the given cpp flags.

Annotations::~Annotations ( )

Delete annotations.

Member Function Documentation

void Annotations::clear ( )

Clear.

Call clear on all sub-annotations.

procedureAnn* Annotations::init ( ) const
inline

The special init() procedure annotations.

Definition at line 245 of file annotations.h.

References _init.

void Annotations::add_procedure ( procedureAnn new_procedure)

Add a new procedure.

void Annotations::add_globals ( structuretree_list structures)

Add globals.

This is a new version that allows global variables to have structure, like the on_entry and on_exit annotations.

annVariable* Annotations::add_one_global ( const std::string &  varname,
bool  is_io 
)

Add one global.

Look up the given name, and create a new global variable if necessary. If one already exists, just return it. This method also handles looking up actual global variables declared in the header file.

void Annotations::add_enum_property ( enumPropertyAnn property)

Add an enum property.

void Annotations::add_set_property ( setPropertyAnn set_property)

Add a setProperty property.

procedureAnn* Annotations::lookup_procedure ( const std::string &  name)

Lookup procedure annotation by name.

annVariable* Annotations::lookup_global ( const std::string &  name)

Lookup global variable by name.

enumPropertyAnn* Annotations::lookup_enum_property ( const std::string &  name)

Lookup header declaration by name.

Lookup an enum property by name

setPropertyAnn* Annotations::lookup_set_property ( const std::string &  name)

Lookup a set property by name.

propertyAnn* Annotations::lookup_property ( const std::string &  name)

Lookup either kind of property.

enumPropertyAnn* Annotations::constants_property ( ) const
inline

Get the special constants property.

Definition at line 304 of file annotations.h.

References _constants.

void Annotations::clear_properties ( )

Reset the properties (including set properties)

const procedures_map& Annotations::procedures ( ) const
inline

Get the procedures list.

Definition at line 312 of file annotations.h.

References _procedures.

const var_map& Annotations::globals ( ) const
inline

Get the globals list.

Definition at line 316 of file annotations.h.

References _globals.

const enum_property_map& Annotations::enum_properties ( ) const
inline

Get the enum properties list.

Definition at line 320 of file annotations.h.

References _enum_properties.

const set_property_map& Annotations::set_properties ( ) const
inline

Get the set properties list.

Definition at line 324 of file annotations.h.

References _set_properties.

void Annotations::Error ( int  where,
const std::string &  msg 
)

Store the C header (used only in the parser)

void Annotations::Warning ( int  where,
const std::string &  msg 
)
int Annotations::errors ( ) const
inline

Definition at line 336 of file annotations.h.

References _errors.

void Annotations::print ( std::ostream &  o) const
std::string& Annotations::filename ( )
inline

Definition at line 347 of file annotations.h.

References _filename.

FILE* Annotations::_open_input_file ( )
private
annVariable* Annotations::new_global ( const std::string &  varname,
bool  is_external,
bool  is_io 
)
private

Create a new global.

This method is used by add_one_global to create a new object if one isn't found.

void Annotations::old_add_globals ( parserid_list vars)
private

OLD add globals method.

This version works, but it doesn't handle the structured globals.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
const Annotations anns 
)
friend

Definition at line 340 of file annotations.h.

Member Data Documentation

Annotations* Annotations::Current
static

Current annotation object.

This is only used during parsing to allow easy access to the annotations that are in the process of being built.

Definition at line 33 of file annotations.h.

bool Annotations::debug
static

Public debug flag: turns on all verbosity.

Definition at line 37 of file annotations.h.

bool Annotations::Show_actions
static

Show actions as they are applied.

Definition at line 41 of file annotations.h.

bool Annotations::Show_reports
static

Show reports as they are evaluated.

Definition at line 45 of file annotations.h.

bool Annotations::Verbose_properties
static

Debug properties.

Definition at line 49 of file annotations.h.

bool Annotations::Verbose_pointers
static

Debug pointers only.

Definition at line 53 of file annotations.h.

bool Annotations::Flow_insensitive_properties
static

Flow insensitive properties.

Definition at line 57 of file annotations.h.

bool Annotations::Skip_traces
static

Skip traces.

Definition at line 61 of file annotations.h.

int Annotations::Adaptivity
static

Adaptivity flag.

Definition at line 65 of file annotations.h.

bool Annotations::Show_adaptivity
static

Show adaptivity algorithm.

Definition at line 69 of file annotations.h.

Adapt_Precision Annotations::Adapt_precision
static

Definition at line 75 of file annotations.h.

bool Annotations::Adapt_uses_uba
static

Is unification being used?

Definition at line 79 of file annotations.h.

bool Annotations::Error_oriented_adaptivity
static

Error-oriented adaptivity.

In this mode, the adaptive algorithm never makes ancestors of a procedure with errors context sensitive.

Definition at line 86 of file annotations.h.

bool Annotations::Record_tested_objects
static

Turn on tested object recording.

For the adaptive algorithm.

Definition at line 92 of file annotations.h.

bool Annotations::Quiet_reports
static

Quiet reports.

When true, don't actually print the reports, but do all the other processing, including adaptivity and accuracy.

Definition at line 99 of file annotations.h.

bool Annotations::Prune_context_sensitive
static

Prune context sensitive.

When true, post-process the list of context sensitive procedures proposed by the adative algorithm. Verify that context sensitivity is really warranted.

Definition at line 107 of file annotations.h.

str_set Annotations::Pruned_procedures
static

Pruned procedures.

Keep a list of the pruned procedures.

Definition at line 113 of file annotations.h.

double Annotations::Analysis_time
static

Analysis time.

Use this value to keep an accumulated total for the adaptive modes.

Definition at line 119 of file annotations.h.

str_list Annotations::Enabled_properties
static

Enabled properties.

Definition at line 123 of file annotations.h.

str_list Annotations::Disabled_properties
static

Disabled properties.

Definition at line 127 of file annotations.h.

unsigned long int Annotations::Start_brk
static

Start of heap.

Definition at line 131 of file annotations.h.

bool Annotations::Aggressive_pruning
static

Aggressive adaptive pruning.

When true, use use-def chains to prune adaptivity.

Definition at line 137 of file annotations.h.

int Annotations::Num_enabled_properties
static

Error reports.

For reports that are designated as "errors" keep a record of the places they occur. Number of enabled properties

Definition at line 150 of file annotations.h.

bool Annotations::Diagnostic
static

Error diagnostic.

Definition at line 153 of file annotations.h.

Adaptor_Statistics* Annotations::Adaptor_statistics
static

Collect statistics on data that affects precision policy built by the adaptor.

Definition at line 158 of file annotations.h.

std::string Annotations::_filename
private

Annotation file name.

Definition at line 164 of file annotations.h.

Referenced by filename().

TREE var_map Annotations::_globals
private

Any global state variables.

Definition at line 168 of file annotations.h.

Referenced by globals().

TREE procedureAnn* Annotations::_init
private

Global pointer structure.

This behaves like a global version of the on_entry/on_exit annotations.

TREE structure_list _global_structures;

NO LONGER NEEDED: now that we have the init procedure annotation. Special init procedure

This procedure represents the initial state of the system before main is called. It holds initial values for the analyses, as well as setting up initial pointer relationships.

Definition at line 186 of file annotations.h.

Referenced by init().

TREE enum_property_map Annotations::_enum_properties
private

Properties for analysis.

Definition at line 190 of file annotations.h.

Referenced by enum_properties().

REF enumPropertyAnn* Annotations::_constants
private

Special constant propagation property.

Definition at line 194 of file annotations.h.

Referenced by constants_property().

TREE set_property_map Annotations::_set_properties
private

Set-based properties for analysis.

Definition at line 198 of file annotations.h.

Referenced by set_properties().

TREE procedures_map Annotations::_procedures
private

Annotations for each procedure.

Definition at line 202 of file annotations.h.

Referenced by procedures().

int Annotations::_errors
private

Error count (during parsing)

Definition at line 206 of file annotations.h.

Referenced by errors().

str_list* Annotations::_cpp_flags
private

header file

These fields contains the AST for the C header (usually, the header file for the library).

Definition at line 217 of file annotations.h.


The documentation for this class was generated from the following file: