24 #ifndef OTAWA_DFA_HAI_FIRSTUNROLLINGFIXPOINT_H_
25 #define OTAWA_DFA_HAI_FIRSTUNROLLINGFIXPOINT_H_
32 #include <elm/genstruct/Vector.h>
35 namespace otawa {
namespace dfa {
namespace hai {
37 template <
class Listener>
40 typedef typename Listener::Problem
Problem;
41 typedef typename Problem::Domain
Domain;
87 template <
class Listener>
90 template <
class Listener >
93 Domain newHeaderState(bottom());
101 assign(newHeaderState, ai->entryEdgeUnion(bb));
108 assign(newHeaderState, ai->backEdgeUnion(bb));
117 assign(newHeaderState, ai->backEdgeUnion(bb));
119 if (prob.equals(newHeaderState, fpstate->
headerState))
129 assign(in, newHeaderState);
132 template <
class Listener >
145 prob.lub(**
STATE(e), s);
148 template <
class Listener >
154 template <
class Listener >
164 template <
class Listener >
166 return(prob.bottom());
169 template <
class Listener >
171 return(prob.entry());
174 template <
class Listener >
179 template <
class Listener >
184 template <
class Listener >
186 return (prob.equals(a,b));
189 template <
class Listener >
191 prob.update(out,in,bb);
194 template <
class Listener >
196 list.blockInterpreted(
this, bb, in, out, cur_cfg, callStack);
199 template <
class Listener >
201 list.fixPointReached(
this, bb);
204 template <
class Listener >
206 prob.enterContext(dom, bb, ctx);
209 template <
class Listener >
211 prob.leaveContext(dom, bb, ctx);
214 template <
class Listener >
void markEdge(PropList *e, const Domain &s)
Definition: FirstUnrollingFixPoint.h:133
void enterContext(Domain &dom, BasicBlock *bb, hai_context_t ctx) const
Definition: FirstUnrollingFixPoint.h:205
dtd::Element edge(dtd::make("edge", _EDGE).attr(source).attr(target).attr(called))
State info class for FirstUnrollingFixPoint This FixPoint needs to remember:
Definition: FirstUnrollingFixPoint.h:52
void lub(Domain &a, const Domain &b) const
Definition: FirstUnrollingFixPoint.h:175
bool equals(const Domain &a, const Domain &b) const
Definition: FirstUnrollingFixPoint.h:185
static Identifier< Domain * > STATE
Definition: FirstUnrollingFixPoint.h:45
Domain headerState
Definition: FirstUnrollingFixPoint.h:54
FirstUnrollingFixPoint(Listener &_list)
Definition: FirstUnrollingFixPoint.h:61
Domain * getMark(PropList *e)
Definition: FirstUnrollingFixPoint.h:155
void update(Domain &out, const Domain &in, BasicBlock *bb)
Definition: FirstUnrollingFixPoint.h:190
FixPointState(const Domain &bottom)
Definition: FirstUnrollingFixPoint.h:57
void leaveContext(Domain &dom, BasicBlock *bb, hai_context_t ctx) const
Definition: FirstUnrollingFixPoint.h:210
const Domain & entry(void) const
Definition: FirstUnrollingFixPoint.h:170
dtd::Element bb(dtd::make("bb", _BB).attr(id).attr(address).attr(size))
Control Flow Graph representation.
Definition: CFG.h:42
void blockInterpreted(BasicBlock *bb, const Domain &in, const Domain &out, CFG *cur_cfg, elm::genstruct::Vector< Edge * > *callStack) const
Definition: FirstUnrollingFixPoint.h:195
void init(HalfAbsInt< FirstUnrollingFixPoint > *_ai)
Definition: FirstUnrollingFixPoint.h:65
Implements abstract interpretation.
Definition: HalfAbsInt.h:64
FixPointState * newState(void)
Definition: FirstUnrollingFixPoint.h:60
FixPoint class for HalfAbsInt The DefaultFixPoint manages loops in a simple way.
Definition: FirstUnrollingFixPoint.h:38
Identifier< State * > STATE("otawa::stack::STATE", 0)
Stack analysis state at entry of BBs.
void unmarkEdge(PropList *e)
Definition: FirstUnrollingFixPoint.h:149
sys::SystemOutStream & out
int numIter
Definition: FirstUnrollingFixPoint.h:56
hai_context_t
Definition: HalfAbsInt.h:50
This class represents edges in the CFG representation.
Definition: Edge.h:33
Problem::Domain Domain
Definition: FirstUnrollingFixPoint.h:41
Listener & list
Definition: FirstUnrollingFixPoint.h:47
void assign(Domain &a, const Domain &b) const
Definition: FirstUnrollingFixPoint.h:180
This is the minimal definition of a basic block.
Definition: BasicBlock.h:43
void fixPoint(BasicBlock *bb, bool &fixpoint, Domain &in, bool firstTime) const
Definition: FirstUnrollingFixPoint.h:91
void updateEdge(Edge *edge, Domain &dom)
Definition: FirstUnrollingFixPoint.h:215
~FirstUnrollingFixPoint(void)
Definition: FirstUnrollingFixPoint.h:62
This a list of properties.
Definition: PropList.h:63
Listener::Problem Problem
Definition: FirstUnrollingFixPoint.h:40
Problem & prob
Definition: FirstUnrollingFixPoint.h:46
const Domain & bottom(void) const
Definition: FirstUnrollingFixPoint.h:165
HalfAbsInt< FirstUnrollingFixPoint > * ai
Definition: FirstUnrollingFixPoint.h:48
int getIter(BasicBlock *bb) const
Definition: FirstUnrollingFixPoint.h:64
void fixPointReached(BasicBlock *bb) const
Definition: FirstUnrollingFixPoint.h:200
Domain firstIterState
Definition: FirstUnrollingFixPoint.h:55