ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PtrAnal Class Referenceabstract

#include <PtrAnal.h>

Inheritance diagram for PtrAnal:
Collaboration diagram for PtrAnal:

Classes

class  hash
 
struct  VarRef
 

Public Types

enum  OpType {
  EQ,
  NE,
  LT,
  GT,
  LE,
  GE,
  OTHER
}
 
typedef void * Stmt
 
typedef std::list< StmtStmtRef
 

Public Member Functions

void operator() (AstInterface &fa, const AstNodePtr &program)
 
bool may_alias (AstInterface &fa, const AstNodePtr &r1, const AstNodePtr &r2)
 
VarRef translate_exp (const AstNodePtr &exp) const
 
StmtRef translate_stmt (const AstNodePtr &stmt) const
 
virtual bool may_alias (const std::string &x, const std::string &y)=0
 
virtual Stmt x_eq_y (const std::string &x, const std::string &y)=0
 
virtual Stmt x_eq_addr_y (const std::string &x, const std::string &y)=0
 
virtual Stmt x_eq_deref_y (const std::string &x, const std::string &field, const std::string &y)=0
 
virtual Stmt x_eq_field_y (const std::string &x, const std::string &field, const std::string &y)=0
 
virtual Stmt deref_x_eq_y (const std::string &x, const std::list< std::string > &field, const std::string &y)=0
 
virtual Stmt field_x_eq_y (const std::string &x, const std::list< std::string > &field, const std::string &y)=0
 
virtual Stmt allocate_x (const std::string &x)=0
 
virtual Stmt x_eq_op_y (OpType op, const std::string &x, const std::list< std::string > &y)=0
 
virtual Stmt funcdef_x (const std::string &x, const std::list< std::string > &params, const std::list< std::string > &ouput)=0
 
virtual Stmt funccall_x (const std::string &x, const std::list< std::string > &args, const std::list< std::string > &result)=0
 
virtual Stmt funcexit_x (const std::string &x)=0
 
virtual void contrl_flow (Stmt stmt1, Stmt stmt2, CFGConfig::EdgeType t)
 

Protected Member Functions

void ProcessAssign (AstInterface &fa, const AstNodePtr &mod, const AstNodePtr &rhs, bool readlhs=0)
 
void ProcessExpression (AstInterface &fa, const std::string &modname, const AstNodePtr &rhs)
 
void ProcessMod (AstInterface &fa, const std::string &readname, std::list< std::string > &fields, const AstNodePtr &mod)
 
void ControlFlowAnalysis (AstInterface &fa, const AstNodePtr &head, Stmt defn)
 
std::string Get_VarName (AstInterface &fa, const AstNodePtr &rhs)
 
virtual bool ProcessTree (AstInterface &_fa, const AstNodePtr &s, AstInterface::TraversalVisitType t)
 

Static Protected Member Functions

static std::string get_func_output (const std::string &fname, int i)
 
static std::string get_func_par (const std::string &fname, int i)
 

Private Types

typedef boost::unordered_map
< void *, VarRef,
PtrAnal::hash
NameMap
 
typedef boost::unordered_map
< void *, std::pair< size_t,
size_t >, PtrAnal::hash
StmtMap
 

Private Attributes

std::list< std::string > fdefined
 
NameMap namemap
 
StmtMap stmtmap
 
std::vector< Stmtstmts
 
std::list< size_t > stmt_active
 

Detailed Description

Definition at line 9 of file PtrAnal.h.

Member Typedef Documentation

typedef void* PtrAnal::Stmt

Definition at line 14 of file PtrAnal.h.

typedef std::list<Stmt> PtrAnal::StmtRef

Definition at line 19 of file PtrAnal.h.

typedef boost::unordered_map<void*, VarRef, PtrAnal::hash> PtrAnal::NameMap
private

Definition at line 56 of file PtrAnal.h.

typedef boost::unordered_map<void*, std::pair<size_t,size_t>, PtrAnal::hash> PtrAnal::StmtMap
private

Definition at line 57 of file PtrAnal.h.

Member Enumeration Documentation

Enumerator
EQ 
NE 
LT 
GT 
LE 
GE 
OTHER 

Definition at line 13 of file PtrAnal.h.

Member Function Documentation

