24 #ifndef OTAWA_DFA_HAI_DEFAULTLISTENER_H_
25 #define OTAWA_DFA_HAI_DEFAULTLISTENER_H_
33 #include <elm/genstruct/Vector.h>
35 namespace otawa {
namespace dfa {
namespace hai {
53 for (
int i = 0; i < col->
count(); i++) {
58 for (
int j = 0; j < cfg->
countBB(); j++){
59 results[i][j] =
new typename Problem::Domain(
prob.bottom());
68 for (
int i = 0; i < col->
count(); i++) {
70 for (
int j = 0; j < cfg->
countBB(); j++){
102 template <
class Problem >
105 template <
class Problem >
108 int bbnumber = bb->
number() ;
109 int cfgnumber = cur_cfg->
number();
111 prob.lub(*results[cfgnumber][bbnumber], in);
113 if (BB_OUT_STATE(bb) != 0)
114 prob.lub(**BB_OUT_STATE(bb), out);
117 prob.lub(*results_out[cfgnumber][bbnumber], out);
118 #ifdef HAI_LISTENER_DEBUG
119 cerr <<
"INFO: " << bb <<
"\n\tIN = " << in <<
"\n\tOUT= " << out <<
"\n";
123 template <
class Problem >
129 #endif // OTAWA_DFA_HAI_DEFAULTLISTENER_H_
Problem & getProb()
Definition: DefaultListener.h:88
Definition: DefaultFixPoint.h:38
bool store_out
Definition: DefaultListener.h:95
DefaultListener(WorkSpace *_fw, Problem &_prob, bool _store_out=false)
Definition: DefaultListener.h:48
void blockInterpreted(const DefaultFixPoint< DefaultListener > *fp, BasicBlock *bb, const typename Problem::Domain &in, const typename Problem::Domain &out, CFG *cur_cfg, elm::genstruct::Vector< Edge * > *callStack) const
This is called whenever a block is processed.
Definition: DefaultListener.h:106
int number(void)
Definition: CFG.h:111
dtd::Element bb(dtd::make("bb", _BB).attr(id).attr(address).attr(size))
Control Flow Graph representation.
Definition: CFG.h:42
~DefaultListener()
Definition: DefaultListener.h:66
Problem::Domain *** results_out
Definition: DefaultListener.h:46
CFG * get(int index) const
Get a CFG from the collection using its index.
Definition: features.h:51
static Identifier< typename Problem::Domain * > BB_OUT_STATE
PRIVATE - DO NOT USE.
Definition: DefaultListener.h:43
A workspace represents a program, its run-time and all information about WCET computation or any othe...
Definition: WorkSpace.h:67
Contains a collection of CFGs (used with INVOLVED_CFGS property).
Definition: features.h:45
WorkSpace * fw
Definition: DefaultListener.h:93
int number(void) const
Get the number hooked on this basic block, that is, value of ID_Index property.
Definition: BasicBlock.h:146
sys::SystemOutStream & out
Problem & prob
Definition: DefaultListener.h:94
Identifier< const CFGCollection * > INVOLVED_CFGS
This property is used to link the current computation involved CFG on the framework.
P Problem
Definition: DefaultListener.h:41
dtd::Element cfg(dtd::make("cfg", _CFG).attr(id).content((entry,*bb, exit,*edge)))
This is the minimal definition of a basic block.
Definition: BasicBlock.h:43
int count(void) const
Get the count of CFG in the collection.
Definition: features.h:50
Problem::Domain *** results
Definition: DefaultListener.h:45
void fixPointReached(const DefaultFixPoint< DefaultListener > *fp, BasicBlock *bb)
This is called whenever a loop's fixpoint is reached.
Definition: DefaultListener.h:124
This listener gathers in an array the LUB of the in-states for all analyzed basic blocks...
Definition: DefaultListener.h:38
int countBB(void)
Definition: CFG.h:105