ROSE 0.11.145.147
|
Taint state.
This class represents the variables being tracked by dataflow and maps each of those variables to a taintedness value. States are reference counted, so use either instance or copy to create new states.
Definition at line 49 of file TaintedFlow.h.
#include <Rose/BinaryAnalysis/TaintedFlow.h>
Public Types | |
typedef boost::shared_ptr< State > | Ptr |
Shared-ownership pointer to taint states. | |
Public Member Functions | |
virtual State::Ptr | copy () const |
Virtual copy constructor. | |
Taintedness & | lookup (const DataFlow::Variable &) |
Find the taintedness for some variable. | |
bool | setIfExists (const DataFlow::Variable &, Taintedness) |
Set taintedness if the variable exists. | |
bool | merge (const State::Ptr &) |
Merge other state into this state. | |
void | print (std::ostream &) const |
Print this state. | |
const VarTaintList & | variables () const |
List of all variables and their taintedness. | |
VarTaintList & | variables () |
List of all variables and their taintedness. | |
Static Public Member Functions | |
static State::Ptr | instance (const DataFlow::VariableList &variables, Taintedness taint=BOTTOM) |
Allocating constructor. | |
Protected Member Functions | |
State (const DataFlow::VariableList &variables, Taintedness taint) | |
typedef boost::shared_ptr<State> Rose::BinaryAnalysis::TaintedFlow::State::Ptr |
Shared-ownership pointer to taint states.
See Shared ownership.
Definition at line 55 of file TaintedFlow.h.
|
inlineprotected |
Definition at line 59 of file TaintedFlow.h.
|
inlinevirtual |
Definition at line 80 of file TaintedFlow.h.
|
inlinestatic |
Allocating constructor.
Allocates a new instance of a taint state, initializing all variables to the specified taint
. Returns a pointer to the new reference-counted object.
Definition at line 69 of file TaintedFlow.h.
References variables().
Referenced by Rose::BinaryAnalysis::TaintedFlow::stateInstance().
|
inlinevirtual |
Virtual copy constructor.
Creates a new taint state that has the same variables and taintedness as this state.
Definition at line 76 of file TaintedFlow.h.
Taintedness & Rose::BinaryAnalysis::TaintedFlow::State::lookup | ( | const DataFlow::Variable & | ) |
Find the taintedness for some variable.
The specified variable must exist in this state according to Variable::mustAlias
. Returns a reference to the variables taintedness value.
bool Rose::BinaryAnalysis::TaintedFlow::State::setIfExists | ( | const DataFlow::Variable & | , |
Taintedness | |||
) |
Set taintedness if the variable exists.
Returns true if the variable exists and false otherwise.
bool Rose::BinaryAnalysis::TaintedFlow::State::merge | ( | const State::Ptr & | ) |
Merge other state into this state.
Merges the specified state into this state and returns true if this state changed in any way.
|
inline |
List of all variables and their taintedness.
Returns a list of VariableTaint pairs in no particular order.
Definition at line 103 of file TaintedFlow.h.
Referenced by instance().
|
inline |
List of all variables and their taintedness.
Returns a list of VariableTaint pairs in no particular order.
Definition at line 104 of file TaintedFlow.h.