24 #ifndef OTAWA_DFA_HAI_WIDENINGLISTENER_H_
25 #define OTAWA_DFA_HAI_WIDENINGLISTENER_H_
33 #include <elm/genstruct/Vector.h>
35 namespace otawa {
namespace dfa {
namespace hai {
58 for (
int i = 0; i < col->
count(); i++) {
63 for (
int j = 0; j < cfg->
countBB(); j++){
64 results[i][j] =
new typename Problem::Domain(
prob.bottom());
73 for (
int i = 0; i < col->
count(); i++) {
75 for (
int j = 0; j < cfg->
countBB(); j++){
108 template <
class Problem >
111 template <
class Problem >
114 int bbnumber = bb->
number() ;
115 int cfgnumber = cur_cfg->
number();
117 prob.lub(*results[cfgnumber][bbnumber], in);
119 if (BB_OUT_STATE(bb) != 0)
120 prob.lub(**BB_OUT_STATE(bb), out);
123 prob.lub(*results_out[cfgnumber][bbnumber], out);
125 cout <<
"[TRACE] Block " << bbnumber <<
": IN=" << in <<
" OUT=" << out <<
"\n";
129 template <
class Problem >
135 #endif // OTAWA_DFA_HAI_WIDENINGLISTENER_H_
WideningListener(WorkSpace *_fw, Problem &_prob, bool _store_out=false)
Definition: WideningListener.h:53
Problem::Domain *** results_out
Definition: WideningListener.h:51
Problem & prob
Definition: WideningListener.h:99
void fixPointReached(const WideningFixPoint< WideningListener > *fp, BasicBlock *bb)
This is called whenever a loop's fixpoint is reached.
Definition: WideningListener.h:130
~WideningListener()
Definition: WideningListener.h:71
Definition: WideningFixPoint.h:44
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
static Identifier< typename Problem::Domain * > BB_OUT_STATE
PRIVATE - DO NOT USE.
Definition: WideningListener.h:48
CFG * get(int index) const
Get a CFG from the collection using its index.
Definition: features.h:51
Problem::Domain *** results
Definition: WideningListener.h:50
WorkSpace * fw
Definition: WideningListener.h:98
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
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
Identifier< const CFGCollection * > INVOLVED_CFGS
This property is used to link the current computation involved CFG on the framework.
dtd::Element cfg(dtd::make("cfg", _CFG).attr(id).content((entry,*bb, exit,*edge)))
This listener gathers in an array the LUB of the in-states for all analyzed basic blocks...
Definition: WideningListener.h:40
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
void blockInterpreted(const WideningFixPoint< WideningListener > *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: WideningListener.h:112
P Problem
Definition: WideningListener.h:46
Problem & getProb()
Definition: WideningListener.h:93
bool store_out
Definition: WideningListener.h:100
int countBB(void)
Definition: CFG.h:105