SVF-tools / Test-Suite

PTABen: Micro-benchmark Suite for Pointer Analysis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

taquangtrung opened this issue · comments

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);
}

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.

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