ROSE 0.11.145.147
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
ConstrGraph Class Reference

Description

Definition at line 41 of file ConstrGraph.h.

Inheritance diagram for ConstrGraph:
Inheritance graph
[legend]
Collaboration diagram for ConstrGraph:
Collaboration graph
[legend]

Classes

class  geIterator
 
class  leIterator
 
class  NodeDesc
 

Public Types

enum  levels {
  uninitialized = 0 ,
  bottom ,
  constrKnown ,
  top
}
 
enum  constrTypes {
  unknown ,
  conj ,
  negConj ,
  inconsistent
}
 

Public Member Functions

 ConstrGraph (const Function &func, const DataflowNode &n, const NodeState &state, LiveDeadVarsAnalysis *ldva, FiniteVarsExprsProductLattice *divL, bool initialized=true, std::string indent="")
 
 ConstrGraph (const Function &func, const DataflowNode &n, const NodeState &state, LiveDeadVarsAnalysis *ldva, const std::map< std::pair< std::string, void * >, FiniteVarsExprsProductLattice * > &divL, bool initialized=true, std::string indent="")
 
 ConstrGraph (const Function &func, const std::set< NodeDesc > &nodes, const NodeState &state, LiveDeadVarsAnalysis *ldva, const std::map< std::pair< std::string, void * >, FiniteVarsExprsProductLattice * > &divL, bool initialized=true, std::string indent="")
 
 ConstrGraph (ConstrGraph &that, bool initialized=true, std::string indent="")
 
 ConstrGraph (const ConstrGraph *that, bool initialized=true, std::string indent="")
 
 ConstrGraph (const std::set< varAffineInequality > &ineqs, const Function &func, const DataflowNode &n, const NodeState &state, LiveDeadVarsAnalysis *ldva, FiniteVarsExprsProductLattice *divL, std::string indent="")
 
 ConstrGraph (const std::set< varAffineInequality > &ineqs, const Function &func, const DataflowNode &n, const NodeState &state, LiveDeadVarsAnalysis *ldva, const std::map< std::pair< std::string, void * >, FiniteVarsExprsProductLattice * > &divL, std::string indent="")
 
void initialize (std::string indent="")
 
void initialize ()
 
FiniteVarsExprsProductLatticegetDivLattice (const varID &var, std::string indent="")
 
std::string DivLattices2Str (std::string indent="")
 
bool addVar (const varID &scalar, std::string indent="")
 
bool removeVar (const varID &scalar, std::string indent="")
 
const varIDSet & getVars () const
 
varIDSet & getVarsMod ()
 
void copy (Lattice *that)
 
Latticecopy () const
 
bool copyFrom (ConstrGraph &that, std::string indent="")
 
bool copyFromReplace (ConstrGraph &that, varID varTo, varID varFrom, std::string indent="")
 
bool copyVar (const ConstrGraph &that, const varID &var)
 
bool copyConstraints (ConstrGraph &that, std::string indent="")
 
bool copyConstraintsReplace (ConstrGraph &that, varID varTo, varID varFrom, std::string indent="")
 
void eraseConstraints (bool noBottomCheck=false, std::string indent="")
 
bool eraseVarConstr (const varID &eraseVar, bool noConsistencyCheck=false, std::string indent="")
 
bool eraseVarConstrNoDiv (const varID &eraseVar, bool noConsistencyCheck=false, std::string indent="")
 
bool eraseVarConstrNoDivVars (const varID &eraseVar, bool noConsistencyCheck=false, std::string indent="")
 
bool replaceVar (const varID &origVar, const varID &newVar, bool noConsistencyCheck=false, std::string indent="")
 
bool copyAnnotVars (std::string srcAnnotName, void *srcAnnotVal, std::string tgtAnnotName, void *tgtAnnotVal, const std::set< std::pair< std::string, void * > > &noCopyAnnots, const std::set< varID > &noCopyVars, std::string indent="")
 
bool mergeAnnotVars (const std::string &finalAnnotName, void *finalAnnotVal, const std::string &remAnnotName, void *remAnnotVal, const std::set< std::pair< std::string, void * > > &noCopyAnnots, const std::set< varID > &noCopyVars, std::string indent="")
 
void remapVars (const std::map< varID, varID > &, const Function &)
 
void incorporateVars (Lattice *)
 
Latticeproject (SgExpression *)
 
bool unProject (SgExpression *, Lattice *exprState)
 
ConstrGraphgetProjection (const varIDSet &focusVars, std::string indent="")
 
bool removeVarAnnot (std::string annotName, void *annot, std::string indent="")
 
bool replaceVarAnnot (std::string oldAnnotName, void *oldAnnot, std::string newAnnotName, void *newAnnot, std::string indent="")
 
