Otawa  0.10
otawa::dfa::XCFGVisitor< P > Class Template Reference

This class implements the visitor concept of XIterativeDFA class and allows applying an analysis on a collection of CFG in a flow-insensitive way. More...

#include <otawa/dfa/XCFGVisitor.h>

Classes

struct  node_t
 

Public Types

typedef P::domain_t domain_t
 
typedef Pair< CFG *, BasicBlock * > key_t
 

Public Member Functions

 XCFGVisitor (const CFGCollection &cfgs, P &domain)
 Build the visitor to apply on the given domain and CFG collection. More...
 
 ~XCFGVisitor (void)
 
domain_tempty (void)
 
void free (domain_t *d)
 
domain_tgen (int node)
 
domain_tpreserve (int node)
 
int index (const key_t &key)
 
int size (void)
 
void visitPreds (XIterativeDFA< XCFGVisitor< P > > &engine, int node)
 
void visitSuccs (XIterativeDFA< XCFGVisitor< P > > &engine, int node)
 

Private Types

typedef struct
otawa::dfa::XCFGVisitor::node_t 
node_t
 

Private Attributes

P & dom
 
const CFGCollectioncfgs
 
FragTable< node_tnodes
 
int * offs
 
Vector< int > * preds
 

Detailed Description

template<class P>
class otawa::dfa::XCFGVisitor< P >

This class implements the visitor concept of XIterativeDFA class and allows applying an analysis on a collection of CFG in a flow-insensitive way.

Parameters
PProblem to resolve.

The problem concept must implements the following concept:

typedef domain_t; // domain type
domain_t *empty(void); // return an empty domain
domain_t *gen(CFG *cfg, BasicBlock *bb); // return the GEN value
domain_t *kill(CFG *cfg, BasicBlock *bb); // return the KILL value
void free(domain_t *d); // free the given domain

The domain_t type must implements the following concept:

void reset(void); // reset the domain
void join(domain_t *d); // join between current domain and given one.
void meet(domain_t *d); // meet between current domain and given one.
bool equals(domain_t *d); // test if both domains are equals

Member Typedef Documentation

template<class P>
typedef P::domain_t otawa::dfa::XCFGVisitor< P >::domain_t
template<class P>
typedef Pair<CFG *, BasicBlock *> otawa::dfa::XCFGVisitor< P >::key_t
template<class P>
typedef struct otawa::dfa::XCFGVisitor::node_t otawa::dfa::XCFGVisitor< P >::node_t
private

Constructor & Destructor Documentation

template<class D >
otawa::dfa::XCFGVisitor< D >::~XCFGVisitor ( void  )

Member Function Documentation

template<class P>
domain_t* otawa::dfa::XCFGVisitor< P >::empty ( void  )
inline
template<class P>
void otawa::dfa::XCFGVisitor< P >::free ( domain_t d)
inline
template<class P>
domain_t* otawa::dfa::XCFGVisitor< P >::gen ( int  node)
inline
template<class P>
int otawa::dfa::XCFGVisitor< P >::index ( const key_t key)
inline
template<class P>
domain_t* otawa::dfa::XCFGVisitor< P >::preserve ( int  node)
inline
template<class P>
int otawa::dfa::XCFGVisitor< P >::size ( void  )
inline
template<class P>
void otawa::dfa::XCFGVisitor< D >::visitSuccs ( XIterativeDFA< XCFGVisitor< P > > &  engine,
int  node 
)

Member Data Documentation

template<class P>
const CFGCollection& otawa::dfa::XCFGVisitor< P >::cfgs
private
template<class P>
P& otawa::dfa::XCFGVisitor< P >::dom
private
template<class P>
FragTable<node_t> otawa::dfa::XCFGVisitor< P >::nodes
private
template<class P>
int* otawa::dfa::XCFGVisitor< P >::offs
private
template<class P>
Vector<int>* otawa::dfa::XCFGVisitor< P >::preds
private

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