ROSE  0.11.145.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Rose::BinaryAnalysis::TaintedFlow::State Class Reference

Description

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< StatePtr
 Shared-ownership pointer to taint states. More...
 

Public Member Functions

virtual State::Ptr copy () const
 Virtual copy constructor. More...
 
Taintednesslookup (const DataFlow::Variable &)
 Find the taintedness for some variable. More...
 
bool setIfExists (const DataFlow::Variable &, Taintedness)
 Set taintedness if the variable exists. More...
 
bool merge (const State::Ptr &)
 Merge other state into this state. More...
 
void print (std::ostream &) const
 Print this state. More...
 
const VarTaintList & variables () const
 List of all variables and their taintedness. More...
 
VarTaintList & variables ()
 List of all variables and their taintedness. More...
 

Static Public Member Functions

static State::Ptr instance (const DataFlow::VariableList &variables, Taintedness taint=BOTTOM)
 Allocating constructor. More...
 

Protected Member Functions

 State (const DataFlow::VariableList &variables, Taintedness taint)
 

Member Typedef Documentation

Shared-ownership pointer to taint states.

See Shared ownership.

Definition at line 55 of file TaintedFlow.h.

Member Function Documentation

static State::Ptr Rose::BinaryAnalysis::TaintedFlow::State::instance ( const DataFlow::VariableList variables,
Taintedness  taint = BOTTOM 
)
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.

Referenced by Rose::BinaryAnalysis::TaintedFlow::stateInstance().

virtual State::Ptr Rose::BinaryAnalysis::TaintedFlow::State::copy ( ) const
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.

const VarTaintList& Rose::BinaryAnalysis::TaintedFlow::State::variables ( ) const
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.

VarTaintList& Rose::BinaryAnalysis::TaintedFlow::State::variables ( )
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.

void Rose::BinaryAnalysis::TaintedFlow::State::print ( std::ostream &  ) const

Print this state.


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