bool addVarAnnot (std::string tgtAnnotName, void *tgtAnnotVal, std::string newAnnotName, void *newAnnotVal, std::string indent="")
 
bool negate (std::string indent="")
 
bool assign (const varAffineInequality &cond, std::string indent="")
 
bool assign (varID x, varID y, const affineInequality &ineq, std::string indent="")
 
bool assign (varID x, varID y, int a, int b, int c, std::string indent="")
 
bool assignBot (varID var, std::string indent="")
 
bool assignTop (varID var, std::string indent="")
 
bool assertCond (const varAffineInequality &cond, std::string indent="")
 
bool assertCond (const varID &x, const varID &y, const affineInequality &ineq, std::string indent="")
 
bool assertCond (const varID &x, const varID &y, int a, int b, int c, std::string indent="")
 
bool assertEq (const varAffineInequality &cond, std::string indent="")
 
bool assertEq (varID x, varID y, const affineInequality &ineq, std::string indent="")
 
bool assertEq (const varID &x, const varID &y, int a=1, int b=1, int c=0, std::string indent="")
 
affineInequality::signs getVarSign (const varID &var, std::string indent="")
 
bool isEqZero (const varID &var, std::string indent="")
 
bool eqVars (const varID &v1, const varID &v2, int a=1, int b=1, int c=0, std::string indent="")
 
bool eqVars (const varID &v1, const varID &v2, std::string indent="")
 
bool isEqVars (const varID &v1, const varID &v2, int &a, int &b, int &c, std::string indent="")
 
std::map< varID, affineInequalitygetEqVars (varID var, std::string indent="")
 
bool lteVars (const varID &v1, const varID &v2, int a=1, int b=1, int c=0, std::string indent="")
 
bool ltVars (const varID &v1, const varID &v2, int a=1, int b=1, int c=0, std::string indent="")
 
leIterator leBegin (const varID &y)
 
leIterator leEnd ()
 
geIterator geBegin (const varID &y)
 
geIterator geEnd ()
 
bool widenUpdate (InfiniteLattice *that, std::string indent="")
 
bool widenUpdate (InfiniteLattice *that)
 
bool widenUpdateLimitToThat (InfiniteLattice *that, std::string indent="")
 
bool widenUpdate_ex (InfiniteLattice *that_arg, bool limitToThat, std::string indent="")
 
bool meetUpdate (Lattice *that, std::string indent="")
 
bool meetUpdate (Lattice *that)
 
bool meetUpdateLimitToThat (InfiniteLattice *that, std::string indent="")
 
bool meetUpdate_ex (Lattice *that_arg, bool limitToThat, std::string indent="")
 
bool orUpd (LogicalCond &that, std::string indent="")
 
bool orUpd (LogicalCond &that)
 
bool andUpd (LogicalCond &that, std::string indent="")
 
bool andUpd (LogicalCond &that)
 
bool andUpd (ConstrGraph *that, std::string indent="")
 
bool andUpd (ConstrGraph *that)
 
bool OrAndWidenUpdate (ConstrGraph *that, bool meet, bool OR, bool limitToThat, std::string indent="")
 
void OrAndWidenUpdate_XinThisNotThat (bool OR, bool limitToThat, std::map< varID, std::map< varID, affineInequality > >::iterator &itThisX, bool &modified, std::string indent="")
 
void OrAndWidenUpdate_XinThatNotThis (bool OR, bool limitToThat, ConstrGraph *that, std::map< varID, std::map< varID, affineInequality > >::iterator &itThatX, std::map< varID, std::map< varID, affineInequality > > &additionsToThis, bool &modified, std::string indent="")
 
void OrAndWidenUpdate_YinThisNotThat (bool OR, bool limitToThat, std::map< varID, std::map< varID, affineInequality > >::iterator &itThisX, std::map< varID, affineInequality >::iterator &itThisY, bool &modified, std::string indent="")
 
void OrAndWidenUpdate_YinThatNotThis (bool OR, bool limitToThat, std::map< varID, std::map< varID, affineInequality > >::iterator &itThatX, std::map< varID, affineInequality >::iterator &itThatY, std::map< varID, affineInequality > &additionsToThis, bool &modified, std::string indent="")
 
bool transitiveClosure (std::string indent="")
 
bool localTransClosure (const varID &tgtVar, std::string indent="")
 
bool addDivL (FiniteVarsExprsProductLattice *divLattice, std::string annotName, void *annot, std::string indent="")
 
bool containsVar (const varID &var, std::string indent="")
 
affineInequalitygetVal (varID x, varID y, std::string indent="")
 
