Commit e3b87b2a authored by Valentin Touzeau's avatar Valentin Touzeau Committed by EXT Valentin Touzeau
Browse files

WIP

parent 415a43ed
...@@ -18,9 +18,10 @@ public: ...@@ -18,9 +18,10 @@ public:
using Block = otawa::icat3::LBlock; using Block = otawa::icat3::LBlock;
using ManagerPtr = std::shared_ptr<ZDDManager>; using ManagerPtr = std::shared_ptr<ZDDManager>;
enum class Init {Top, Bot}; // Build bottom
ZDDAbstractValue();
ZDDAbstractValue(Init init = Init::Bot); // Build top
ZDDAbstractValue(const otawa::icat3::LBlock* focus, const otawa::icat3::LBlockCollection& coll, int set);
void join(const ZDDAbstractValue& other); void join(const ZDDAbstractValue& other);
void update(ManagerPtr manager, const Block* block, int k, const Block* focus); void update(ManagerPtr manager, const Block* block, int k, const Block* focus);
bool operator==(const ZDDAbstractValue& other) const; bool operator==(const ZDDAbstractValue& other) const;
...@@ -33,10 +34,19 @@ protected: ...@@ -33,10 +34,19 @@ protected:
}; };
template <typename AbstractValuePolicy> template <typename AbstractValuePolicy>
ZDDAbstractValue<AbstractValuePolicy>::ZDDAbstractValue(Init init) : ZDDAbstractValue<AbstractValuePolicy>::ZDDAbstractValue() :
AbstractValuePolicy(),
_isBottom(true),
_isTop(false),
_zdd()
{
}
template <typename AbstractValuePolicy>
ZDDAbstractValue<AbstractValuePolicy>::ZDDAbstractValue(const otawa::icat3::LBlock*, const otawa::icat3::LBlockCollection&, int) :
AbstractValuePolicy(), AbstractValuePolicy(),
_isBottom(init == Init::Bot), _isBottom(false),
_isTop(init == Init::Top), _isTop(true),
_zdd() _zdd()
{ {
} }
......
...@@ -25,13 +25,13 @@ public: ...@@ -25,13 +25,13 @@ public:
const otawa::icat3::LBlockCollection&, const otawa::icat3::LBlockCollection&,
int) int)
{ {
return AbstractValue(AbstractValue::Init::Bot); return AbstractValue();
} }
AbstractValue createTop(const otawa::icat3::LBlock*, AbstractValue createTop(const otawa::icat3::LBlock* focus,
const otawa::icat3::LBlockCollection&, const otawa::icat3::LBlockCollection& coll,
int) int set)
{ {
return AbstractValue(AbstractValue::Init::Top); return AbstractValue(focus, coll, set);
} }
ManagerPtr getManager() const ManagerPtr getManager() const
......
...@@ -25,13 +25,13 @@ public: ...@@ -25,13 +25,13 @@ public:
const otawa::icat3::LBlockCollection&, const otawa::icat3::LBlockCollection&,
int) int)
{ {
return AbstractValue(AbstractValue::Init::Bot); return AbstractValue();
} }
AbstractValue createTop(const otawa::icat3::LBlock*, AbstractValue createTop(const otawa::icat3::LBlock* focus,
const otawa::icat3::LBlockCollection&, const otawa::icat3::LBlockCollection& coll,
int) int set)
{ {
return AbstractValue(AbstractValue::Init::Top); return AbstractValue(focus, coll, set);
} }
ManagerPtr getManager() const ManagerPtr getManager() const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment