Commit 7b92fbd1 authored by Maeva Ramarjiaona's avatar Maeva Ramarjiaona

trying to fix underapproximation 2

parent dfa8aaab
......@@ -20,6 +20,7 @@ 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]);
......@@ -64,8 +65,9 @@ void ExistHitPrevUAdapter::update(Block *v, t& d)
// merge result
lrumc::ExistHitDomain::t* tmp = _mayManager.ehValue(_set);
ASSERT(tmp && "tmp null");
_domain.join(d, s, d_eh, *tmp);
_mayManager.ehDomain(_set).join(d_eh, *tmp);
lrumc::ExistHitDomain::t& s_eh = *tmp;
_domain.join(d, s, d_eh, s_eh);
_mayManager.ehDomain(_set).join(d_eh, s_eh);
}
}
......
......@@ -40,6 +40,7 @@ void ExistHitPrevUAnalysis::setup(WorkSpace* ws)
}
void ExistHitPrevUAnalysis::processWorkSpace(WorkSpace* ws) //changer les ACS en ACSSecurity
{
auto start = std::chrono::system_clock::now();
// prepare containers
......
......@@ -30,14 +30,14 @@ bool ExistHitPrevUDomain::equals(const t& acss, const t& bcss) const
void ExistHitPrevUDomain::join(t& dcss, const t& scss, icat3::ACS d_eh, icat3::ACS s_eh)
{
for (int i = 0; i < _n; i++){
if (s_eh[i] < d_eh[i]){
if (s_eh[i] < d_eh[i] || (d_eh[i] == -1 && s_eh[i] != -1)){
dcss[i] = scss[i];
}
else if (s_eh[i] == d_eh[i]){
int fullsize = dcss.size()+scss.size();
int fullsize = (dcss[i]).size()+(scss[i]).size();
Bag<Address> tmp = Bag<Address>(fullsize);
for (int j = 0; j < fullsize; j++){
if (j < dcss.size())
if (j < (dcss[i]).size())
tmp[j] = dcss[i][j] ;
else
tmp[j] = scss[i][j-dcss.size()];
......
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