1 #include <featureTests.h>
2 #ifdef ROSE_ENABLE_SOURCE_ANALYSIS
4 #ifndef ROSE_TaintAnalysis_H
5 #define ROSE_TaintAnalysis_H
28 #include "liveDeadVarAnalysis.h"
116 virtual std::string
str( std::string prefix)
override {
130 friend std::ostream& operator<<(std::ostream &o,
const TaintLattice &lattice);
147 : ldv_analysis(ldv_analysis), debug(NULL) {}
152 std::ostream *
get_debug()
const {
return debug; }
153 void set_debug(std::ostream *os) { debug = os; }
176 std::vector<Lattice*>& initLattices, std::vector<NodeFact*>& initFacts);
193 return lattice ? lattice->
to_string() :
"dead";
A pointer to a vertex of the static taint lattice.
@ VERTEX_BOTTOM
No information is known about the value of the variable.
bool set_vertex(Vertex v)
Accessor for this node's vertex in the lattice.
bool magic_tainted(SgNode *node, FiniteVarsExprsProductLattice *prodLat)
Make certain variables always tainted.
virtual bool operator==(Lattice *other_) override
Equality predicate, sort of.
static std::string lattice_info(const TaintLattice *lattice)
Helps print lattice pointers.
virtual void initialize() override
Same as default constructor.
Vertex get_vertex() const
Accessor for this node's vertex in the lattice.
bool transfer(const Function &func, const DataflowNode &node_, NodeState &state, const std::vector< Lattice * > &dfInfo)
Adjust a result vertex pointer.
void set_debug(std::ostream *os)
Accessor for debug settings.
This class represents the base class for all IR nodes within Sage III.
Vertex vertex
The vertex of the static taint lattice to which this object points.
virtual bool meetUpdate(Lattice *other_) override
Merges this lattice node with another and stores the result in this node.
TaintLattice()
Default initializer makes this object point to the lattice's bottom vertex.
std::ostream * get_debug() const
Accessor for debug settings.
virtual Lattice * copy() const override
Returns a new copy of this vertex pointer.
@ VERTEX_UNTAINTED
Value is not tainted.
void genInitState(const Function &func, const DataflowNode &node, const NodeState &state, std::vector< Lattice * > &initLattices, std::vector< NodeFact * > &initFacts)
Generate initial lattice state.
std::string to_string() const
String representation of a lattice vertex.
virtual std::string str(std::string prefix) override
String representation of the lattice vertex to which this object points.
@ VERTEX_TAINTED
Value is tainted.