Commit c71e01f1 authored by Valentin Touzeau's avatar Valentin Touzeau

Refactoring

parent d51a4b37
...@@ -89,7 +89,7 @@ p::declare ExistHitPrevAnalysis::reg = p::init("lrusecurity::ExistHitPrevAnalysi ...@@ -89,7 +89,7 @@ p::declare ExistHitPrevAnalysis::reg = p::init("lrusecurity::ExistHitPrevAnalysi
.require(COLLECTED_CFG_FEATURE) .require(COLLECTED_CFG_FEATURE)
.require(icat3::MUST_PERS_ANALYSIS_FEATURE) .require(icat3::MUST_PERS_ANALYSIS_FEATURE)
.require(icat3::CATEGORY_FEATURE) .require(icat3::CATEGORY_FEATURE)
.require(lrumc::EXIST_HIT_ANALYSIS_FEATURE) .require(lrupreanalysis::eh_em::EXIST_HIT_ANALYSIS_FEATURE)
.provide(EXIST_HIT_PREV_ANALYSIS_FEATURE) .provide(EXIST_HIT_PREV_ANALYSIS_FEATURE)
.make<ExistHitPrevAnalysis>(); .make<ExistHitPrevAnalysis>();
......
...@@ -89,7 +89,7 @@ p::declare ExistHitPrevOAnalysis::reg = p::init("lrusecurity::ExistHitPrevOAnaly ...@@ -89,7 +89,7 @@ p::declare ExistHitPrevOAnalysis::reg = p::init("lrusecurity::ExistHitPrevOAnaly
.require(COLLECTED_CFG_FEATURE) .require(COLLECTED_CFG_FEATURE)
.require(icat3::MUST_PERS_ANALYSIS_FEATURE) .require(icat3::MUST_PERS_ANALYSIS_FEATURE)
.require(icat3::CATEGORY_FEATURE) .require(icat3::CATEGORY_FEATURE)
.require(lrumc::EXIST_HIT_ANALYSIS_FEATURE) .require(lrupreanalysis::eh_em::EXIST_HIT_ANALYSIS_FEATURE)
.provide(EXIST_HIT_PREV_O_ANALYSIS_FEATURE) .provide(EXIST_HIT_PREV_O_ANALYSIS_FEATURE)
.make<ExistHitPrevOAnalysis>(); .make<ExistHitPrevOAnalysis>();
......
...@@ -34,7 +34,7 @@ public: ...@@ -34,7 +34,7 @@ public:
private: private:
int _set; int _set;
lrumc::ACSManager _mayManager; lrupreanalysis::eh_em::ACSManager _ehManager;
domain_t _domain; domain_t _domain;
graph_t _graph; graph_t _graph;
store_t _store; store_t _store;
......
...@@ -27,8 +27,8 @@ public: ...@@ -27,8 +27,8 @@ public:
inline void copy(t& d, const t& s) { d.copy(s); } inline void copy(t& d, const t& s) { d.copy(s); }
bool equals(const t& a, const t& b) const; bool equals(const t& a, const t& b) const;
void join(t& d, const t& s, otawa::icat3::ACS d_eh, otawa::icat3::ACS s_eh); void join(t& d, const t& s, otawa::icat3::ACS d_eh, otawa::icat3::ACS s_eh);
void fetch(t& a, const otawa::icache::Access& ac, lrumc::ACSManager& mayManager); void fetch(t& a, const otawa::icache::Access& ac, lrupreanalysis::eh_em::ACSManager& mayManager);
void update(const otawa::icache::Access& access, t& a, lrumc::ACSManager& mayManager); void update(const otawa::icache::Access& access, t& a, lrupreanalysis::eh_em::ACSManager& mayManager);
private: private:
int _n; int _n;
......
#include "ExistHitPrevUAdapter.h" #include "ExistHitPrevUAdapter.h"
#include <lrupreanalysis/ExistHitDomain.h>
using namespace otawa; using namespace otawa;
namespace lrusecurity namespace lrusecurity
...@@ -12,7 +14,7 @@ ExistHitPrevUAdapter::ExistHitPrevUAdapter( ...@@ -12,7 +14,7 @@ ExistHitPrevUAdapter::ExistHitPrevUAdapter(
const CFGCollection& cfgs, const CFGCollection& cfgs,
otawa::WorkSpace* ws) : otawa::WorkSpace* ws) :
_set(set), _set(set),
_mayManager(ws), _ehManager(ws),
_domain(coll, set, init), _domain(coll, set, init),
_graph(cfgs), _graph(cfgs),
_store(_domain, _graph) _store(_domain, _graph)
...@@ -22,8 +24,8 @@ ExistHitPrevUAdapter::ExistHitPrevUAdapter( ...@@ -22,8 +24,8 @@ ExistHitPrevUAdapter::ExistHitPrevUAdapter(
void ExistHitPrevUAdapter::update(const Bag<icache::Access>& accs, t& d) void ExistHitPrevUAdapter::update(const Bag<icache::Access>& accs, t& d)
{ {
for(int i = 0; i < accs.count(); i++) { for(int i = 0; i < accs.count(); i++) {
_domain.update(accs[i], d, _mayManager); _domain.update(accs[i], d, _ehManager);
_mayManager.update(accs[i]); _ehManager.update(accs[i]);
} }
} }
...@@ -31,7 +33,7 @@ void ExistHitPrevUAdapter::update(const Bag<icache::Access>& accs, t& d) ...@@ -31,7 +33,7 @@ void ExistHitPrevUAdapter::update(const Bag<icache::Access>& accs, t& d)
void ExistHitPrevUAdapter::update(Block *v, t& d) void ExistHitPrevUAdapter::update(Block *v, t& d)
{ {
_domain.copy(d, _domain.bot()); _domain.copy(d, _domain.bot());
lrumc::ExistHitDomain::t d_eh; lrupreanalysis::eh_em::ExistHitDomain::t d_eh;
t s; t s;
...@@ -41,10 +43,10 @@ void ExistHitPrevUAdapter::update(Block *v, t& d) ...@@ -41,10 +43,10 @@ void ExistHitPrevUAdapter::update(Block *v, t& d)
Block *w = e->source(); Block *w = e->source();
_domain.copy(s, _store.get(w)); _domain.copy(s, _store.get(w));
_mayManager.start(w); _ehManager.start(w);
if(first) { if(first) {
first = false; first = false;
_mayManager.ehDomain(_set).copy(d_eh, _mayManager.ehDomain(_set).bot()); _ehManager.ehDomain(_set).copy(d_eh, _ehManager.ehDomain(_set).bot());
} }
// apply block // apply block
...@@ -63,11 +65,11 @@ void ExistHitPrevUAdapter::update(Block *v, t& d) ...@@ -63,11 +65,11 @@ void ExistHitPrevUAdapter::update(Block *v, t& d)
// merge result // merge result
lrumc::ExistHitDomain::t* tmp = _mayManager.ehValue(_set); lrupreanalysis::eh_em::ExistHitDomain::t* tmp = _ehManager.ehValue(_set);
ASSERT(tmp && "tmp null"); ASSERT(tmp && "tmp null");
lrumc::ExistHitDomain::t& s_eh = *tmp; lrupreanalysis::eh_em::ExistHitDomain::t& s_eh = *tmp;
_domain.join(d, s, d_eh, s_eh); _domain.join(d, s, d_eh, s_eh);
_mayManager.ehDomain(_set).join(d_eh, s_eh); _ehManager.ehDomain(_set).join(d_eh, s_eh);
} }
} }
......
...@@ -88,7 +88,7 @@ p::declare ExistHitPrevUAnalysis::reg = p::init("lrusecurity::ExistHitPrevUAnaly ...@@ -88,7 +88,7 @@ p::declare ExistHitPrevUAnalysis::reg = p::init("lrusecurity::ExistHitPrevUAnaly
.require(COLLECTED_CFG_FEATURE) .require(COLLECTED_CFG_FEATURE)
.require(icat3::MUST_PERS_ANALYSIS_FEATURE) .require(icat3::MUST_PERS_ANALYSIS_FEATURE)
.require(icat3::CATEGORY_FEATURE) .require(icat3::CATEGORY_FEATURE)
.require(lrumc::EXIST_HIT_ANALYSIS_FEATURE) .require(lrupreanalysis::eh_em::EXIST_HIT_ANALYSIS_FEATURE)
.provide(EXIST_HIT_PREV_U_ANALYSIS_FEATURE) .provide(EXIST_HIT_PREV_U_ANALYSIS_FEATURE)
.make<ExistHitPrevUAnalysis>(); .make<ExistHitPrevUAnalysis>();
......
...@@ -46,7 +46,7 @@ bool ExistHitPrevUDomain::equals(const t& acss, const t& bcss) const ...@@ -46,7 +46,7 @@ bool ExistHitPrevUDomain::equals(const t& acss, const t& bcss) const
} }
} }
} }
void ExistHitPrevUDomain::fetch(t& acss, const icache::Access& access, lrumc::ACSManager& ehManager) void ExistHitPrevUDomain::fetch(t& acss, const icache::Access& access, lrupreanalysis::eh_em::ACSManager& ehManager)
{ {
icat3::LBlock *lb = icat3::LBLOCK(access); icat3::LBlock *lb = icat3::LBLOCK(access);
int b = lb->index(); int b = lb->index();
...@@ -59,7 +59,7 @@ bool ExistHitPrevUDomain::equals(const t& acss, const t& bcss) const ...@@ -59,7 +59,7 @@ bool ExistHitPrevUDomain::equals(const t& acss, const t& bcss) const
} }
} }
void ExistHitPrevUDomain::update(const icache::Access& access, t& a, lrumc::ACSManager& ehManager) void ExistHitPrevUDomain::update(const icache::Access& access, t& a, lrupreanalysis::eh_em::ACSManager& ehManager)
{ {
switch(access.kind()) { switch(access.kind()) {
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
#include <otawa/proc/BBProcessor.h> #include <otawa/proc/BBProcessor.h>
#include <otawa/prog/Process.h> #include <otawa/prog/Process.h>
#include <lrumc/features.h> #include <lruexact/features.h>
#include "SecCFGOutput.h" //#include "SecCFGOutput.h"
using namespace otawa; using namespace otawa;
namespace lrusecurity namespace lrusecurity
...@@ -29,10 +29,10 @@ public: ...@@ -29,10 +29,10 @@ public:
virtual void configure(const PropList& props) override virtual void configure(const PropList& props) override
{ {
otawa::BBProcessor::configure(props); otawa::BBProcessor::configure(props);
if(props.hasProp(lrupreanalysis::CLASSIFICATION_PATH)) if(props.hasProp(lruexact::CLASSIFICATION_PATH))
_path = lrupreanalysis::CLASSIFICATION_PATH(props); _path = lruexact::CLASSIFICATION_PATH(props);
if(props.hasProp(lrupreanalysis::CLASSIFICATION_TO_FILE)) if(props.hasProp(lruexact::CLASSIFICATION_TO_FILE))
_toFile = lrupreanalysis::CLASSIFICATION_TO_FILE(props); _toFile = lruexact::CLASSIFICATION_TO_FILE(props);
} }
protected: protected:
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include <otawa/hard/Memory.h> #include <otawa/hard/Memory.h>
#include <lrumc/ACSManager.h> #include <lrumc/ACSManager.h>
#include <lrusecurity/features.h> #include <lrusecurity/features.h>
#include <lrupreanalysis/features.h> #include <lruexact/features.h>
using namespace otawa; using namespace otawa;
namespace lrusecurity namespace lrusecurity
...@@ -53,8 +53,8 @@ protected: ...@@ -53,8 +53,8 @@ protected:
void processAccesses(Bag<icache::Access>& accs) { void processAccesses(Bag<icache::Access>& accs) {
for(int i = 0; i < accs.count(); i++) { for(int i = 0; i < accs.count(); i++) {
lrusecurity::SecurityCategory cat; lrusecurity::SecurityCategory cat;
if (lrupreanalysis::EXACT_CATEGORY(accs[i]) == if (lruexact::EXACT_CATEGORY(accs[i]) ==
lrupreanalysis::ExactCategory::DU) lruexact::ExactCategory::DU)
cat = SecurityCategory::UNSAFE; cat = SecurityCategory::UNSAFE;
else else
cat = SecurityCategory::SAFE; cat = SecurityCategory::SAFE;
...@@ -86,7 +86,7 @@ p::declare SecurityCatBuilder::reg = p::init("lrusecurity::SecurityCatBuilder", ...@@ -86,7 +86,7 @@ p::declare SecurityCatBuilder::reg = p::init("lrusecurity::SecurityCatBuilder",
.make<SecurityCatBuilder>() .make<SecurityCatBuilder>()
.require(otawa::icat3::LBLOCKS_FEATURE) .require(otawa::icat3::LBLOCKS_FEATURE)
.require(otawa::hard::MEMORY_FEATURE) .require(otawa::hard::MEMORY_FEATURE)
.require(lrupreanalysis::LRU_CLASSIFICATION_FEATURE) .require(lruexact::LRU_CLASSIFICATION_FEATURE)
.provide(lrusecurity::SECURITY_CATEGORY_FEATURE); .provide(lrusecurity::SECURITY_CATEGORY_FEATURE);
......
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