sv-benchmarks icon indicating copy to clipboard operation
sv-benchmarks copied to clipboard

New function __VERIFIER_base_pointer

Open gernst opened this issue 5 years ago • 3 comments

It would be nice to include a new function into the benchmark rules

void *__VERIFIER_base_pointer(void *ptr);

that denotes the base pointer of an object, similarly to __CPROVER_POINTER_OBJECT as supported by CBMC.

Example:

int *a[N];
unsigned i;
__VERIFIER_assume(0 <= i && i < N);
assert(__VERIFIER_base_pointer(a + i) == a);

The exact semantics need to be discussed, e.g. in relation to structs.

Use case: Some benchmarks in #817 use this feature.

gernst avatar Sep 27 '19 13:09 gernst

Is there any discussion to include __VERIFIER_base_pointer in the competition rules? ESBMC is currently reporting wrong verification results in some cases of AWS C Common benchmarks due to the lack of implementation for this function. @dbeyer @tautschnig

feliperodri avatar Nov 15 '19 21:11 feliperodri

Wasn't this issue solved by some recent pull request?

dbeyer avatar Nov 23 '19 12:11 dbeyer

Wasn't this issue solved by some recent pull request?

@dbeyer PR #993 simply removed all the __VERIFIER_base_pointer calls, but I believe this issue will only be solved once we settle whether or not to include __VERIFIER_base_pointer into the benchmark rules, which I'm in favor.

feliperodri avatar Nov 23 '19 12:11 feliperodri