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

Use of `__VERIFIER_nondet_*` functions that aren't specified in SV-COMP rules

Open RyanGlScott opened this issue 2 years ago • 1 comments

I've noticed that various programs in this repo use __VERIFIER_nondet_* functions that seemingly aren't mentioned anywhere in the SV-COMP rules. I'm using this section of the 2021 SV-COMP rules as a reference:

__VERIFIER_nondet_X(): In order to model nondeterministic values, the following functions can be assumed to return an arbitrary value of the indicated type: __VERIFIER_nondet_X() (and nondet_X(), deprecated) with X in {bool, char, int, float, double, loff_t, long, pchar, pthread_t, sector_t, short, size_t, u32, uchar, uint, ulong, unsigned, ushort} (no side effects, pointer for void *, etc.). The verification tool can assume that the functions are implemented according to the following template: X __VERIFIER_nondet_X() { X val; return val; }

The following programs assume the existence of __VERIFIER_nondet_* that aren't in this list:

I'm unclear if the rules are incomplete or if these programs aren't following the SV-COMP rules.

RyanGlScott avatar Sep 07 '21 13:09 RyanGlScott

__VERIFIER_nondet_charp can be replaced by __VERIFIER_nondet_pchar. But actually, we removed __VERIFIER_nondet_pointer in the past (https://github.com/sosy-lab/sv-benchmarks/issues/767) and the same reasoning also applies to other pointer-returning nondet methods. So these should probably all be refactored.

For the rest of the methods, the rules should just be extended.

PhilippWendler avatar Sep 20 '21 05:09 PhilippWendler