ROSE
0.9.6a
|
#include <annotations.h>
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... | |
procedureAnn * | init () 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... | |
annVariable * | add_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... | |
procedureAnn * | lookup_procedure (const std::string &name) |
Lookup procedure annotation by name. More... | |
annVariable * | lookup_global (const std::string &name) |
Lookup global variable by name. More... | |
enumPropertyAnn * | lookup_enum_property (const std::string &name) |
Lookup header declaration by name. More... | |
setPropertyAnn * | lookup_set_property (const std::string &name) |
Lookup a set property by name. More... | |
propertyAnn * | lookup_property (const std::string &name) |
Lookup either kind of property. More... | |
enumPropertyAnn * | constants_property () const |
Get the special constants property. More... | |
void | clear_properties () |
Reset the properties (including set properties) More... | |
const procedures_map & | procedures () const |
Get the procedures list. More... | |
const var_map & | globals () const |
Get the globals list. More... | |
const enum_property_map & | enum_properties () const |
Get the enum properties list. More... | |
const set_property_map & | set_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 Annotations * | Current |
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_Statistics * | Adaptor_statistics |
Collect statistics on data that affects precision policy built by the adaptor. More... | |
Private Member Functions | |
FILE * | _open_input_file () |
annVariable * | new_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) |
Definition at line 24 of file annotations.h.
Current precision policy to use in adaptive mode.
Enumerator | |
---|---|
UNIFY | |
FICI | |
FSCI | |
FICS | |
FSCS |
Definition at line 73 of file annotations.h.
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.
void Annotations::clear | ( | ) |
Clear.
Call clear on all sub-annotations.
|
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.
|
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)
|
inline |
|
inline |
|
inline |
Get the enum properties list.
Definition at line 320 of file annotations.h.
References _enum_properties.
|
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 | ||
) |
|
inline |
Definition at line 336 of file annotations.h.
References _errors.
void Annotations::print | ( | std::ostream & | o) | const |
|
inline |
Definition at line 347 of file annotations.h.
References _filename.
|
private |
|
private |
Create a new global.
This method is used by add_one_global to create a new object if one isn't found.
|
private |
OLD add globals method.
This version works, but it doesn't handle the structured globals.
|
friend |
Definition at line 340 of file annotations.h.
|
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.
|
static |
Public debug flag: turns on all verbosity.
Definition at line 37 of file annotations.h.
|
static |
Show actions as they are applied.
Definition at line 41 of file annotations.h.
|
static |
Show reports as they are evaluated.
Definition at line 45 of file annotations.h.
|
static |
Debug properties.
Definition at line 49 of file annotations.h.
|
static |
Debug pointers only.
Definition at line 53 of file annotations.h.
|
static |
Flow insensitive properties.
Definition at line 57 of file annotations.h.
|
static |
Skip traces.
Definition at line 61 of file annotations.h.
|
static |
Adaptivity flag.
Definition at line 65 of file annotations.h.
|
static |
Show adaptivity algorithm.
Definition at line 69 of file annotations.h.
|
static |
Definition at line 75 of file annotations.h.
|
static |
Is unification being used?
Definition at line 79 of file annotations.h.
|
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.
|
static |
Turn on tested object recording.
For the adaptive algorithm.
Definition at line 92 of file annotations.h.
|
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.
|
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.
|
static |
Pruned procedures.
Keep a list of the pruned procedures.
Definition at line 113 of file annotations.h.
|
static |
Analysis time.
Use this value to keep an accumulated total for the adaptive modes.
Definition at line 119 of file annotations.h.
|
static |
Enabled properties.
Definition at line 123 of file annotations.h.
|
static |
Disabled properties.
Definition at line 127 of file annotations.h.
|
static |
Start of heap.
Definition at line 131 of file annotations.h.
|
static |
Aggressive adaptive pruning.
When true, use use-def chains to prune adaptivity.
Definition at line 137 of file annotations.h.
|
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.
|
static |
Error diagnostic.
Definition at line 153 of file annotations.h.
|
static |
Collect statistics on data that affects precision policy built by the adaptor.
Definition at line 158 of file annotations.h.
|
private |
|
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().
|
private |
Properties for analysis.
Definition at line 190 of file annotations.h.
Referenced by enum_properties().
|
private |
Special constant propagation property.
Definition at line 194 of file annotations.h.
Referenced by constants_property().
|
private |
Set-based properties for analysis.
Definition at line 198 of file annotations.h.
Referenced by set_properties().
|
private |
Annotations for each procedure.
Definition at line 202 of file annotations.h.
Referenced by procedures().
|
private |
|
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.