ROSE 0.11.145.147
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.
 

Public Member Functions

virtual State::Ptr copy () const
 Virtual copy constructor.
 
Taintednesslookup (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)
 

Member Typedef Documentation

◆ Ptr

Shared-ownership pointer to taint states.

See Shared ownership.

Definition at line 55 of file TaintedFlow.h.

Constructor & Destructor Documentation

◆ State()

Rose::BinaryAnalysis::TaintedFlow::State::State ( const DataFlow::VariableList variables,
Taintedness  taint 
)
inlineprotected

Definition at line 59 of file TaintedFlow.h.

◆ ~State()

virtual Rose::BinaryAnalysis::TaintedFlow::State::~State ( )
inlinevirtual

Definition at line 80 of file TaintedFlow.h.

Member Function Documentation

◆ instance()

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.

References variables().

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

◆ copy()

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.

◆ lookup()

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.

◆ setIfExists()

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.

◆ merge()

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.

◆ variables() [1/2]

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.

Referenced by instance().

◆ variables() [2/2]

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.


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