esbmc / esbmc

The efficient SMT-based context-bounded model checker (ESBMC)
http://esbmc.org/
Other
261 stars 89 forks source link

Support C99 semantics of `restrict` pointers #1146

Open fbrausse opened 12 months ago

fbrausse commented 12 months ago

Example:

#include <assert.h>

void f(void *restrict a, void *restrict b)
{
    assert(a != b);
}

esbmc --func f reports a counter-example, by setting a == b. However, a conforming C program is not allowed to call f with a == b, so I wonder whether ESBMC should adhere to this "conformance" when assigning nondet values to both variables.

rafaelsamenezes commented 10 months ago

As a entry point I would say that adding the assumption that a != b seems reasonable.