bool setVal (varID x, varID y, int a, int b, int c, std::string indent="")
 
bool setVal (varID x, varID y, const affineInequality &ineq, std::string indent="")
 
bool setToUninitialized_KeepState (std::string indent="")
 
bool setToBottom (std::string indent="")
 
bool setToConstrKnown (constrTypes ct, bool eraseCurConstr=true, std::string indent="")
 
bool setToInconsistent (std::string indent="")
 
bool setToTop (bool onlyIfNotInit=false, std::string indent="")
 
std::pair< levels, constrTypes > getLevel (bool noConsistencyCheck=false, std::string indent="")
 
bool isSelfConsistent (bool noConsistencyCheck=false, std::string indent="")
 
bool hasConsistentConstraints (bool noConsistencyCheck=false, std::string indent="")
 
bool isMaximalState (bool noConsistencyCheck=false, std::string indent="")
 
std::string str (std::string indent="")
 
void varSetStatusToStream (const std::set< varID > &vars, std::ostringstream &outs, bool &needEndl, std::string indent="")
 
std::string str (std::string indent, bool useIsBottom)
 
std::string toDOT (std::string graphName)
 
std::string toDOT (std::string graphName, std::set< varID > &focusVars)
 
bool operator!= (ConstrGraph &that)
 
bool operator== (ConstrGraph &that)
 
bool operator== (Lattice *that)
 
bool operator<<= (ConstrGraph &that)
 
bool mustOutsideRange (varID x, int b, int c, varID y, std::string indent="")
 
bool mayTrue (std::string indent="")
 
bool mayTrue ()
 
void beginTransaction (std::string indent="")
 
void endTransaction (std::string indent="")
 
- Public Member Functions inherited from InfiniteLattice
bool finiteLattice ()
 Check if this lattice is finite or not.
 
- Public Member Functions inherited from Lattice
bool operator!= (Lattice *that)
 
bool operator== (Lattice &that)
 
bool operator!= (Lattice &that)
 

Static Public Member Functions

static bool varHasAnnot (const varID &var, const std::set< std::pair< std::string, void * > > &annots, std::string indent="")
 
static bool varHasAnnot (const varID &var, std::string annotName, void *annotVal, std::string indent="")
 
static ConstrGraphjoinCG (ConstrGraph *cg1, void *cg1Annot, ConstrGraph *cg2, void *cg2Annot, std::string annotName, const varIDSet &noAnnot, std::string indent="")
 

Protected Member Functions

 ConstrGraph (const Function &func, const DataflowNode &n, const NodeState &state, bool initialized=false, std::string indent="")
 
void initCG (const Function &func, const std::set< NodeDesc > &nodes, bool initialized, std::string indent="")
 
bool diffConstraints (ConstrGraph &that, std::string indent="")
 
bool annotInterestingVar (const varID &var, const std::set< std::pair< std::string, void * > > &noCopyAnnots, const std::set< varID > &noCopyVars, const std::string &annotName, void *annotVal, std::string indent="")
 
bool unionXYsubMap (std::map< varID, affineInequality > &subMap, const varID &y, const affineInequality &ineq, std::string indent="")
 
bool mergeAnnotVarsSubMap (std::map< varID, affineInequality > &subMap, std::string finalAnnotName, void *finalAnnotVal, std::string remAnnotName, void *remAnnotVal, const std::set< std::pair< std::string, void * > > &noCopyAnnots, const std::set< varID > &noCopyVars, std::string indent="")
 
bool mergeAnnotVarsSet (std::set< varID > varsSet, std::string finalAnnotName, void *finalAnnotVal, std::string remAnnotName, void *remAnnotVal, const std::set< std::pair< std::string, void * > > &noCopyAnnots, const std::set< varID > &noCopyVars, std::string indent="")
 
bool transitiveClosureDiv (std::string indent="")
 
void transitiveClosureY (const varID &x, const varID &y, bool &modified, int &numSteps, int &numInfers, bool &iterModified, std::string indent="")
 
void transitiveClosureZ (const varID &x, const varID &y, const varID &z, bool &modified, int &numSteps, int &numInfers, bool &iterModified, std::string indent="")
 
bool checkSelfConsistency (std::string indent="")
 

Static Protected Member Functions

static void joinCG_copyState (ConstrGraph *tgtCG, ConstrGraph *srcCG, void *annot, std::string annotName, const varIDSet &noAnnot, std::string indent="")
 

Protected Attributes

levels level
 
constrTypes constrType
 
const Functionfunc
 
const NodeStatestate
 
std::map< varID, std::map< varID, affineInequality > > vars2Value
 
LiveDeadVarsAnalysisldva
 
bool inTransaction
 
