SVF-tools / Test-Suite

PTABen: Micro-benchmark Suite for Pointer Analysis
70 stars 38 forks source link

The last assertion of `cs_tests/recur5.c` should be NOALIAS? #24

Open taquangtrung opened 3 years ago

taquangtrung commented 3 years ago

Hi,

For the last assertion, should it be NOALIAS instead of EXPECTEDFAIL_NOALIAS? This is because k and &r are aliases, and &r and &z are not aliases.

Could you advise if my understanding is correct?

// cs_tests/recur5.c

#include "aliascheck.h"
int* x, x1;
void f(int **m){
int **n,*y,*k,z,r;
   n = &y;
   y = &z;
   if(z==1){
    *n=&r;
    MUSTALIAS(y,&r);
    EXPECTEDFAIL_NOALIAS(y,&z);
    k = *n;
    MUSTALIAS(k,&r);
    EXPECTEDFAIL_NOALIAS(k,&z);
    f(n);
   }
}

int main(){
    x=&x1;
    f(x);
}
yuleisui commented 3 years ago

This test-suite is for validating SUPA's context-sensitive pointer analysis, which may be conservative for recursions. This case the noalias pair maybe treated as mayalias, thus the assertions indicate that this is a conservative case for the underlying pointer anlaysis.

taquangtrung commented 3 years ago

I see. So EXPECTEDFAIL_NOALIAS can be understood as MAYALIAS, hence could also be NOALIAS?