Skip to content

TaintLattice

A pointer to a vertex of the static taint lattice.

Synopsis

Declared in <src/midend/programAnalysis/genericDataflow/simpleAnalyses/taintAnalysis.h>

class TaintLattice
    : public FiniteLattice

Description

The taint lattice is static, consisting of only the vertices defined by the Vertex enum. A TaintLattice object is slightly misnamed but follows existing convention: it's not really the whole lattice, but a pointer to one of the static latice's vertices.

Base Classes

Name Description
FiniteLattice

Enums

Name Description
Vertex The differet vertices of this static lattice. They're defined in a particular order so that the meetUpdate() method only needs to compute the maximum when merging two vertex pointers. A value is considered to be tainted if it points to the VERTEX_TAINTED or the VERTEX_TOP vertex of the static taint lattice.

Member Functions

Name Description
TaintLattice
TaintLattice(); [constructor]
Default initializer makes this object point to the lattice's bottom vertex.
copy
virtual Lattice* copy() const override;
copy overloads
get_vertex
Vertex get_vertex() const;
Accessor for this node's vertex in the lattice. The set_level() mutator also returns true if the new value is different than the old value, and false if there was no change. @{
initialize
virtual void initialize() override; [virtual]
Same as default constructor.
meetUpdate
virtual bool meetUpdate(Lattice* other_) override; [virtual]
Merges this lattice node with another and stores the result in this node. Returns true iff this node changed.
set_vertex
bool set_vertex(Vertex v);
str
virtual std::string str(std::string prefix) override; [virtual]
String representation of the lattice vertex to which this object points. The return value is the name of the vertex to which this object points, sans "VERTEX_" prefix, and converted to lower case. The prefix is prepended to the returned string.
to_string
std::string to_string() const;
String representation of a lattice vertex. Returns the name of the taint lattice vertex to which this object points. The returned string is one of the Vertex enum constants sans the "VERTEX_" prefix and converted to lower case.
operator==
virtual bool operator==(Lattice* other_) override; [virtual]
Equality operator

Protected Data Members

Name Description
vertex The vertex of the static taint lattice to which this object points.

Friends

Name Description
operator<< Stream insertion operator

Created with MrDocs