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