Otawa  0.10
otawa::ai::WorkListDriver< D, G, S > Class Template Reference

Driver of abstract interpretation with a simple to-do list. More...

#include <otawa/dfa/ai.h>

Inheritance diagram for otawa::ai::WorkListDriver< D, G, S >:
elm::PreIterator< WorkListDriver< D, G, S >, G::vertex_t >

Public Types

typedef G::vertex_t vertex_t
 

Public Member Functions

 WorkListDriver (D &dom, const G &graph, S &store)
 Initialize the driver. More...
 
bool ended (void)
 Test if the traversal is ended. More...
 
void next (void)
 Go to the next vertex to process. More...
 
G::vertex_t item (void)
 Get the current vertex. More...
 
void change (void)
 Called when the output state of the current vertex is changed (and successors must be updated). More...
 
void change (typename D::t s)
 Set the new output state of the current vertex. More...
 
void change (typename G::edge_t edge)
 Called when the output state of the current vertex for the given edge is changed (and successors must be updated). More...
 
void change (typename G::edge_t edge, typename D::t s)
 Change the output value of the current vertex for the given edge. More...
 
void changeAll (void)
 Consider that all has been changed causing a re-computation of all. More...
 
void check (typename G::edge_t edge, typename D::t s)
 If there is a state change for the given edge. More...
 
D::t input (void)
 Compute the input state. More...
 
D::t input (vertex_t vertex)
 Compute the input state for the given vertex. More...
 
 operator bool (void) const
 
 operator G::vertex_t (void) const
 
WorkListDriver< D, G, S > & operator++ (void)
 
WorkListDriver< D, G, S > & operator++ (int)
 
G::vertex_t operator* (void) const
 
G::vertex_t operator-> (void) const
 

Private Member Functions

void push (typename G::vertex_t v)
 
G::vertex_t pop (void)
 
bool contains (vertex_t v)
 

Private Attributes

D & _dom
 
const G & _graph
 
S & _store
 
Vector< typename G::vertex_t > wl_vertices
 
BitVector wl_set
 
G::vertex_t cur
 
bool end
 

Detailed Description

template<class D, class G, class S>
class otawa::ai::WorkListDriver< D, G, S >

Driver of abstract interpretation with a simple to-do list.

Parameters
DCurrent domain (must implement otawa::ai::Domain concept).
GGraph (must implement otawa::ai::Graph concept).
SStorage.
DCurrent domain (must implement otawa::ai::Domain concept).
GGraph (must implement otawa::ai::Graph concept).
SStorage.

Member Typedef Documentation

template<class D , class G , class S >
typedef G::vertex_t otawa::ai::WorkListDriver< D, G, S >::vertex_t

Constructor & Destructor Documentation

template<class D , class G , class S >
otawa::ai::WorkListDriver< D, G, S >::WorkListDriver ( D &  dom,
const G &  graph,
S &  store 
)
inline

Initialize the driver.

Parameters
domDomain.
graphGraph to analyze.
storeStorage to get domain values.

Member Function Documentation

template<class D , class G , class S >
void otawa::ai::WorkListDriver< D, G, S >::change ( void  )
inline

Called when the output state of the current vertex is changed (and successors must be updated).

template<class D , class G , class S >
void otawa::ai::WorkListDriver< D, G, S >::change ( typename D::t  s)
inline

Set the new output state of the current vertex.

template<class D , class G , class S >
void otawa::ai::WorkListDriver< D, G, S >::change ( typename G::edge_t  edge)
inline

Called when the output state of the current vertex for the given edge is changed (and successors must be updated).

template<class D , class G , class S >
void otawa::ai::WorkListDriver< D, G, S >::change ( typename G::edge_t  edge,
typename D::t  s 
)
inline

Change the output value of the current vertex for the given edge.

template<class D , class G , class S >
void otawa::ai::WorkListDriver< D, G, S >::changeAll ( void  )
inline

Consider that all has been changed causing a re-computation of all.

References elm::genstruct::Vector< T >::pop(), and elm::genstruct::Vector< T >::push().

template<class D , class G , class S >
void otawa::ai::WorkListDriver< D, G, S >::check ( typename G::edge_t  edge,
typename D::t  s 
)
inline

If there is a state change for the given edge.

template<class D , class G , class S >
bool otawa::ai::WorkListDriver< D, G, S >::contains ( vertex_t  v)
inlineprivate
template<class D , class G , class S >
bool otawa::ai::WorkListDriver< D, G, S >::ended ( void  )
inline

Test if the traversal is ended.

Returns
True if ended, false else.

References otawa::p::end.

template<class D , class G , class S >
typename D::t otawa::ai::WorkListDriver< D, G, S >::input ( void  )
inline

Compute the input state.

template<class D , class G , class S >
typename D::t otawa::ai::WorkListDriver< D, G, S >::input ( vertex_t  vertex)
inline

Compute the input state for the given vertex.

Parameters
vertexVertex whose input is required.
Returns
Input state of vertex.
template<class D , class G , class S >
typename G::vertex_t otawa::ai::WorkListDriver< D, G, S >::item ( void  )
inline

Get the current vertex.

Returns
Current vertex.
template<class D , class G , class S >
void otawa::ai::WorkListDriver< D, G, S >::next ( void  )
inline

Go to the next vertex to process.

References otawa::p::end.

elm::PreIterator< WorkListDriver< D, G, S > , G::vertex_t >::operator bool ( void  ) const
inherited
elm::PreIterator< WorkListDriver< D, G, S > , G::vertex_t >::operator G::vertex_t ( void  ) const
inherited
G::vertex_t elm::PreIterator< WorkListDriver< D, G, S > , G::vertex_t >::operator* ( void  ) const
inherited
WorkListDriver< D, G, S > & elm::PreIterator< WorkListDriver< D, G, S > , G::vertex_t >::operator++ ( void  )
inherited
WorkListDriver< D, G, S > & elm::PreIterator< WorkListDriver< D, G, S > , G::vertex_t >::operator++ ( int  )
inherited
G::vertex_t elm::PreIterator< WorkListDriver< D, G, S > , G::vertex_t >::operator-> ( void  ) const
inherited
template<class D , class G , class S >
G::vertex_t otawa::ai::WorkListDriver< D, G, S >::pop ( void  )
inlineprivate
template<class D , class G , class S >
void otawa::ai::WorkListDriver< D, G, S >::push ( typename G::vertex_t  v)
inlineprivate

Member Data Documentation

template<class D , class G , class S >
D& otawa::ai::WorkListDriver< D, G, S >::_dom
private
template<class D , class G , class S >
const G& otawa::ai::WorkListDriver< D, G, S >::_graph
private
template<class D , class G , class S >
S& otawa::ai::WorkListDriver< D, G, S >::_store
private
template<class D , class G , class S >
G::vertex_t otawa::ai::WorkListDriver< D, G, S >::cur
private
template<class D , class G , class S >
bool otawa::ai::WorkListDriver< D, G, S >::end
private
template<class D , class G , class S >
BitVector otawa::ai::WorkListDriver< D, G, S >::wl_set
private
template<class D , class G , class S >
Vector<typename G::vertex_t> otawa::ai::WorkListDriver< D, G, S >::wl_vertices
private

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