std::map< std::pair< std::string, void * >, FiniteVarsExprsProductLattice * > divL
 
std::set< varIDvars
 
bool constrChanged
 
std::set< varIDmodifiedVars
 

Member Enumeration Documentation

◆ levels

enum ConstrGraph::levels

Definition at line 45 of file ConstrGraph.h.

◆ constrTypes

enum ConstrGraph::constrTypes

Definition at line 66 of file ConstrGraph.h.

Member Function Documentation

◆ initialize()

void ConstrGraph::initialize ( )
inlinevirtual

Implements Lattice.

Definition at line 207 of file ConstrGraph.h.

◆ copy() [1/2]

void ConstrGraph::copy ( Lattice that)
virtual

Implements Lattice.

◆ copy() [2/2]

Lattice * ConstrGraph::copy ( ) const
virtual

Implements Lattice.

◆ remapVars()

void ConstrGraph::remapVars ( const std::map< varID, varID > &  ,
const Function  
)
inlinevirtual

Reimplemented from Lattice.

Definition at line 404 of file ConstrGraph.h.

◆ incorporateVars()

void ConstrGraph::incorporateVars ( Lattice )
inlinevirtual

Reimplemented from Lattice.

Definition at line 412 of file ConstrGraph.h.

◆ project()

Lattice * ConstrGraph::project ( SgExpression )
inlinevirtual

Reimplemented from Lattice.

Definition at line 423 of file ConstrGraph.h.

◆ unProject()

bool ConstrGraph::unProject ( SgExpression ,
Lattice exprState 
)
inlinevirtual

Reimplemented from Lattice.

Definition at line 432 of file ConstrGraph.h.

◆ eqVars()

bool ConstrGraph::eqVars ( const varID v1,
const varID v2,
std::string  indent = "" 
)
inline

Definition at line 533 of file ConstrGraph.h.

◆ widenUpdate()

bool ConstrGraph::widenUpdate ( InfiniteLattice that)
inlinevirtual

Implements InfiniteLattice.

Definition at line 626 of file ConstrGraph.h.

◆ meetUpdate()

bool ConstrGraph::meetUpdate ( Lattice that)
inlinevirtual

Implements Lattice.

Definition at line 642 of file ConstrGraph.h.

◆ orUpd()

bool ConstrGraph::orUpd ( LogicalCond that)
inline

Definition at line 654 of file ConstrGraph.h.

◆ andUpd() [1/2]

bool ConstrGraph::andUpd ( LogicalCond that)
inline

Definition at line 659 of file ConstrGraph.h.

◆ andUpd() [2/2]

bool ConstrGraph::andUpd ( ConstrGraph that)
inline

Definition at line 663 of file ConstrGraph.h.

◆ str()

std::string ConstrGraph::str ( std::string  indent = "")
virtual

Implements printable.

◆ toDOT()

std::string ConstrGraph::toDOT ( std::string  graphName)
virtual

Implements dottable.

◆ operator==()

bool ConstrGraph::operator== ( Lattice that)
virtual

Implements Lattice.

◆ mayTrue()

bool ConstrGraph::mayTrue ( )
inline

Definition at line 896 of file ConstrGraph.h.

Member Data Documentation

◆ level

levels ConstrGraph::level
protected

Definition at line 63 of file ConstrGraph.h.

◆ constrType

constrTypes ConstrGraph::constrType
protected

Definition at line 77 of file ConstrGraph.h.

◆ func

const Function& ConstrGraph::func
protected

Definition at line 81 of file ConstrGraph.h.

◆ state

const NodeState& ConstrGraph::state
protected

Definition at line 83 of file ConstrGraph.h.

◆ vars2Value

std::map<varID, std::map<varID, affineInequality> > ConstrGraph::vars2Value
protected

Definition at line 87 of file ConstrGraph.h.

◆ ldva

LiveDeadVarsAnalysis* ConstrGraph::ldva
protected

Definition at line 91 of file ConstrGraph.h.

◆ inTransaction

bool ConstrGraph::inTransaction
protected

Definition at line 96 of file ConstrGraph.h.

◆ divL

std::map<std::pair<std::string, void*>, FiniteVarsExprsProductLattice*> ConstrGraph::divL
protected

Definition at line 103 of file ConstrGraph.h.

◆ vars

std::set<varID> ConstrGraph::vars
protected

Definition at line 113 of file ConstrGraph.h.

◆ constrChanged

bool ConstrGraph::constrChanged
protected

Definition at line 120 of file ConstrGraph.h.

◆ modifiedVars

std::set<varID> ConstrGraph::modifiedVars
protected

Definition at line 124 of file ConstrGraph.h.


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