ROSE
0.9.6a
|
A data structure used for tracing in error disgnostic. More...
#include <diagnostic.h>
Public Member Functions | |
Diagnostic (enumPropertyAnn *property) | |
Create a new Diagnostic. More... | |
bool | is_diagnostic_value (enumValueAnn *v) |
Check if a value is traced by this Diagnostic. More... | |
void | add_diagnostic_value (enumValueAnn *v) |
Add a value to be traced by this Diagnostic. More... | |
bool | contain_diagnostic_value (enumvalue_set values) const |
Check if any value in a given set is traced by this Diagnostic. More... | |
void | add_defuse (Location *loc, memoryDef *lhs, memoryUse *rhs) |
Remember a new definition/use pair for a location. More... | |
void | reset (Location *loc) |
Erase all definitions and uses for a location. More... | |
void | reset () |
void | trace (ostream &out, Location *loc, pointerValue &pv) |
Performs tracing for the error diagnostic on the pointer value at a location. More... | |
Private Types | |
typedef map< memoryDef *, memoryuse_set > | def2uses |
typedef pair< Location *, memoryDef * > | Location_pair |
Tracing is performed via pairs of Locations. More... | |
typedef list< Segment * > | Segments |
For convenience, define ordered list of Segment's. More... | |
Private Member Functions | |
Segment * | trace (Location *from, memoryDef *def) |
Helper functions for the other trace function. More... | |
Segment * | trace (Location *from, Location *to) |
Helper functions for the other trace function. More... | |
int | detect_cycle (Segment *cur, Segments &visited, bool specific=false) |
void | find_shortest (Segment *cur, Segments path, Segments &shortest) |
Private Attributes | |
REF enumPropertyAnn * | _property |
The property to trace. More... | |
TREE enumvalue_set | _diagnostic_values |
The set of values in the property to trace. More... | |
TREE map< Location *, def2uses > | _def2uses |
The definitions and uses at a location. More... | |
Segments | segments |
Stores all segments computed. More... | |
Segments | starts |
Each path (trace) starts with a Segment. More... | |
map< Location_pair, Segment * > | segment_path |
Stores the Segment computed for each Location pair. More... | |
A data structure used for tracing in error disgnostic.
Definition at line 14 of file diagnostic.h.
|
private |
Definition at line 16 of file diagnostic.h.
|
private |
Tracing is performed via pairs of Locations.
For convenience, define type for such pairs.
Definition at line 60 of file diagnostic.h.
|
private |
For convenience, define ordered list of Segment's.
Definition at line 66 of file diagnostic.h.
|
inline |
Create a new Diagnostic.
Definition at line 27 of file diagnostic.h.
|
inline |
Check if a value is traced by this Diagnostic.
Definition at line 30 of file diagnostic.h.
References _diagnostic_values, and enumValueAnn::id().
Referenced by add_diagnostic_value().
|
inline |
Add a value to be traced by this Diagnostic.
Definition at line 35 of file diagnostic.h.
References _diagnostic_values, enumvalue_set::insert(), and is_diagnostic_value().
|
inline |
Check if any value in a given set is traced by this Diagnostic.
Definition at line 40 of file diagnostic.h.
References _diagnostic_values.
|
inline |
Remember a new definition/use pair for a location.
Definition at line 45 of file diagnostic.h.
References _def2uses.
|
inline |
Erase all definitions and uses for a location.
Definition at line 50 of file diagnostic.h.
References _def2uses.
|
inline |
Definition at line 51 of file diagnostic.h.
References _def2uses.
void Diagnostic::trace | ( | ostream & | out, |
Location * | loc, | ||
pointerValue & | pv | ||
) |
Performs tracing for the error diagnostic on the pointer value at a location.
|
private |
Helper functions for the other trace function.
|
private |
Helper functions for the other trace function.
|
private |
|
private |
The property to trace.
Definition at line 19 of file diagnostic.h.
|
private |
The set of values in the property to trace.
Definition at line 21 of file diagnostic.h.
Referenced by add_diagnostic_value(), contain_diagnostic_value(), and is_diagnostic_value().
The definitions and uses at a location.
Definition at line 23 of file diagnostic.h.
Referenced by add_defuse(), and reset().
|
private |
Stores all segments computed.
Definition at line 72 of file diagnostic.h.
|
private |
Each path (trace) starts with a Segment.
Store the start of each path here.
Definition at line 75 of file diagnostic.h.
|
private |
Stores the Segment computed for each Location pair.
Definition at line 78 of file diagnostic.h.