void PtrAnal::operator() ( AstInterface &  fa,
const AstNodePtr &  program 
)
bool PtrAnal::may_alias ( AstInterface &  fa,
const AstNodePtr &  r1,
const AstNodePtr &  r2 
)
VarRef PtrAnal::translate_exp ( const AstNodePtr &  exp) const
StmtRef PtrAnal::translate_stmt ( const AstNodePtr &  stmt) const
virtual bool PtrAnal::may_alias ( const std::string &  x,
const std::string &  y 
)
pure virtual

Implemented in SteensgaardPtrAnal.

virtual Stmt PtrAnal::x_eq_y ( const std::string &  x,
const std::string &  y 
)
pure virtual

Implemented in SteensgaardPtrAnal.

virtual Stmt PtrAnal::x_eq_addr_y ( const std::string &  x,
const std::string &  y 
)
pure virtual

Implemented in SteensgaardPtrAnal.

virtual Stmt PtrAnal::x_eq_deref_y ( const std::string &  x,
const std::string &  field,
const std::string &  y 
)
pure virtual

Implemented in SteensgaardPtrAnal.

virtual Stmt PtrAnal::x_eq_field_y ( const std::string &  x,
const std::string &  field,
const std::string &  y 
)
pure virtual

Implemented in SteensgaardPtrAnal.

virtual Stmt PtrAnal::deref_x_eq_y ( const std::string &  x,
const std::list< std::string > &  field,
const std::string &  y 
)
pure virtual

Implemented in SteensgaardPtrAnal.

virtual Stmt PtrAnal::field_x_eq_y ( const std::string &  x,
const std::list< std::string > &  field,
const std::string &  y 
)
pure virtual

Implemented in SteensgaardPtrAnal.

virtual Stmt PtrAnal::allocate_x ( const std::string &  x)
pure virtual

Implemented in SteensgaardPtrAnal.

virtual Stmt PtrAnal::x_eq_op_y ( OpType  op,
const std::string &  x,
const std::list< std::string > &  y 
)
pure virtual

Implemented in SteensgaardPtrAnal.

virtual Stmt PtrAnal::funcdef_x ( const std::string &  x,
const std::list< std::string > &  params,
const std::list< std::string > &  ouput 
)
pure virtual

Implemented in SteensgaardPtrAnal.

virtual Stmt PtrAnal::funccall_x ( const std::string &  x,
const std::list< std::string > &  args,
const std::list< std::string > &  result 
)
pure virtual

Implemented in SteensgaardPtrAnal.

virtual Stmt PtrAnal::funcexit_x ( const std::string &  x)
pure virtual

Implemented in SteensgaardPtrAnal.

virtual void PtrAnal::contrl_flow ( Stmt  stmt1,
Stmt  stmt2,
CFGConfig::EdgeType  t 
)
inlinevirtual

Definition at line 49 of file PtrAnal.h.

void PtrAnal::ProcessAssign ( AstInterface &  fa,
const AstNodePtr &  mod,
const AstNodePtr &  rhs,
bool  readlhs = 0 
)
protected
void PtrAnal::ProcessExpression ( AstInterface &  fa,
const std::string &  modname,
const AstNodePtr &  rhs 
)
protected
void PtrAnal::ProcessMod ( AstInterface &  fa,
const std::string &  readname,
std::list< std::string > &  fields,
const AstNodePtr &  mod 
)
protected
void PtrAnal::ControlFlowAnalysis ( AstInterface &  fa,
const AstNodePtr &  head,
Stmt  defn 
)
protected
std::string PtrAnal::Get_VarName ( AstInterface &  fa,
const AstNodePtr &  rhs 
)
protected
virtual bool PtrAnal::ProcessTree ( AstInterface &  _fa,
const AstNodePtr &  s,
AstInterface::TraversalVisitType  t 
)
protectedvirtual
static std::string PtrAnal::get_func_output ( const std::string &  fname,
int  i 
)
inlinestaticprotected

Definition at line 77 of file PtrAnal.h.

static std::string PtrAnal::get_func_par ( const std::string &  fname,
int  i 
)
inlinestaticprotected

Definition at line 79 of file PtrAnal.h.

Member Data Documentation

std::list<std::string> PtrAnal::fdefined
private

Definition at line 59 of file PtrAnal.h.

NameMap PtrAnal::namemap
private

Definition at line 60 of file PtrAnal.h.

StmtMap PtrAnal::stmtmap
private

Definition at line 61 of file PtrAnal.h.

std::vector<Stmt> PtrAnal::stmts
private

Definition at line 62 of file PtrAnal.h.

std::list<size_t> PtrAnal::stmt_active
private

Definition at line 63 of file PtrAnal.h.


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