diff --git a/c/nla-digbench-scaling/Makefile b/c/nla-digbench-scaling/Makefile index a75f52adbc3..c9635d64353 100644 --- a/c/nla-digbench-scaling/Makefile +++ b/c/nla-digbench-scaling/Makefile @@ -6,6 +6,8 @@ # # SPDX-License-Identifier: Apache-2.0 +CLANG_WARNINGS := -Wno-error=tautological-compare + LEVEL := ../ include $(LEVEL)/Makefile.config diff --git a/c/nla-digbench-scaling/README.md b/c/nla-digbench-scaling/README.md index 520bbebf011..d1d34eb1260 100644 --- a/c/nla-digbench-scaling/README.md +++ b/c/nla-digbench-scaling/README.md @@ -1,3 +1,11 @@ + The benchmarks in this directory were generated by Martin Spiessl based on the tasks in the nla-digbench folder, which were originally were submitted by diff --git a/c/nla-digbench-scaling/bresenham-ll_unwindbound1.c b/c/nla-digbench-scaling/bresenham-ll_unwindbound1.c new file mode 100644 index 00000000000..2a2cc7897fc --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_unwindbound1.c @@ -0,0 +1,52 @@ +/* + Bresenham's line drawing algorithm + from Srivastava et al.'s paper From Program Verification to Program Synthesis in POPL '10 +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "bresenham-ll.c", 7, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int X, Y; + long long x, y, v, xy, yx; + X = __VERIFIER_nondet_int(); + Y = __VERIFIER_nondet_int(); + v = ((long long) 2 * Y) - X; // cast required to avoid int overflow + y = 0; + x = 0; + + while (counter++<1) { + yx = (long long) Y*x; + xy = (long long) X*y; + __VERIFIER_assert( 2*yx - 2*xy - X + (long long) 2*Y - v == 0); + if (!(x <= X)) + break; + // out[x] = y + + if (v < 0) { + v = v + (long long) 2 * Y; + } else { + v = v + 2 * ((long long) Y - X); + y++; + } + x++; + } + xy = (long long) x*y; + yx = (long long) Y*x; + __VERIFIER_assert(2*yx - 2*xy - X + (long long) 2*Y - v + 2*y == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/bresenham-ll_unwindbound1.yml b/c/nla-digbench-scaling/bresenham-ll_unwindbound1.yml new file mode 100644 index 00000000000..7aa20a2d052 --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_unwindbound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'bresenham-ll_unwindbound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/bresenham-ll_unwindbound10.c b/c/nla-digbench-scaling/bresenham-ll_unwindbound10.c new file mode 100644 index 00000000000..8caca111fb3 --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_unwindbound10.c @@ -0,0 +1,52 @@ +/* + Bresenham's line drawing algorithm + from Srivastava et al.'s paper From Program Verification to Program Synthesis in POPL '10 +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "bresenham-ll.c", 7, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int X, Y; + long long x, y, v, xy, yx; + X = __VERIFIER_nondet_int(); + Y = __VERIFIER_nondet_int(); + v = ((long long) 2 * Y) - X; // cast required to avoid int overflow + y = 0; + x = 0; + + while (counter++<10) { + yx = (long long) Y*x; + xy = (long long) X*y; + __VERIFIER_assert( 2*yx - 2*xy - X + (long long) 2*Y - v == 0); + if (!(x <= X)) + break; + // out[x] = y + + if (v < 0) { + v = v + (long long) 2 * Y; + } else { + v = v + 2 * ((long long) Y - X); + y++; + } + x++; + } + xy = (long long) x*y; + yx = (long long) Y*x; + __VERIFIER_assert(2*yx - 2*xy - X + (long long) 2*Y - v + 2*y == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/bresenham-ll_unwindbound10.yml b/c/nla-digbench-scaling/bresenham-ll_unwindbound10.yml new file mode 100644 index 00000000000..aee16f7c509 --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_unwindbound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'bresenham-ll_unwindbound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/bresenham-ll_unwindbound100.c b/c/nla-digbench-scaling/bresenham-ll_unwindbound100.c new file mode 100644 index 00000000000..da52dab1a02 --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_unwindbound100.c @@ -0,0 +1,52 @@ +/* + Bresenham's line drawing algorithm + from Srivastava et al.'s paper From Program Verification to Program Synthesis in POPL '10 +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "bresenham-ll.c", 7, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int X, Y; + long long x, y, v, xy, yx; + X = __VERIFIER_nondet_int(); + Y = __VERIFIER_nondet_int(); + v = ((long long) 2 * Y) - X; // cast required to avoid int overflow + y = 0; + x = 0; + + while (counter++<100) { + yx = (long long) Y*x; + xy = (long long) X*y; + __VERIFIER_assert( 2*yx - 2*xy - X + (long long) 2*Y - v == 0); + if (!(x <= X)) + break; + // out[x] = y + + if (v < 0) { + v = v + (long long) 2 * Y; + } else { + v = v + 2 * ((long long) Y - X); + y++; + } + x++; + } + xy = (long long) x*y; + yx = (long long) Y*x; + __VERIFIER_assert(2*yx - 2*xy - X + (long long) 2*Y - v + 2*y == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/bresenham-ll_unwindbound100.yml b/c/nla-digbench-scaling/bresenham-ll_unwindbound100.yml new file mode 100644 index 00000000000..e522e30e207 --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_unwindbound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'bresenham-ll_unwindbound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/bresenham-ll_unwindbound2.c b/c/nla-digbench-scaling/bresenham-ll_unwindbound2.c new file mode 100644 index 00000000000..53b6bdbc5b2 --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_unwindbound2.c @@ -0,0 +1,52 @@ +/* + Bresenham's line drawing algorithm + from Srivastava et al.'s paper From Program Verification to Program Synthesis in POPL '10 +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "bresenham-ll.c", 7, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int X, Y; + long long x, y, v, xy, yx; + X = __VERIFIER_nondet_int(); + Y = __VERIFIER_nondet_int(); + v = ((long long) 2 * Y) - X; // cast required to avoid int overflow + y = 0; + x = 0; + + while (counter++<2) { + yx = (long long) Y*x; + xy = (long long) X*y; + __VERIFIER_assert( 2*yx - 2*xy - X + (long long) 2*Y - v == 0); + if (!(x <= X)) + break; + // out[x] = y + + if (v < 0) { + v = v + (long long) 2 * Y; + } else { + v = v + 2 * ((long long) Y - X); + y++; + } + x++; + } + xy = (long long) x*y; + yx = (long long) Y*x; + __VERIFIER_assert(2*yx - 2*xy - X + (long long) 2*Y - v + 2*y == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/bresenham-ll_unwindbound2.yml b/c/nla-digbench-scaling/bresenham-ll_unwindbound2.yml new file mode 100644 index 00000000000..d5150f87298 --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_unwindbound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'bresenham-ll_unwindbound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/bresenham-ll_unwindbound20.c b/c/nla-digbench-scaling/bresenham-ll_unwindbound20.c new file mode 100644 index 00000000000..12ebf141b77 --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_unwindbound20.c @@ -0,0 +1,52 @@ +/* + Bresenham's line drawing algorithm + from Srivastava et al.'s paper From Program Verification to Program Synthesis in POPL '10 +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "bresenham-ll.c", 7, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int X, Y; + long long x, y, v, xy, yx; + X = __VERIFIER_nondet_int(); + Y = __VERIFIER_nondet_int(); + v = ((long long) 2 * Y) - X; // cast required to avoid int overflow + y = 0; + x = 0; + + while (counter++<20) { + yx = (long long) Y*x; + xy = (long long) X*y; + __VERIFIER_assert( 2*yx - 2*xy - X + (long long) 2*Y - v == 0); + if (!(x <= X)) + break; + // out[x] = y + + if (v < 0) { + v = v + (long long) 2 * Y; + } else { + v = v + 2 * ((long long) Y - X); + y++; + } + x++; + } + xy = (long long) x*y; + yx = (long long) Y*x; + __VERIFIER_assert(2*yx - 2*xy - X + (long long) 2*Y - v + 2*y == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/bresenham-ll_unwindbound20.yml b/c/nla-digbench-scaling/bresenham-ll_unwindbound20.yml new file mode 100644 index 00000000000..d68981f12db --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_unwindbound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'bresenham-ll_unwindbound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/bresenham-ll_unwindbound5.c b/c/nla-digbench-scaling/bresenham-ll_unwindbound5.c new file mode 100644 index 00000000000..8a7b3231dbd --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_unwindbound5.c @@ -0,0 +1,52 @@ +/* + Bresenham's line drawing algorithm + from Srivastava et al.'s paper From Program Verification to Program Synthesis in POPL '10 +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "bresenham-ll.c", 7, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int X, Y; + long long x, y, v, xy, yx; + X = __VERIFIER_nondet_int(); + Y = __VERIFIER_nondet_int(); + v = ((long long) 2 * Y) - X; // cast required to avoid int overflow + y = 0; + x = 0; + + while (counter++<5) { + yx = (long long) Y*x; + xy = (long long) X*y; + __VERIFIER_assert( 2*yx - 2*xy - X + (long long) 2*Y - v == 0); + if (!(x <= X)) + break; + // out[x] = y + + if (v < 0) { + v = v + (long long) 2 * Y; + } else { + v = v + 2 * ((long long) Y - X); + y++; + } + x++; + } + xy = (long long) x*y; + yx = (long long) Y*x; + __VERIFIER_assert(2*yx - 2*xy - X + (long long) 2*Y - v + 2*y == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/bresenham-ll_unwindbound5.yml b/c/nla-digbench-scaling/bresenham-ll_unwindbound5.yml new file mode 100644 index 00000000000..02e42c3bb45 --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_unwindbound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'bresenham-ll_unwindbound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/bresenham-ll_unwindbound50.c b/c/nla-digbench-scaling/bresenham-ll_unwindbound50.c new file mode 100644 index 00000000000..13394895ef2 --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_unwindbound50.c @@ -0,0 +1,52 @@ +/* + Bresenham's line drawing algorithm + from Srivastava et al.'s paper From Program Verification to Program Synthesis in POPL '10 +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "bresenham-ll.c", 7, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int X, Y; + long long x, y, v, xy, yx; + X = __VERIFIER_nondet_int(); + Y = __VERIFIER_nondet_int(); + v = ((long long) 2 * Y) - X; // cast required to avoid int overflow + y = 0; + x = 0; + + while (counter++<50) { + yx = (long long) Y*x; + xy = (long long) X*y; + __VERIFIER_assert( 2*yx - 2*xy - X + (long long) 2*Y - v == 0); + if (!(x <= X)) + break; + // out[x] = y + + if (v < 0) { + v = v + (long long) 2 * Y; + } else { + v = v + 2 * ((long long) Y - X); + y++; + } + x++; + } + xy = (long long) x*y; + yx = (long long) Y*x; + __VERIFIER_assert(2*yx - 2*xy - X + (long long) 2*Y - v + 2*y == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/bresenham-ll_unwindbound50.yml b/c/nla-digbench-scaling/bresenham-ll_unwindbound50.yml new file mode 100644 index 00000000000..89b3e9267d1 --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_unwindbound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'bresenham-ll_unwindbound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/bresenham-ll_valuebound1.c b/c/nla-digbench-scaling/bresenham-ll_valuebound1.c new file mode 100644 index 00000000000..7709462d3bc --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_valuebound1.c @@ -0,0 +1,53 @@ +/* + Bresenham's line drawing algorithm + from Srivastava et al.'s paper From Program Verification to Program Synthesis in POPL '10 +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "bresenham-ll.c", 7, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int X, Y; + long long x, y, v, xy, yx; + X = __VERIFIER_nondet_int(); + assume_abort_if_not(X>=0 && X<=1); + Y = __VERIFIER_nondet_int(); + assume_abort_if_not(Y>=0 && Y<=1); + v = ((long long) 2 * Y) - X; // cast required to avoid int overflow + y = 0; + x = 0; + + while (1) { + yx = (long long) Y*x; + xy = (long long) X*y; + __VERIFIER_assert( 2*yx - 2*xy - X + (long long) 2*Y - v == 0); + if (!(x <= X)) + break; + // out[x] = y + + if (v < 0) { + v = v + (long long) 2 * Y; + } else { + v = v + 2 * ((long long) Y - X); + y++; + } + x++; + } + xy = (long long) x*y; + yx = (long long) Y*x; + __VERIFIER_assert(2*yx - 2*xy - X + (long long) 2*Y - v + 2*y == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/bresenham-ll_valuebound1.yml b/c/nla-digbench-scaling/bresenham-ll_valuebound1.yml new file mode 100644 index 00000000000..8794d38566a --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_valuebound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'bresenham-ll_valuebound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/bresenham-ll_valuebound10.c b/c/nla-digbench-scaling/bresenham-ll_valuebound10.c new file mode 100644 index 00000000000..0148a27d494 --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_valuebound10.c @@ -0,0 +1,53 @@ +/* + Bresenham's line drawing algorithm + from Srivastava et al.'s paper From Program Verification to Program Synthesis in POPL '10 +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "bresenham-ll.c", 7, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int X, Y; + long long x, y, v, xy, yx; + X = __VERIFIER_nondet_int(); + assume_abort_if_not(X>=0 && X<=10); + Y = __VERIFIER_nondet_int(); + assume_abort_if_not(Y>=0 && Y<=10); + v = ((long long) 2 * Y) - X; // cast required to avoid int overflow + y = 0; + x = 0; + + while (1) { + yx = (long long) Y*x; + xy = (long long) X*y; + __VERIFIER_assert( 2*yx - 2*xy - X + (long long) 2*Y - v == 0); + if (!(x <= X)) + break; + // out[x] = y + + if (v < 0) { + v = v + (long long) 2 * Y; + } else { + v = v + 2 * ((long long) Y - X); + y++; + } + x++; + } + xy = (long long) x*y; + yx = (long long) Y*x; + __VERIFIER_assert(2*yx - 2*xy - X + (long long) 2*Y - v + 2*y == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/bresenham-ll_valuebound10.yml b/c/nla-digbench-scaling/bresenham-ll_valuebound10.yml new file mode 100644 index 00000000000..808a9c44cc3 --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_valuebound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'bresenham-ll_valuebound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/bresenham-ll_valuebound100.c b/c/nla-digbench-scaling/bresenham-ll_valuebound100.c new file mode 100644 index 00000000000..ed033953e6d --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_valuebound100.c @@ -0,0 +1,53 @@ +/* + Bresenham's line drawing algorithm + from Srivastava et al.'s paper From Program Verification to Program Synthesis in POPL '10 +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "bresenham-ll.c", 7, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int X, Y; + long long x, y, v, xy, yx; + X = __VERIFIER_nondet_int(); + assume_abort_if_not(X>=0 && X<=100); + Y = __VERIFIER_nondet_int(); + assume_abort_if_not(Y>=0 && Y<=100); + v = ((long long) 2 * Y) - X; // cast required to avoid int overflow + y = 0; + x = 0; + + while (1) { + yx = (long long) Y*x; + xy = (long long) X*y; + __VERIFIER_assert( 2*yx - 2*xy - X + (long long) 2*Y - v == 0); + if (!(x <= X)) + break; + // out[x] = y + + if (v < 0) { + v = v + (long long) 2 * Y; + } else { + v = v + 2 * ((long long) Y - X); + y++; + } + x++; + } + xy = (long long) x*y; + yx = (long long) Y*x; + __VERIFIER_assert(2*yx - 2*xy - X + (long long) 2*Y - v + 2*y == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/bresenham-ll_valuebound100.yml b/c/nla-digbench-scaling/bresenham-ll_valuebound100.yml new file mode 100644 index 00000000000..3c5c668e2e2 --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_valuebound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'bresenham-ll_valuebound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/bresenham-ll_valuebound2.c b/c/nla-digbench-scaling/bresenham-ll_valuebound2.c new file mode 100644 index 00000000000..e4f718cd8eb --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_valuebound2.c @@ -0,0 +1,53 @@ +/* + Bresenham's line drawing algorithm + from Srivastava et al.'s paper From Program Verification to Program Synthesis in POPL '10 +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "bresenham-ll.c", 7, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int X, Y; + long long x, y, v, xy, yx; + X = __VERIFIER_nondet_int(); + assume_abort_if_not(X>=0 && X<=2); + Y = __VERIFIER_nondet_int(); + assume_abort_if_not(Y>=0 && Y<=2); + v = ((long long) 2 * Y) - X; // cast required to avoid int overflow + y = 0; + x = 0; + + while (1) { + yx = (long long) Y*x; + xy = (long long) X*y; + __VERIFIER_assert( 2*yx - 2*xy - X + (long long) 2*Y - v == 0); + if (!(x <= X)) + break; + // out[x] = y + + if (v < 0) { + v = v + (long long) 2 * Y; + } else { + v = v + 2 * ((long long) Y - X); + y++; + } + x++; + } + xy = (long long) x*y; + yx = (long long) Y*x; + __VERIFIER_assert(2*yx - 2*xy - X + (long long) 2*Y - v + 2*y == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/bresenham-ll_valuebound2.yml b/c/nla-digbench-scaling/bresenham-ll_valuebound2.yml new file mode 100644 index 00000000000..2390e3a2f9b --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_valuebound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'bresenham-ll_valuebound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/bresenham-ll_valuebound20.c b/c/nla-digbench-scaling/bresenham-ll_valuebound20.c new file mode 100644 index 00000000000..b8b0e0e5d8a --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_valuebound20.c @@ -0,0 +1,53 @@ +/* + Bresenham's line drawing algorithm + from Srivastava et al.'s paper From Program Verification to Program Synthesis in POPL '10 +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "bresenham-ll.c", 7, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int X, Y; + long long x, y, v, xy, yx; + X = __VERIFIER_nondet_int(); + assume_abort_if_not(X>=0 && X<=20); + Y = __VERIFIER_nondet_int(); + assume_abort_if_not(Y>=0 && Y<=20); + v = ((long long) 2 * Y) - X; // cast required to avoid int overflow + y = 0; + x = 0; + + while (1) { + yx = (long long) Y*x; + xy = (long long) X*y; + __VERIFIER_assert( 2*yx - 2*xy - X + (long long) 2*Y - v == 0); + if (!(x <= X)) + break; + // out[x] = y + + if (v < 0) { + v = v + (long long) 2 * Y; + } else { + v = v + 2 * ((long long) Y - X); + y++; + } + x++; + } + xy = (long long) x*y; + yx = (long long) Y*x; + __VERIFIER_assert(2*yx - 2*xy - X + (long long) 2*Y - v + 2*y == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/bresenham-ll_valuebound20.yml b/c/nla-digbench-scaling/bresenham-ll_valuebound20.yml new file mode 100644 index 00000000000..7a384006b2f --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_valuebound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'bresenham-ll_valuebound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/bresenham-ll_valuebound5.c b/c/nla-digbench-scaling/bresenham-ll_valuebound5.c new file mode 100644 index 00000000000..51b0b81bbf9 --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_valuebound5.c @@ -0,0 +1,53 @@ +/* + Bresenham's line drawing algorithm + from Srivastava et al.'s paper From Program Verification to Program Synthesis in POPL '10 +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "bresenham-ll.c", 7, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int X, Y; + long long x, y, v, xy, yx; + X = __VERIFIER_nondet_int(); + assume_abort_if_not(X>=0 && X<=5); + Y = __VERIFIER_nondet_int(); + assume_abort_if_not(Y>=0 && Y<=5); + v = ((long long) 2 * Y) - X; // cast required to avoid int overflow + y = 0; + x = 0; + + while (1) { + yx = (long long) Y*x; + xy = (long long) X*y; + __VERIFIER_assert( 2*yx - 2*xy - X + (long long) 2*Y - v == 0); + if (!(x <= X)) + break; + // out[x] = y + + if (v < 0) { + v = v + (long long) 2 * Y; + } else { + v = v + 2 * ((long long) Y - X); + y++; + } + x++; + } + xy = (long long) x*y; + yx = (long long) Y*x; + __VERIFIER_assert(2*yx - 2*xy - X + (long long) 2*Y - v + 2*y == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/bresenham-ll_valuebound5.yml b/c/nla-digbench-scaling/bresenham-ll_valuebound5.yml new file mode 100644 index 00000000000..985da8ca10a --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_valuebound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'bresenham-ll_valuebound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/bresenham-ll_valuebound50.c b/c/nla-digbench-scaling/bresenham-ll_valuebound50.c new file mode 100644 index 00000000000..20083e47b27 --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_valuebound50.c @@ -0,0 +1,53 @@ +/* + Bresenham's line drawing algorithm + from Srivastava et al.'s paper From Program Verification to Program Synthesis in POPL '10 +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "bresenham-ll.c", 7, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int X, Y; + long long x, y, v, xy, yx; + X = __VERIFIER_nondet_int(); + assume_abort_if_not(X>=0 && X<=50); + Y = __VERIFIER_nondet_int(); + assume_abort_if_not(Y>=0 && Y<=50); + v = ((long long) 2 * Y) - X; // cast required to avoid int overflow + y = 0; + x = 0; + + while (1) { + yx = (long long) Y*x; + xy = (long long) X*y; + __VERIFIER_assert( 2*yx - 2*xy - X + (long long) 2*Y - v == 0); + if (!(x <= X)) + break; + // out[x] = y + + if (v < 0) { + v = v + (long long) 2 * Y; + } else { + v = v + 2 * ((long long) Y - X); + y++; + } + x++; + } + xy = (long long) x*y; + yx = (long long) Y*x; + __VERIFIER_assert(2*yx - 2*xy - X + (long long) 2*Y - v + 2*y == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/bresenham-ll_valuebound50.yml b/c/nla-digbench-scaling/bresenham-ll_valuebound50.yml new file mode 100644 index 00000000000..d1db60d1b53 --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_valuebound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'bresenham-ll_valuebound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/bresenham_unwindbound1.c b/c/nla-digbench-scaling/bresenham_unwindbound1.c deleted file mode 100644 index b1f2eaeba57..00000000000 --- a/c/nla-digbench-scaling/bresenham_unwindbound1.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - Bresenham's line drawing algorithm - from Srivastava et al.'s paper From Program Verification to Program Synthesis in POPL '10 -*/ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int X, Y; - int v, x, y; - X = __VERIFIER_nondet_int(); - Y = __VERIFIER_nondet_int(); - v = 2 * Y - X; - y = 0; - x = 0; - - while (counter++<1) { - __VERIFIER_assert(2*Y*x - 2*X*y - X + 2*Y - v == 0); - if (!(x <= X)) - break; - // out[x] = y - - if (v < 0) { - v = v + 2 * Y; - } else { - v = v + 2 * (Y - X); - y++; - } - x++; - } - __VERIFIER_assert(2*Y*x - 2*x*y - X + 2*Y - v + 2*y == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/bresenham_unwindbound1.yml b/c/nla-digbench-scaling/bresenham_unwindbound1.yml deleted file mode 100644 index ae53ba5861e..00000000000 --- a/c/nla-digbench-scaling/bresenham_unwindbound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'bresenham_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/bresenham_unwindbound10.c b/c/nla-digbench-scaling/bresenham_unwindbound10.c deleted file mode 100644 index 0d24ab48ad3..00000000000 --- a/c/nla-digbench-scaling/bresenham_unwindbound10.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - Bresenham's line drawing algorithm - from Srivastava et al.'s paper From Program Verification to Program Synthesis in POPL '10 -*/ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int X, Y; - int v, x, y; - X = __VERIFIER_nondet_int(); - Y = __VERIFIER_nondet_int(); - v = 2 * Y - X; - y = 0; - x = 0; - - while (counter++<10) { - __VERIFIER_assert(2*Y*x - 2*X*y - X + 2*Y - v == 0); - if (!(x <= X)) - break; - // out[x] = y - - if (v < 0) { - v = v + 2 * Y; - } else { - v = v + 2 * (Y - X); - y++; - } - x++; - } - __VERIFIER_assert(2*Y*x - 2*x*y - X + 2*Y - v + 2*y == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/bresenham_unwindbound10.yml b/c/nla-digbench-scaling/bresenham_unwindbound10.yml deleted file mode 100644 index eac22d44f46..00000000000 --- a/c/nla-digbench-scaling/bresenham_unwindbound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'bresenham_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/bresenham_unwindbound100.c b/c/nla-digbench-scaling/bresenham_unwindbound100.c deleted file mode 100644 index 9016a9d0954..00000000000 --- a/c/nla-digbench-scaling/bresenham_unwindbound100.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - Bresenham's line drawing algorithm - from Srivastava et al.'s paper From Program Verification to Program Synthesis in POPL '10 -*/ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int X, Y; - int v, x, y; - X = __VERIFIER_nondet_int(); - Y = __VERIFIER_nondet_int(); - v = 2 * Y - X; - y = 0; - x = 0; - - while (counter++<100) { - __VERIFIER_assert(2*Y*x - 2*X*y - X + 2*Y - v == 0); - if (!(x <= X)) - break; - // out[x] = y - - if (v < 0) { - v = v + 2 * Y; - } else { - v = v + 2 * (Y - X); - y++; - } - x++; - } - __VERIFIER_assert(2*Y*x - 2*x*y - X + 2*Y - v + 2*y == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/bresenham_unwindbound100.yml b/c/nla-digbench-scaling/bresenham_unwindbound100.yml deleted file mode 100644 index 07a85d24dfa..00000000000 --- a/c/nla-digbench-scaling/bresenham_unwindbound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'bresenham_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/bresenham_unwindbound2.c b/c/nla-digbench-scaling/bresenham_unwindbound2.c deleted file mode 100644 index 9e6e25f7dd1..00000000000 --- a/c/nla-digbench-scaling/bresenham_unwindbound2.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - Bresenham's line drawing algorithm - from Srivastava et al.'s paper From Program Verification to Program Synthesis in POPL '10 -*/ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int X, Y; - int v, x, y; - X = __VERIFIER_nondet_int(); - Y = __VERIFIER_nondet_int(); - v = 2 * Y - X; - y = 0; - x = 0; - - while (counter++<2) { - __VERIFIER_assert(2*Y*x - 2*X*y - X + 2*Y - v == 0); - if (!(x <= X)) - break; - // out[x] = y - - if (v < 0) { - v = v + 2 * Y; - } else { - v = v + 2 * (Y - X); - y++; - } - x++; - } - __VERIFIER_assert(2*Y*x - 2*x*y - X + 2*Y - v + 2*y == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/bresenham_unwindbound2.yml b/c/nla-digbench-scaling/bresenham_unwindbound2.yml deleted file mode 100644 index 7683c4c9077..00000000000 --- a/c/nla-digbench-scaling/bresenham_unwindbound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'bresenham_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/bresenham_unwindbound20.c b/c/nla-digbench-scaling/bresenham_unwindbound20.c deleted file mode 100644 index bd855617205..00000000000 --- a/c/nla-digbench-scaling/bresenham_unwindbound20.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - Bresenham's line drawing algorithm - from Srivastava et al.'s paper From Program Verification to Program Synthesis in POPL '10 -*/ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int X, Y; - int v, x, y; - X = __VERIFIER_nondet_int(); - Y = __VERIFIER_nondet_int(); - v = 2 * Y - X; - y = 0; - x = 0; - - while (counter++<20) { - __VERIFIER_assert(2*Y*x - 2*X*y - X + 2*Y - v == 0); - if (!(x <= X)) - break; - // out[x] = y - - if (v < 0) { - v = v + 2 * Y; - } else { - v = v + 2 * (Y - X); - y++; - } - x++; - } - __VERIFIER_assert(2*Y*x - 2*x*y - X + 2*Y - v + 2*y == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/bresenham_unwindbound20.yml b/c/nla-digbench-scaling/bresenham_unwindbound20.yml deleted file mode 100644 index 509381910b9..00000000000 --- a/c/nla-digbench-scaling/bresenham_unwindbound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'bresenham_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/bresenham_unwindbound5.c b/c/nla-digbench-scaling/bresenham_unwindbound5.c deleted file mode 100644 index 03c6e94ba0c..00000000000 --- a/c/nla-digbench-scaling/bresenham_unwindbound5.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - Bresenham's line drawing algorithm - from Srivastava et al.'s paper From Program Verification to Program Synthesis in POPL '10 -*/ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int X, Y; - int v, x, y; - X = __VERIFIER_nondet_int(); - Y = __VERIFIER_nondet_int(); - v = 2 * Y - X; - y = 0; - x = 0; - - while (counter++<5) { - __VERIFIER_assert(2*Y*x - 2*X*y - X + 2*Y - v == 0); - if (!(x <= X)) - break; - // out[x] = y - - if (v < 0) { - v = v + 2 * Y; - } else { - v = v + 2 * (Y - X); - y++; - } - x++; - } - __VERIFIER_assert(2*Y*x - 2*x*y - X + 2*Y - v + 2*y == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/bresenham_unwindbound5.yml b/c/nla-digbench-scaling/bresenham_unwindbound5.yml deleted file mode 100644 index e06dda723bc..00000000000 --- a/c/nla-digbench-scaling/bresenham_unwindbound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'bresenham_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/bresenham_unwindbound50.c b/c/nla-digbench-scaling/bresenham_unwindbound50.c deleted file mode 100644 index 9f1c9a2a970..00000000000 --- a/c/nla-digbench-scaling/bresenham_unwindbound50.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - Bresenham's line drawing algorithm - from Srivastava et al.'s paper From Program Verification to Program Synthesis in POPL '10 -*/ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int X, Y; - int v, x, y; - X = __VERIFIER_nondet_int(); - Y = __VERIFIER_nondet_int(); - v = 2 * Y - X; - y = 0; - x = 0; - - while (counter++<50) { - __VERIFIER_assert(2*Y*x - 2*X*y - X + 2*Y - v == 0); - if (!(x <= X)) - break; - // out[x] = y - - if (v < 0) { - v = v + 2 * Y; - } else { - v = v + 2 * (Y - X); - y++; - } - x++; - } - __VERIFIER_assert(2*Y*x - 2*x*y - X + 2*Y - v + 2*y == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/bresenham_unwindbound50.yml b/c/nla-digbench-scaling/bresenham_unwindbound50.yml deleted file mode 100644 index d10f2a5ab99..00000000000 --- a/c/nla-digbench-scaling/bresenham_unwindbound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'bresenham_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/bresenham_valuebound1.c b/c/nla-digbench-scaling/bresenham_valuebound1.c deleted file mode 100644 index ba746a288ce..00000000000 --- a/c/nla-digbench-scaling/bresenham_valuebound1.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - Bresenham's line drawing algorithm - from Srivastava et al.'s paper From Program Verification to Program Synthesis in POPL '10 -*/ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int X, Y; - int v, x, y; - X = __VERIFIER_nondet_int(); - assume_abort_if_not(X>0 && X<=1); - Y = __VERIFIER_nondet_int(); - assume_abort_if_not(Y>0 && Y<=1); - v = 2 * Y - X; - y = 0; - x = 0; - - while (1) { - __VERIFIER_assert(2*Y*x - 2*X*y - X + 2*Y - v == 0); - if (!(x <= X)) - break; - // out[x] = y - - if (v < 0) { - v = v + 2 * Y; - } else { - v = v + 2 * (Y - X); - y++; - } - x++; - } - __VERIFIER_assert(2*Y*x - 2*x*y - X + 2*Y - v + 2*y == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/bresenham_valuebound1.yml b/c/nla-digbench-scaling/bresenham_valuebound1.yml deleted file mode 100644 index e29bd8ad467..00000000000 --- a/c/nla-digbench-scaling/bresenham_valuebound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'bresenham_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/bresenham_valuebound10.c b/c/nla-digbench-scaling/bresenham_valuebound10.c deleted file mode 100644 index 7c8a0d193cb..00000000000 --- a/c/nla-digbench-scaling/bresenham_valuebound10.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - Bresenham's line drawing algorithm - from Srivastava et al.'s paper From Program Verification to Program Synthesis in POPL '10 -*/ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int X, Y; - int v, x, y; - X = __VERIFIER_nondet_int(); - assume_abort_if_not(X>0 && X<=10); - Y = __VERIFIER_nondet_int(); - assume_abort_if_not(Y>0 && Y<=10); - v = 2 * Y - X; - y = 0; - x = 0; - - while (1) { - __VERIFIER_assert(2*Y*x - 2*X*y - X + 2*Y - v == 0); - if (!(x <= X)) - break; - // out[x] = y - - if (v < 0) { - v = v + 2 * Y; - } else { - v = v + 2 * (Y - X); - y++; - } - x++; - } - __VERIFIER_assert(2*Y*x - 2*x*y - X + 2*Y - v + 2*y == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/bresenham_valuebound10.yml b/c/nla-digbench-scaling/bresenham_valuebound10.yml deleted file mode 100644 index 064d119f261..00000000000 --- a/c/nla-digbench-scaling/bresenham_valuebound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'bresenham_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/bresenham_valuebound100.c b/c/nla-digbench-scaling/bresenham_valuebound100.c deleted file mode 100644 index 87676f575df..00000000000 --- a/c/nla-digbench-scaling/bresenham_valuebound100.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - Bresenham's line drawing algorithm - from Srivastava et al.'s paper From Program Verification to Program Synthesis in POPL '10 -*/ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int X, Y; - int v, x, y; - X = __VERIFIER_nondet_int(); - assume_abort_if_not(X>0 && X<=100); - Y = __VERIFIER_nondet_int(); - assume_abort_if_not(Y>0 && Y<=100); - v = 2 * Y - X; - y = 0; - x = 0; - - while (1) { - __VERIFIER_assert(2*Y*x - 2*X*y - X + 2*Y - v == 0); - if (!(x <= X)) - break; - // out[x] = y - - if (v < 0) { - v = v + 2 * Y; - } else { - v = v + 2 * (Y - X); - y++; - } - x++; - } - __VERIFIER_assert(2*Y*x - 2*x*y - X + 2*Y - v + 2*y == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/bresenham_valuebound100.yml b/c/nla-digbench-scaling/bresenham_valuebound100.yml deleted file mode 100644 index e7185a14da6..00000000000 --- a/c/nla-digbench-scaling/bresenham_valuebound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'bresenham_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/bresenham_valuebound2.c b/c/nla-digbench-scaling/bresenham_valuebound2.c deleted file mode 100644 index 49051d15796..00000000000 --- a/c/nla-digbench-scaling/bresenham_valuebound2.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - Bresenham's line drawing algorithm - from Srivastava et al.'s paper From Program Verification to Program Synthesis in POPL '10 -*/ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int X, Y; - int v, x, y; - X = __VERIFIER_nondet_int(); - assume_abort_if_not(X>0 && X<=2); - Y = __VERIFIER_nondet_int(); - assume_abort_if_not(Y>0 && Y<=2); - v = 2 * Y - X; - y = 0; - x = 0; - - while (1) { - __VERIFIER_assert(2*Y*x - 2*X*y - X + 2*Y - v == 0); - if (!(x <= X)) - break; - // out[x] = y - - if (v < 0) { - v = v + 2 * Y; - } else { - v = v + 2 * (Y - X); - y++; - } - x++; - } - __VERIFIER_assert(2*Y*x - 2*x*y - X + 2*Y - v + 2*y == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/bresenham_valuebound2.yml b/c/nla-digbench-scaling/bresenham_valuebound2.yml deleted file mode 100644 index dead89eb023..00000000000 --- a/c/nla-digbench-scaling/bresenham_valuebound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'bresenham_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/bresenham_valuebound20.c b/c/nla-digbench-scaling/bresenham_valuebound20.c deleted file mode 100644 index 582db0c8a27..00000000000 --- a/c/nla-digbench-scaling/bresenham_valuebound20.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - Bresenham's line drawing algorithm - from Srivastava et al.'s paper From Program Verification to Program Synthesis in POPL '10 -*/ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int X, Y; - int v, x, y; - X = __VERIFIER_nondet_int(); - assume_abort_if_not(X>0 && X<=20); - Y = __VERIFIER_nondet_int(); - assume_abort_if_not(Y>0 && Y<=20); - v = 2 * Y - X; - y = 0; - x = 0; - - while (1) { - __VERIFIER_assert(2*Y*x - 2*X*y - X + 2*Y - v == 0); - if (!(x <= X)) - break; - // out[x] = y - - if (v < 0) { - v = v + 2 * Y; - } else { - v = v + 2 * (Y - X); - y++; - } - x++; - } - __VERIFIER_assert(2*Y*x - 2*x*y - X + 2*Y - v + 2*y == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/bresenham_valuebound20.yml b/c/nla-digbench-scaling/bresenham_valuebound20.yml deleted file mode 100644 index 2bac7d96ad2..00000000000 --- a/c/nla-digbench-scaling/bresenham_valuebound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'bresenham_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/bresenham_valuebound5.c b/c/nla-digbench-scaling/bresenham_valuebound5.c deleted file mode 100644 index f7607fda1b4..00000000000 --- a/c/nla-digbench-scaling/bresenham_valuebound5.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - Bresenham's line drawing algorithm - from Srivastava et al.'s paper From Program Verification to Program Synthesis in POPL '10 -*/ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int X, Y; - int v, x, y; - X = __VERIFIER_nondet_int(); - assume_abort_if_not(X>0 && X<=5); - Y = __VERIFIER_nondet_int(); - assume_abort_if_not(Y>0 && Y<=5); - v = 2 * Y - X; - y = 0; - x = 0; - - while (1) { - __VERIFIER_assert(2*Y*x - 2*X*y - X + 2*Y - v == 0); - if (!(x <= X)) - break; - // out[x] = y - - if (v < 0) { - v = v + 2 * Y; - } else { - v = v + 2 * (Y - X); - y++; - } - x++; - } - __VERIFIER_assert(2*Y*x - 2*x*y - X + 2*Y - v + 2*y == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/bresenham_valuebound5.yml b/c/nla-digbench-scaling/bresenham_valuebound5.yml deleted file mode 100644 index 5a031109099..00000000000 --- a/c/nla-digbench-scaling/bresenham_valuebound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'bresenham_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/bresenham_valuebound50.c b/c/nla-digbench-scaling/bresenham_valuebound50.c deleted file mode 100644 index 9affc59ef09..00000000000 --- a/c/nla-digbench-scaling/bresenham_valuebound50.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - Bresenham's line drawing algorithm - from Srivastava et al.'s paper From Program Verification to Program Synthesis in POPL '10 -*/ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int X, Y; - int v, x, y; - X = __VERIFIER_nondet_int(); - assume_abort_if_not(X>0 && X<=50); - Y = __VERIFIER_nondet_int(); - assume_abort_if_not(Y>0 && Y<=50); - v = 2 * Y - X; - y = 0; - x = 0; - - while (1) { - __VERIFIER_assert(2*Y*x - 2*X*y - X + 2*Y - v == 0); - if (!(x <= X)) - break; - // out[x] = y - - if (v < 0) { - v = v + 2 * Y; - } else { - v = v + 2 * (Y - X); - y++; - } - x++; - } - __VERIFIER_assert(2*Y*x - 2*x*y - X + 2*Y - v + 2*y == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/bresenham_valuebound50.yml b/c/nla-digbench-scaling/bresenham_valuebound50.yml deleted file mode 100644 index 8add679ca8b..00000000000 --- a/c/nla-digbench-scaling/bresenham_valuebound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'bresenham_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohencu-ll_unwindbound1.c b/c/nla-digbench-scaling/cohencu-ll_unwindbound1.c new file mode 100644 index 00000000000..443dceccead --- /dev/null +++ b/c/nla-digbench-scaling/cohencu-ll_unwindbound1.c @@ -0,0 +1,56 @@ +/* +Printing consecutive cubes, by Cohen +http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohencu.htm +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "cohencu-ll.c", 8, "reach_error"); } +extern unsigned short __VERIFIER_nondet_unsigned_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short a; + long long n, x, y, z; + a = __VERIFIER_nondet_unsigned_short(); + + n = 0; + x = 0; + y = 1; + z = 6; + + while (counter++<1) { + __VERIFIER_assert(z == 6 * n + 6); + __VERIFIER_assert(y == 3 * n * n + 3 * n + 1); + __VERIFIER_assert(x == n * n * n); + __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); + __VERIFIER_assert((z*z) - 12*y - 6*z + 12 == 0); + if (!(n <= a)) + break; + + n = n + 1; + x = x + y; + y = y + z; + z = z + 6; + } + + __VERIFIER_assert(z == 6*n + 6); + __VERIFIER_assert(6*a*x - x*z + 12*x == 0); + __VERIFIER_assert(a*z - 6*a - 2*y + 2*z - 10 == 0); + __VERIFIER_assert(2*y*y - 3*x*z - 18*x - 10*y + 3*z - 10 == 0); + __VERIFIER_assert(z*z - 12*y - 6*z + 12 == 0); + __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/cohencu-ll_unwindbound1.yml b/c/nla-digbench-scaling/cohencu-ll_unwindbound1.yml new file mode 100644 index 00000000000..0874a4ee72e --- /dev/null +++ b/c/nla-digbench-scaling/cohencu-ll_unwindbound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'cohencu-ll_unwindbound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohencu-ll_unwindbound10.c b/c/nla-digbench-scaling/cohencu-ll_unwindbound10.c new file mode 100644 index 00000000000..d0d189482c9 --- /dev/null +++ b/c/nla-digbench-scaling/cohencu-ll_unwindbound10.c @@ -0,0 +1,56 @@ +/* +Printing consecutive cubes, by Cohen +http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohencu.htm +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "cohencu-ll.c", 8, "reach_error"); } +extern unsigned short __VERIFIER_nondet_unsigned_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short a; + long long n, x, y, z; + a = __VERIFIER_nondet_unsigned_short(); + + n = 0; + x = 0; + y = 1; + z = 6; + + while (counter++<10) { + __VERIFIER_assert(z == 6 * n + 6); + __VERIFIER_assert(y == 3 * n * n + 3 * n + 1); + __VERIFIER_assert(x == n * n * n); + __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); + __VERIFIER_assert((z*z) - 12*y - 6*z + 12 == 0); + if (!(n <= a)) + break; + + n = n + 1; + x = x + y; + y = y + z; + z = z + 6; + } + + __VERIFIER_assert(z == 6*n + 6); + __VERIFIER_assert(6*a*x - x*z + 12*x == 0); + __VERIFIER_assert(a*z - 6*a - 2*y + 2*z - 10 == 0); + __VERIFIER_assert(2*y*y - 3*x*z - 18*x - 10*y + 3*z - 10 == 0); + __VERIFIER_assert(z*z - 12*y - 6*z + 12 == 0); + __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/cohencu-ll_unwindbound10.yml b/c/nla-digbench-scaling/cohencu-ll_unwindbound10.yml new file mode 100644 index 00000000000..544afd68633 --- /dev/null +++ b/c/nla-digbench-scaling/cohencu-ll_unwindbound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'cohencu-ll_unwindbound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohencu-ll_unwindbound100.c b/c/nla-digbench-scaling/cohencu-ll_unwindbound100.c new file mode 100644 index 00000000000..ceb4bda7dba --- /dev/null +++ b/c/nla-digbench-scaling/cohencu-ll_unwindbound100.c @@ -0,0 +1,56 @@ +/* +Printing consecutive cubes, by Cohen +http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohencu.htm +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "cohencu-ll.c", 8, "reach_error"); } +extern unsigned short __VERIFIER_nondet_unsigned_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short a; + long long n, x, y, z; + a = __VERIFIER_nondet_unsigned_short(); + + n = 0; + x = 0; + y = 1; + z = 6; + + while (counter++<100) { + __VERIFIER_assert(z == 6 * n + 6); + __VERIFIER_assert(y == 3 * n * n + 3 * n + 1); + __VERIFIER_assert(x == n * n * n); + __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); + __VERIFIER_assert((z*z) - 12*y - 6*z + 12 == 0); + if (!(n <= a)) + break; + + n = n + 1; + x = x + y; + y = y + z; + z = z + 6; + } + + __VERIFIER_assert(z == 6*n + 6); + __VERIFIER_assert(6*a*x - x*z + 12*x == 0); + __VERIFIER_assert(a*z - 6*a - 2*y + 2*z - 10 == 0); + __VERIFIER_assert(2*y*y - 3*x*z - 18*x - 10*y + 3*z - 10 == 0); + __VERIFIER_assert(z*z - 12*y - 6*z + 12 == 0); + __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/cohencu-ll_unwindbound100.yml b/c/nla-digbench-scaling/cohencu-ll_unwindbound100.yml new file mode 100644 index 00000000000..8d1d431b25f --- /dev/null +++ b/c/nla-digbench-scaling/cohencu-ll_unwindbound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'cohencu-ll_unwindbound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohencu-ll_unwindbound2.c b/c/nla-digbench-scaling/cohencu-ll_unwindbound2.c new file mode 100644 index 00000000000..88341b0dbb7 --- /dev/null +++ b/c/nla-digbench-scaling/cohencu-ll_unwindbound2.c @@ -0,0 +1,56 @@ +/* +Printing consecutive cubes, by Cohen +http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohencu.htm +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "cohencu-ll.c", 8, "reach_error"); } +extern unsigned short __VERIFIER_nondet_unsigned_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short a; + long long n, x, y, z; + a = __VERIFIER_nondet_unsigned_short(); + + n = 0; + x = 0; + y = 1; + z = 6; + + while (counter++<2) { + __VERIFIER_assert(z == 6 * n + 6); + __VERIFIER_assert(y == 3 * n * n + 3 * n + 1); + __VERIFIER_assert(x == n * n * n); + __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); + __VERIFIER_assert((z*z) - 12*y - 6*z + 12 == 0); + if (!(n <= a)) + break; + + n = n + 1; + x = x + y; + y = y + z; + z = z + 6; + } + + __VERIFIER_assert(z == 6*n + 6); + __VERIFIER_assert(6*a*x - x*z + 12*x == 0); + __VERIFIER_assert(a*z - 6*a - 2*y + 2*z - 10 == 0); + __VERIFIER_assert(2*y*y - 3*x*z - 18*x - 10*y + 3*z - 10 == 0); + __VERIFIER_assert(z*z - 12*y - 6*z + 12 == 0); + __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/cohencu-ll_unwindbound2.yml b/c/nla-digbench-scaling/cohencu-ll_unwindbound2.yml new file mode 100644 index 00000000000..2a8d12d63f0 --- /dev/null +++ b/c/nla-digbench-scaling/cohencu-ll_unwindbound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'cohencu-ll_unwindbound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohencu-ll_unwindbound20.c b/c/nla-digbench-scaling/cohencu-ll_unwindbound20.c new file mode 100644 index 00000000000..0e618a5081a --- /dev/null +++ b/c/nla-digbench-scaling/cohencu-ll_unwindbound20.c @@ -0,0 +1,56 @@ +/* +Printing consecutive cubes, by Cohen +http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohencu.htm +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "cohencu-ll.c", 8, "reach_error"); } +extern unsigned short __VERIFIER_nondet_unsigned_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short a; + long long n, x, y, z; + a = __VERIFIER_nondet_unsigned_short(); + + n = 0; + x = 0; + y = 1; + z = 6; + + while (counter++<20) { + __VERIFIER_assert(z == 6 * n + 6); + __VERIFIER_assert(y == 3 * n * n + 3 * n + 1); + __VERIFIER_assert(x == n * n * n); + __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); + __VERIFIER_assert((z*z) - 12*y - 6*z + 12 == 0); + if (!(n <= a)) + break; + + n = n + 1; + x = x + y; + y = y + z; + z = z + 6; + } + + __VERIFIER_assert(z == 6*n + 6); + __VERIFIER_assert(6*a*x - x*z + 12*x == 0); + __VERIFIER_assert(a*z - 6*a - 2*y + 2*z - 10 == 0); + __VERIFIER_assert(2*y*y - 3*x*z - 18*x - 10*y + 3*z - 10 == 0); + __VERIFIER_assert(z*z - 12*y - 6*z + 12 == 0); + __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/cohencu-ll_unwindbound20.yml b/c/nla-digbench-scaling/cohencu-ll_unwindbound20.yml new file mode 100644 index 00000000000..52b85ff1a8d --- /dev/null +++ b/c/nla-digbench-scaling/cohencu-ll_unwindbound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'cohencu-ll_unwindbound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohencu-ll_unwindbound5.c b/c/nla-digbench-scaling/cohencu-ll_unwindbound5.c new file mode 100644 index 00000000000..4c0dfafa7d7 --- /dev/null +++ b/c/nla-digbench-scaling/cohencu-ll_unwindbound5.c @@ -0,0 +1,56 @@ +/* +Printing consecutive cubes, by Cohen +http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohencu.htm +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "cohencu-ll.c", 8, "reach_error"); } +extern unsigned short __VERIFIER_nondet_unsigned_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short a; + long long n, x, y, z; + a = __VERIFIER_nondet_unsigned_short(); + + n = 0; + x = 0; + y = 1; + z = 6; + + while (counter++<5) { + __VERIFIER_assert(z == 6 * n + 6); + __VERIFIER_assert(y == 3 * n * n + 3 * n + 1); + __VERIFIER_assert(x == n * n * n); + __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); + __VERIFIER_assert((z*z) - 12*y - 6*z + 12 == 0); + if (!(n <= a)) + break; + + n = n + 1; + x = x + y; + y = y + z; + z = z + 6; + } + + __VERIFIER_assert(z == 6*n + 6); + __VERIFIER_assert(6*a*x - x*z + 12*x == 0); + __VERIFIER_assert(a*z - 6*a - 2*y + 2*z - 10 == 0); + __VERIFIER_assert(2*y*y - 3*x*z - 18*x - 10*y + 3*z - 10 == 0); + __VERIFIER_assert(z*z - 12*y - 6*z + 12 == 0); + __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/cohencu-ll_unwindbound5.yml b/c/nla-digbench-scaling/cohencu-ll_unwindbound5.yml new file mode 100644 index 00000000000..7b9887029e4 --- /dev/null +++ b/c/nla-digbench-scaling/cohencu-ll_unwindbound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'cohencu-ll_unwindbound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohencu-ll_unwindbound50.c b/c/nla-digbench-scaling/cohencu-ll_unwindbound50.c new file mode 100644 index 00000000000..74e9df5e213 --- /dev/null +++ b/c/nla-digbench-scaling/cohencu-ll_unwindbound50.c @@ -0,0 +1,56 @@ +/* +Printing consecutive cubes, by Cohen +http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohencu.htm +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "cohencu-ll.c", 8, "reach_error"); } +extern unsigned short __VERIFIER_nondet_unsigned_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short a; + long long n, x, y, z; + a = __VERIFIER_nondet_unsigned_short(); + + n = 0; + x = 0; + y = 1; + z = 6; + + while (counter++<50) { + __VERIFIER_assert(z == 6 * n + 6); + __VERIFIER_assert(y == 3 * n * n + 3 * n + 1); + __VERIFIER_assert(x == n * n * n); + __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); + __VERIFIER_assert((z*z) - 12*y - 6*z + 12 == 0); + if (!(n <= a)) + break; + + n = n + 1; + x = x + y; + y = y + z; + z = z + 6; + } + + __VERIFIER_assert(z == 6*n + 6); + __VERIFIER_assert(6*a*x - x*z + 12*x == 0); + __VERIFIER_assert(a*z - 6*a - 2*y + 2*z - 10 == 0); + __VERIFIER_assert(2*y*y - 3*x*z - 18*x - 10*y + 3*z - 10 == 0); + __VERIFIER_assert(z*z - 12*y - 6*z + 12 == 0); + __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/cohencu-ll_unwindbound50.yml b/c/nla-digbench-scaling/cohencu-ll_unwindbound50.yml new file mode 100644 index 00000000000..06a1579ada7 --- /dev/null +++ b/c/nla-digbench-scaling/cohencu-ll_unwindbound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'cohencu-ll_unwindbound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohencu-ll_valuebound1.c b/c/nla-digbench-scaling/cohencu-ll_valuebound1.c new file mode 100644 index 00000000000..0653471ec08 --- /dev/null +++ b/c/nla-digbench-scaling/cohencu-ll_valuebound1.c @@ -0,0 +1,56 @@ +/* +Printing consecutive cubes, by Cohen +http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohencu.htm +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "cohencu-ll.c", 8, "reach_error"); } +extern unsigned short __VERIFIER_nondet_unsigned_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short a; + long long n, x, y, z; + a = __VERIFIER_nondet_unsigned_short(); + assume_abort_if_not(a>=0 && a<=1); + + n = 0; + x = 0; + y = 1; + z = 6; + + while (1) { + __VERIFIER_assert(z == 6 * n + 6); + __VERIFIER_assert(y == 3 * n * n + 3 * n + 1); + __VERIFIER_assert(x == n * n * n); + __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); + __VERIFIER_assert((z*z) - 12*y - 6*z + 12 == 0); + if (!(n <= a)) + break; + + n = n + 1; + x = x + y; + y = y + z; + z = z + 6; + } + + __VERIFIER_assert(z == 6*n + 6); + __VERIFIER_assert(6*a*x - x*z + 12*x == 0); + __VERIFIER_assert(a*z - 6*a - 2*y + 2*z - 10 == 0); + __VERIFIER_assert(2*y*y - 3*x*z - 18*x - 10*y + 3*z - 10 == 0); + __VERIFIER_assert(z*z - 12*y - 6*z + 12 == 0); + __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/cohencu-ll_valuebound1.yml b/c/nla-digbench-scaling/cohencu-ll_valuebound1.yml new file mode 100644 index 00000000000..9f7f3c410cc --- /dev/null +++ b/c/nla-digbench-scaling/cohencu-ll_valuebound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'cohencu-ll_valuebound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohencu-ll_valuebound10.c b/c/nla-digbench-scaling/cohencu-ll_valuebound10.c new file mode 100644 index 00000000000..81b7a734720 --- /dev/null +++ b/c/nla-digbench-scaling/cohencu-ll_valuebound10.c @@ -0,0 +1,56 @@ +/* +Printing consecutive cubes, by Cohen +http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohencu.htm +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "cohencu-ll.c", 8, "reach_error"); } +extern unsigned short __VERIFIER_nondet_unsigned_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short a; + long long n, x, y, z; + a = __VERIFIER_nondet_unsigned_short(); + assume_abort_if_not(a>=0 && a<=10); + + n = 0; + x = 0; + y = 1; + z = 6; + + while (1) { + __VERIFIER_assert(z == 6 * n + 6); + __VERIFIER_assert(y == 3 * n * n + 3 * n + 1); + __VERIFIER_assert(x == n * n * n); + __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); + __VERIFIER_assert((z*z) - 12*y - 6*z + 12 == 0); + if (!(n <= a)) + break; + + n = n + 1; + x = x + y; + y = y + z; + z = z + 6; + } + + __VERIFIER_assert(z == 6*n + 6); + __VERIFIER_assert(6*a*x - x*z + 12*x == 0); + __VERIFIER_assert(a*z - 6*a - 2*y + 2*z - 10 == 0); + __VERIFIER_assert(2*y*y - 3*x*z - 18*x - 10*y + 3*z - 10 == 0); + __VERIFIER_assert(z*z - 12*y - 6*z + 12 == 0); + __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/cohencu-ll_valuebound10.yml b/c/nla-digbench-scaling/cohencu-ll_valuebound10.yml new file mode 100644 index 00000000000..747422a6512 --- /dev/null +++ b/c/nla-digbench-scaling/cohencu-ll_valuebound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'cohencu-ll_valuebound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohencu-ll_valuebound100.c b/c/nla-digbench-scaling/cohencu-ll_valuebound100.c new file mode 100644 index 00000000000..cff3549135b --- /dev/null +++ b/c/nla-digbench-scaling/cohencu-ll_valuebound100.c @@ -0,0 +1,56 @@ +/* +Printing consecutive cubes, by Cohen +http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohencu.htm +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "cohencu-ll.c", 8, "reach_error"); } +extern unsigned short __VERIFIER_nondet_unsigned_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short a; + long long n, x, y, z; + a = __VERIFIER_nondet_unsigned_short(); + assume_abort_if_not(a>=0 && a<=100); + + n = 0; + x = 0; + y = 1; + z = 6; + + while (1) { + __VERIFIER_assert(z == 6 * n + 6); + __VERIFIER_assert(y == 3 * n * n + 3 * n + 1); + __VERIFIER_assert(x == n * n * n); + __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); + __VERIFIER_assert((z*z) - 12*y - 6*z + 12 == 0); + if (!(n <= a)) + break; + + n = n + 1; + x = x + y; + y = y + z; + z = z + 6; + } + + __VERIFIER_assert(z == 6*n + 6); + __VERIFIER_assert(6*a*x - x*z + 12*x == 0); + __VERIFIER_assert(a*z - 6*a - 2*y + 2*z - 10 == 0); + __VERIFIER_assert(2*y*y - 3*x*z - 18*x - 10*y + 3*z - 10 == 0); + __VERIFIER_assert(z*z - 12*y - 6*z + 12 == 0); + __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/cohencu-ll_valuebound100.yml b/c/nla-digbench-scaling/cohencu-ll_valuebound100.yml new file mode 100644 index 00000000000..a01567e1b45 --- /dev/null +++ b/c/nla-digbench-scaling/cohencu-ll_valuebound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'cohencu-ll_valuebound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohencu-ll_valuebound2.c b/c/nla-digbench-scaling/cohencu-ll_valuebound2.c new file mode 100644 index 00000000000..d95d78a013c --- /dev/null +++ b/c/nla-digbench-scaling/cohencu-ll_valuebound2.c @@ -0,0 +1,56 @@ +/* +Printing consecutive cubes, by Cohen +http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohencu.htm +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "cohencu-ll.c", 8, "reach_error"); } +extern unsigned short __VERIFIER_nondet_unsigned_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short a; + long long n, x, y, z; + a = __VERIFIER_nondet_unsigned_short(); + assume_abort_if_not(a>=0 && a<=2); + + n = 0; + x = 0; + y = 1; + z = 6; + + while (1) { + __VERIFIER_assert(z == 6 * n + 6); + __VERIFIER_assert(y == 3 * n * n + 3 * n + 1); + __VERIFIER_assert(x == n * n * n); + __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); + __VERIFIER_assert((z*z) - 12*y - 6*z + 12 == 0); + if (!(n <= a)) + break; + + n = n + 1; + x = x + y; + y = y + z; + z = z + 6; + } + + __VERIFIER_assert(z == 6*n + 6); + __VERIFIER_assert(6*a*x - x*z + 12*x == 0); + __VERIFIER_assert(a*z - 6*a - 2*y + 2*z - 10 == 0); + __VERIFIER_assert(2*y*y - 3*x*z - 18*x - 10*y + 3*z - 10 == 0); + __VERIFIER_assert(z*z - 12*y - 6*z + 12 == 0); + __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/cohencu-ll_valuebound2.yml b/c/nla-digbench-scaling/cohencu-ll_valuebound2.yml new file mode 100644 index 00000000000..2082018e9a7 --- /dev/null +++ b/c/nla-digbench-scaling/cohencu-ll_valuebound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'cohencu-ll_valuebound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohencu-ll_valuebound20.c b/c/nla-digbench-scaling/cohencu-ll_valuebound20.c new file mode 100644 index 00000000000..8fe1ccf60c3 --- /dev/null +++ b/c/nla-digbench-scaling/cohencu-ll_valuebound20.c @@ -0,0 +1,56 @@ +/* +Printing consecutive cubes, by Cohen +http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohencu.htm +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "cohencu-ll.c", 8, "reach_error"); } +extern unsigned short __VERIFIER_nondet_unsigned_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short a; + long long n, x, y, z; + a = __VERIFIER_nondet_unsigned_short(); + assume_abort_if_not(a>=0 && a<=20); + + n = 0; + x = 0; + y = 1; + z = 6; + + while (1) { + __VERIFIER_assert(z == 6 * n + 6); + __VERIFIER_assert(y == 3 * n * n + 3 * n + 1); + __VERIFIER_assert(x == n * n * n); + __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); + __VERIFIER_assert((z*z) - 12*y - 6*z + 12 == 0); + if (!(n <= a)) + break; + + n = n + 1; + x = x + y; + y = y + z; + z = z + 6; + } + + __VERIFIER_assert(z == 6*n + 6); + __VERIFIER_assert(6*a*x - x*z + 12*x == 0); + __VERIFIER_assert(a*z - 6*a - 2*y + 2*z - 10 == 0); + __VERIFIER_assert(2*y*y - 3*x*z - 18*x - 10*y + 3*z - 10 == 0); + __VERIFIER_assert(z*z - 12*y - 6*z + 12 == 0); + __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/cohencu-ll_valuebound20.yml b/c/nla-digbench-scaling/cohencu-ll_valuebound20.yml new file mode 100644 index 00000000000..c9dce3653e1 --- /dev/null +++ b/c/nla-digbench-scaling/cohencu-ll_valuebound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'cohencu-ll_valuebound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohencu-ll_valuebound5.c b/c/nla-digbench-scaling/cohencu-ll_valuebound5.c new file mode 100644 index 00000000000..50d57174093 --- /dev/null +++ b/c/nla-digbench-scaling/cohencu-ll_valuebound5.c @@ -0,0 +1,56 @@ +/* +Printing consecutive cubes, by Cohen +http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohencu.htm +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "cohencu-ll.c", 8, "reach_error"); } +extern unsigned short __VERIFIER_nondet_unsigned_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short a; + long long n, x, y, z; + a = __VERIFIER_nondet_unsigned_short(); + assume_abort_if_not(a>=0 && a<=5); + + n = 0; + x = 0; + y = 1; + z = 6; + + while (1) { + __VERIFIER_assert(z == 6 * n + 6); + __VERIFIER_assert(y == 3 * n * n + 3 * n + 1); + __VERIFIER_assert(x == n * n * n); + __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); + __VERIFIER_assert((z*z) - 12*y - 6*z + 12 == 0); + if (!(n <= a)) + break; + + n = n + 1; + x = x + y; + y = y + z; + z = z + 6; + } + + __VERIFIER_assert(z == 6*n + 6); + __VERIFIER_assert(6*a*x - x*z + 12*x == 0); + __VERIFIER_assert(a*z - 6*a - 2*y + 2*z - 10 == 0); + __VERIFIER_assert(2*y*y - 3*x*z - 18*x - 10*y + 3*z - 10 == 0); + __VERIFIER_assert(z*z - 12*y - 6*z + 12 == 0); + __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/cohencu-ll_valuebound5.yml b/c/nla-digbench-scaling/cohencu-ll_valuebound5.yml new file mode 100644 index 00000000000..c57eb8a5260 --- /dev/null +++ b/c/nla-digbench-scaling/cohencu-ll_valuebound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'cohencu-ll_valuebound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohencu-ll_valuebound50.c b/c/nla-digbench-scaling/cohencu-ll_valuebound50.c new file mode 100644 index 00000000000..c6947fb66b4 --- /dev/null +++ b/c/nla-digbench-scaling/cohencu-ll_valuebound50.c @@ -0,0 +1,56 @@ +/* +Printing consecutive cubes, by Cohen +http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohencu.htm +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "cohencu-ll.c", 8, "reach_error"); } +extern unsigned short __VERIFIER_nondet_unsigned_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short a; + long long n, x, y, z; + a = __VERIFIER_nondet_unsigned_short(); + assume_abort_if_not(a>=0 && a<=50); + + n = 0; + x = 0; + y = 1; + z = 6; + + while (1) { + __VERIFIER_assert(z == 6 * n + 6); + __VERIFIER_assert(y == 3 * n * n + 3 * n + 1); + __VERIFIER_assert(x == n * n * n); + __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); + __VERIFIER_assert((z*z) - 12*y - 6*z + 12 == 0); + if (!(n <= a)) + break; + + n = n + 1; + x = x + y; + y = y + z; + z = z + 6; + } + + __VERIFIER_assert(z == 6*n + 6); + __VERIFIER_assert(6*a*x - x*z + 12*x == 0); + __VERIFIER_assert(a*z - 6*a - 2*y + 2*z - 10 == 0); + __VERIFIER_assert(2*y*y - 3*x*z - 18*x - 10*y + 3*z - 10 == 0); + __VERIFIER_assert(z*z - 12*y - 6*z + 12 == 0); + __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/cohencu-ll_valuebound50.yml b/c/nla-digbench-scaling/cohencu-ll_valuebound50.yml new file mode 100644 index 00000000000..e62f6edba10 --- /dev/null +++ b/c/nla-digbench-scaling/cohencu-ll_valuebound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'cohencu-ll_valuebound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohencu_unwindbound1.c b/c/nla-digbench-scaling/cohencu_unwindbound1.c deleted file mode 100644 index 8dc4c13e5be..00000000000 --- a/c/nla-digbench-scaling/cohencu_unwindbound1.c +++ /dev/null @@ -1,53 +0,0 @@ -/* -Printing consecutive cubes, by Cohen -http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohencu.htm -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int a, n, x, y, z; - a = __VERIFIER_nondet_int(); - n = 0; - x = 0; - y = 1; - z = 6; - - while (counter++<1) { - __VERIFIER_assert(z == 6 * n + 6); - __VERIFIER_assert(y == 3 * n * n + 3 * n + 1); - __VERIFIER_assert(x == n * n * n); - __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); - __VERIFIER_assert((z*z) - 12*y - 6*z + 12 == 0); - if (!(n <= a)) - break; - - n = n + 1; - x = x + y; - y = y + z; - z = z + 6; - } - - __VERIFIER_assert(z == 6*n + 6); - __VERIFIER_assert(6*a*x - x*z + 12*x == 0); - __VERIFIER_assert(a*z - 6*a - 2*y + 2*z - 10 == 0); - __VERIFIER_assert(2*y*y - 3*x*z - 18*x - 10*y + 3*z - 10 == 0); - __VERIFIER_assert(z*z - 12*y - 6*z + 12 == 0); - __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/cohencu_unwindbound1.yml b/c/nla-digbench-scaling/cohencu_unwindbound1.yml deleted file mode 100644 index d5838acefd4..00000000000 --- a/c/nla-digbench-scaling/cohencu_unwindbound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'cohencu_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohencu_unwindbound10.c b/c/nla-digbench-scaling/cohencu_unwindbound10.c deleted file mode 100644 index 7e2e0a88ce4..00000000000 --- a/c/nla-digbench-scaling/cohencu_unwindbound10.c +++ /dev/null @@ -1,53 +0,0 @@ -/* -Printing consecutive cubes, by Cohen -http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohencu.htm -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int a, n, x, y, z; - a = __VERIFIER_nondet_int(); - n = 0; - x = 0; - y = 1; - z = 6; - - while (counter++<10) { - __VERIFIER_assert(z == 6 * n + 6); - __VERIFIER_assert(y == 3 * n * n + 3 * n + 1); - __VERIFIER_assert(x == n * n * n); - __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); - __VERIFIER_assert((z*z) - 12*y - 6*z + 12 == 0); - if (!(n <= a)) - break; - - n = n + 1; - x = x + y; - y = y + z; - z = z + 6; - } - - __VERIFIER_assert(z == 6*n + 6); - __VERIFIER_assert(6*a*x - x*z + 12*x == 0); - __VERIFIER_assert(a*z - 6*a - 2*y + 2*z - 10 == 0); - __VERIFIER_assert(2*y*y - 3*x*z - 18*x - 10*y + 3*z - 10 == 0); - __VERIFIER_assert(z*z - 12*y - 6*z + 12 == 0); - __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/cohencu_unwindbound10.yml b/c/nla-digbench-scaling/cohencu_unwindbound10.yml deleted file mode 100644 index 4628ebfdc5c..00000000000 --- a/c/nla-digbench-scaling/cohencu_unwindbound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'cohencu_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohencu_unwindbound100.c b/c/nla-digbench-scaling/cohencu_unwindbound100.c deleted file mode 100644 index 721539ebf94..00000000000 --- a/c/nla-digbench-scaling/cohencu_unwindbound100.c +++ /dev/null @@ -1,53 +0,0 @@ -/* -Printing consecutive cubes, by Cohen -http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohencu.htm -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int a, n, x, y, z; - a = __VERIFIER_nondet_int(); - n = 0; - x = 0; - y = 1; - z = 6; - - while (counter++<100) { - __VERIFIER_assert(z == 6 * n + 6); - __VERIFIER_assert(y == 3 * n * n + 3 * n + 1); - __VERIFIER_assert(x == n * n * n); - __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); - __VERIFIER_assert((z*z) - 12*y - 6*z + 12 == 0); - if (!(n <= a)) - break; - - n = n + 1; - x = x + y; - y = y + z; - z = z + 6; - } - - __VERIFIER_assert(z == 6*n + 6); - __VERIFIER_assert(6*a*x - x*z + 12*x == 0); - __VERIFIER_assert(a*z - 6*a - 2*y + 2*z - 10 == 0); - __VERIFIER_assert(2*y*y - 3*x*z - 18*x - 10*y + 3*z - 10 == 0); - __VERIFIER_assert(z*z - 12*y - 6*z + 12 == 0); - __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/cohencu_unwindbound100.yml b/c/nla-digbench-scaling/cohencu_unwindbound100.yml deleted file mode 100644 index dd9232331d6..00000000000 --- a/c/nla-digbench-scaling/cohencu_unwindbound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'cohencu_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohencu_unwindbound2.c b/c/nla-digbench-scaling/cohencu_unwindbound2.c deleted file mode 100644 index b5f76478be6..00000000000 --- a/c/nla-digbench-scaling/cohencu_unwindbound2.c +++ /dev/null @@ -1,53 +0,0 @@ -/* -Printing consecutive cubes, by Cohen -http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohencu.htm -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int a, n, x, y, z; - a = __VERIFIER_nondet_int(); - n = 0; - x = 0; - y = 1; - z = 6; - - while (counter++<2) { - __VERIFIER_assert(z == 6 * n + 6); - __VERIFIER_assert(y == 3 * n * n + 3 * n + 1); - __VERIFIER_assert(x == n * n * n); - __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); - __VERIFIER_assert((z*z) - 12*y - 6*z + 12 == 0); - if (!(n <= a)) - break; - - n = n + 1; - x = x + y; - y = y + z; - z = z + 6; - } - - __VERIFIER_assert(z == 6*n + 6); - __VERIFIER_assert(6*a*x - x*z + 12*x == 0); - __VERIFIER_assert(a*z - 6*a - 2*y + 2*z - 10 == 0); - __VERIFIER_assert(2*y*y - 3*x*z - 18*x - 10*y + 3*z - 10 == 0); - __VERIFIER_assert(z*z - 12*y - 6*z + 12 == 0); - __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/cohencu_unwindbound2.yml b/c/nla-digbench-scaling/cohencu_unwindbound2.yml deleted file mode 100644 index f8e443d80ff..00000000000 --- a/c/nla-digbench-scaling/cohencu_unwindbound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'cohencu_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohencu_unwindbound20.c b/c/nla-digbench-scaling/cohencu_unwindbound20.c deleted file mode 100644 index 8016faa3a4c..00000000000 --- a/c/nla-digbench-scaling/cohencu_unwindbound20.c +++ /dev/null @@ -1,53 +0,0 @@ -/* -Printing consecutive cubes, by Cohen -http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohencu.htm -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int a, n, x, y, z; - a = __VERIFIER_nondet_int(); - n = 0; - x = 0; - y = 1; - z = 6; - - while (counter++<20) { - __VERIFIER_assert(z == 6 * n + 6); - __VERIFIER_assert(y == 3 * n * n + 3 * n + 1); - __VERIFIER_assert(x == n * n * n); - __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); - __VERIFIER_assert((z*z) - 12*y - 6*z + 12 == 0); - if (!(n <= a)) - break; - - n = n + 1; - x = x + y; - y = y + z; - z = z + 6; - } - - __VERIFIER_assert(z == 6*n + 6); - __VERIFIER_assert(6*a*x - x*z + 12*x == 0); - __VERIFIER_assert(a*z - 6*a - 2*y + 2*z - 10 == 0); - __VERIFIER_assert(2*y*y - 3*x*z - 18*x - 10*y + 3*z - 10 == 0); - __VERIFIER_assert(z*z - 12*y - 6*z + 12 == 0); - __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/cohencu_unwindbound20.yml b/c/nla-digbench-scaling/cohencu_unwindbound20.yml deleted file mode 100644 index 8e0a1def245..00000000000 --- a/c/nla-digbench-scaling/cohencu_unwindbound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'cohencu_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohencu_unwindbound5.c b/c/nla-digbench-scaling/cohencu_unwindbound5.c deleted file mode 100644 index d1144c32eb5..00000000000 --- a/c/nla-digbench-scaling/cohencu_unwindbound5.c +++ /dev/null @@ -1,53 +0,0 @@ -/* -Printing consecutive cubes, by Cohen -http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohencu.htm -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int a, n, x, y, z; - a = __VERIFIER_nondet_int(); - n = 0; - x = 0; - y = 1; - z = 6; - - while (counter++<5) { - __VERIFIER_assert(z == 6 * n + 6); - __VERIFIER_assert(y == 3 * n * n + 3 * n + 1); - __VERIFIER_assert(x == n * n * n); - __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); - __VERIFIER_assert((z*z) - 12*y - 6*z + 12 == 0); - if (!(n <= a)) - break; - - n = n + 1; - x = x + y; - y = y + z; - z = z + 6; - } - - __VERIFIER_assert(z == 6*n + 6); - __VERIFIER_assert(6*a*x - x*z + 12*x == 0); - __VERIFIER_assert(a*z - 6*a - 2*y + 2*z - 10 == 0); - __VERIFIER_assert(2*y*y - 3*x*z - 18*x - 10*y + 3*z - 10 == 0); - __VERIFIER_assert(z*z - 12*y - 6*z + 12 == 0); - __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/cohencu_unwindbound5.yml b/c/nla-digbench-scaling/cohencu_unwindbound5.yml deleted file mode 100644 index 9b728c36b45..00000000000 --- a/c/nla-digbench-scaling/cohencu_unwindbound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'cohencu_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohencu_unwindbound50.c b/c/nla-digbench-scaling/cohencu_unwindbound50.c deleted file mode 100644 index b693fa5242f..00000000000 --- a/c/nla-digbench-scaling/cohencu_unwindbound50.c +++ /dev/null @@ -1,53 +0,0 @@ -/* -Printing consecutive cubes, by Cohen -http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohencu.htm -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int a, n, x, y, z; - a = __VERIFIER_nondet_int(); - n = 0; - x = 0; - y = 1; - z = 6; - - while (counter++<50) { - __VERIFIER_assert(z == 6 * n + 6); - __VERIFIER_assert(y == 3 * n * n + 3 * n + 1); - __VERIFIER_assert(x == n * n * n); - __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); - __VERIFIER_assert((z*z) - 12*y - 6*z + 12 == 0); - if (!(n <= a)) - break; - - n = n + 1; - x = x + y; - y = y + z; - z = z + 6; - } - - __VERIFIER_assert(z == 6*n + 6); - __VERIFIER_assert(6*a*x - x*z + 12*x == 0); - __VERIFIER_assert(a*z - 6*a - 2*y + 2*z - 10 == 0); - __VERIFIER_assert(2*y*y - 3*x*z - 18*x - 10*y + 3*z - 10 == 0); - __VERIFIER_assert(z*z - 12*y - 6*z + 12 == 0); - __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/cohencu_unwindbound50.yml b/c/nla-digbench-scaling/cohencu_unwindbound50.yml deleted file mode 100644 index 044f3b41c54..00000000000 --- a/c/nla-digbench-scaling/cohencu_unwindbound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'cohencu_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohencu_valuebound1.c b/c/nla-digbench-scaling/cohencu_valuebound1.c deleted file mode 100644 index de734bd1302..00000000000 --- a/c/nla-digbench-scaling/cohencu_valuebound1.c +++ /dev/null @@ -1,53 +0,0 @@ -/* -Printing consecutive cubes, by Cohen -http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohencu.htm -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int a, n, x, y, z; - a = __VERIFIER_nondet_int(); - assume_abort_if_not(a>0 && a<=1); - n = 0; - x = 0; - y = 1; - z = 6; - - while (1) { - __VERIFIER_assert(z == 6 * n + 6); - __VERIFIER_assert(y == 3 * n * n + 3 * n + 1); - __VERIFIER_assert(x == n * n * n); - __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); - __VERIFIER_assert((z*z) - 12*y - 6*z + 12 == 0); - if (!(n <= a)) - break; - - n = n + 1; - x = x + y; - y = y + z; - z = z + 6; - } - - __VERIFIER_assert(z == 6*n + 6); - __VERIFIER_assert(6*a*x - x*z + 12*x == 0); - __VERIFIER_assert(a*z - 6*a - 2*y + 2*z - 10 == 0); - __VERIFIER_assert(2*y*y - 3*x*z - 18*x - 10*y + 3*z - 10 == 0); - __VERIFIER_assert(z*z - 12*y - 6*z + 12 == 0); - __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/cohencu_valuebound1.yml b/c/nla-digbench-scaling/cohencu_valuebound1.yml deleted file mode 100644 index ab8ebda1e10..00000000000 --- a/c/nla-digbench-scaling/cohencu_valuebound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'cohencu_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohencu_valuebound10.c b/c/nla-digbench-scaling/cohencu_valuebound10.c deleted file mode 100644 index 221367754df..00000000000 --- a/c/nla-digbench-scaling/cohencu_valuebound10.c +++ /dev/null @@ -1,53 +0,0 @@ -/* -Printing consecutive cubes, by Cohen -http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohencu.htm -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int a, n, x, y, z; - a = __VERIFIER_nondet_int(); - assume_abort_if_not(a>0 && a<=10); - n = 0; - x = 0; - y = 1; - z = 6; - - while (1) { - __VERIFIER_assert(z == 6 * n + 6); - __VERIFIER_assert(y == 3 * n * n + 3 * n + 1); - __VERIFIER_assert(x == n * n * n); - __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); - __VERIFIER_assert((z*z) - 12*y - 6*z + 12 == 0); - if (!(n <= a)) - break; - - n = n + 1; - x = x + y; - y = y + z; - z = z + 6; - } - - __VERIFIER_assert(z == 6*n + 6); - __VERIFIER_assert(6*a*x - x*z + 12*x == 0); - __VERIFIER_assert(a*z - 6*a - 2*y + 2*z - 10 == 0); - __VERIFIER_assert(2*y*y - 3*x*z - 18*x - 10*y + 3*z - 10 == 0); - __VERIFIER_assert(z*z - 12*y - 6*z + 12 == 0); - __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/cohencu_valuebound10.yml b/c/nla-digbench-scaling/cohencu_valuebound10.yml deleted file mode 100644 index a3da062b762..00000000000 --- a/c/nla-digbench-scaling/cohencu_valuebound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'cohencu_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohencu_valuebound100.c b/c/nla-digbench-scaling/cohencu_valuebound100.c deleted file mode 100644 index 1d8feb54bff..00000000000 --- a/c/nla-digbench-scaling/cohencu_valuebound100.c +++ /dev/null @@ -1,53 +0,0 @@ -/* -Printing consecutive cubes, by Cohen -http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohencu.htm -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int a, n, x, y, z; - a = __VERIFIER_nondet_int(); - assume_abort_if_not(a>0 && a<=100); - n = 0; - x = 0; - y = 1; - z = 6; - - while (1) { - __VERIFIER_assert(z == 6 * n + 6); - __VERIFIER_assert(y == 3 * n * n + 3 * n + 1); - __VERIFIER_assert(x == n * n * n); - __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); - __VERIFIER_assert((z*z) - 12*y - 6*z + 12 == 0); - if (!(n <= a)) - break; - - n = n + 1; - x = x + y; - y = y + z; - z = z + 6; - } - - __VERIFIER_assert(z == 6*n + 6); - __VERIFIER_assert(6*a*x - x*z + 12*x == 0); - __VERIFIER_assert(a*z - 6*a - 2*y + 2*z - 10 == 0); - __VERIFIER_assert(2*y*y - 3*x*z - 18*x - 10*y + 3*z - 10 == 0); - __VERIFIER_assert(z*z - 12*y - 6*z + 12 == 0); - __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/cohencu_valuebound100.yml b/c/nla-digbench-scaling/cohencu_valuebound100.yml deleted file mode 100644 index dcc670c88af..00000000000 --- a/c/nla-digbench-scaling/cohencu_valuebound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'cohencu_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohencu_valuebound2.c b/c/nla-digbench-scaling/cohencu_valuebound2.c deleted file mode 100644 index 9e3e7c722a1..00000000000 --- a/c/nla-digbench-scaling/cohencu_valuebound2.c +++ /dev/null @@ -1,53 +0,0 @@ -/* -Printing consecutive cubes, by Cohen -http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohencu.htm -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int a, n, x, y, z; - a = __VERIFIER_nondet_int(); - assume_abort_if_not(a>0 && a<=2); - n = 0; - x = 0; - y = 1; - z = 6; - - while (1) { - __VERIFIER_assert(z == 6 * n + 6); - __VERIFIER_assert(y == 3 * n * n + 3 * n + 1); - __VERIFIER_assert(x == n * n * n); - __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); - __VERIFIER_assert((z*z) - 12*y - 6*z + 12 == 0); - if (!(n <= a)) - break; - - n = n + 1; - x = x + y; - y = y + z; - z = z + 6; - } - - __VERIFIER_assert(z == 6*n + 6); - __VERIFIER_assert(6*a*x - x*z + 12*x == 0); - __VERIFIER_assert(a*z - 6*a - 2*y + 2*z - 10 == 0); - __VERIFIER_assert(2*y*y - 3*x*z - 18*x - 10*y + 3*z - 10 == 0); - __VERIFIER_assert(z*z - 12*y - 6*z + 12 == 0); - __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/cohencu_valuebound2.yml b/c/nla-digbench-scaling/cohencu_valuebound2.yml deleted file mode 100644 index 8ff3aff8a37..00000000000 --- a/c/nla-digbench-scaling/cohencu_valuebound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'cohencu_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohencu_valuebound20.c b/c/nla-digbench-scaling/cohencu_valuebound20.c deleted file mode 100644 index 11f7b5f80d4..00000000000 --- a/c/nla-digbench-scaling/cohencu_valuebound20.c +++ /dev/null @@ -1,53 +0,0 @@ -/* -Printing consecutive cubes, by Cohen -http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohencu.htm -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int a, n, x, y, z; - a = __VERIFIER_nondet_int(); - assume_abort_if_not(a>0 && a<=20); - n = 0; - x = 0; - y = 1; - z = 6; - - while (1) { - __VERIFIER_assert(z == 6 * n + 6); - __VERIFIER_assert(y == 3 * n * n + 3 * n + 1); - __VERIFIER_assert(x == n * n * n); - __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); - __VERIFIER_assert((z*z) - 12*y - 6*z + 12 == 0); - if (!(n <= a)) - break; - - n = n + 1; - x = x + y; - y = y + z; - z = z + 6; - } - - __VERIFIER_assert(z == 6*n + 6); - __VERIFIER_assert(6*a*x - x*z + 12*x == 0); - __VERIFIER_assert(a*z - 6*a - 2*y + 2*z - 10 == 0); - __VERIFIER_assert(2*y*y - 3*x*z - 18*x - 10*y + 3*z - 10 == 0); - __VERIFIER_assert(z*z - 12*y - 6*z + 12 == 0); - __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/cohencu_valuebound20.yml b/c/nla-digbench-scaling/cohencu_valuebound20.yml deleted file mode 100644 index a52c6645fbe..00000000000 --- a/c/nla-digbench-scaling/cohencu_valuebound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'cohencu_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohencu_valuebound5.c b/c/nla-digbench-scaling/cohencu_valuebound5.c deleted file mode 100644 index 84aa46606fa..00000000000 --- a/c/nla-digbench-scaling/cohencu_valuebound5.c +++ /dev/null @@ -1,53 +0,0 @@ -/* -Printing consecutive cubes, by Cohen -http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohencu.htm -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int a, n, x, y, z; - a = __VERIFIER_nondet_int(); - assume_abort_if_not(a>0 && a<=5); - n = 0; - x = 0; - y = 1; - z = 6; - - while (1) { - __VERIFIER_assert(z == 6 * n + 6); - __VERIFIER_assert(y == 3 * n * n + 3 * n + 1); - __VERIFIER_assert(x == n * n * n); - __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); - __VERIFIER_assert((z*z) - 12*y - 6*z + 12 == 0); - if (!(n <= a)) - break; - - n = n + 1; - x = x + y; - y = y + z; - z = z + 6; - } - - __VERIFIER_assert(z == 6*n + 6); - __VERIFIER_assert(6*a*x - x*z + 12*x == 0); - __VERIFIER_assert(a*z - 6*a - 2*y + 2*z - 10 == 0); - __VERIFIER_assert(2*y*y - 3*x*z - 18*x - 10*y + 3*z - 10 == 0); - __VERIFIER_assert(z*z - 12*y - 6*z + 12 == 0); - __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/cohencu_valuebound5.yml b/c/nla-digbench-scaling/cohencu_valuebound5.yml deleted file mode 100644 index 176f941f287..00000000000 --- a/c/nla-digbench-scaling/cohencu_valuebound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'cohencu_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohencu_valuebound50.c b/c/nla-digbench-scaling/cohencu_valuebound50.c deleted file mode 100644 index 454ad579c84..00000000000 --- a/c/nla-digbench-scaling/cohencu_valuebound50.c +++ /dev/null @@ -1,53 +0,0 @@ -/* -Printing consecutive cubes, by Cohen -http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohencu.htm -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int a, n, x, y, z; - a = __VERIFIER_nondet_int(); - assume_abort_if_not(a>0 && a<=50); - n = 0; - x = 0; - y = 1; - z = 6; - - while (1) { - __VERIFIER_assert(z == 6 * n + 6); - __VERIFIER_assert(y == 3 * n * n + 3 * n + 1); - __VERIFIER_assert(x == n * n * n); - __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); - __VERIFIER_assert((z*z) - 12*y - 6*z + 12 == 0); - if (!(n <= a)) - break; - - n = n + 1; - x = x + y; - y = y + z; - z = z + 6; - } - - __VERIFIER_assert(z == 6*n + 6); - __VERIFIER_assert(6*a*x - x*z + 12*x == 0); - __VERIFIER_assert(a*z - 6*a - 2*y + 2*z - 10 == 0); - __VERIFIER_assert(2*y*y - 3*x*z - 18*x - 10*y + 3*z - 10 == 0); - __VERIFIER_assert(z*z - 12*y - 6*z + 12 == 0); - __VERIFIER_assert(y*z - 18*x - 12*y + 2*z - 6 == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/cohencu_valuebound50.yml b/c/nla-digbench-scaling/cohencu_valuebound50.yml deleted file mode 100644 index 31f78361724..00000000000 --- a/c/nla-digbench-scaling/cohencu_valuebound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'cohencu_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohendiv-ll_unwindbound1.c b/c/nla-digbench-scaling/cohendiv-ll_unwindbound1.c new file mode 100644 index 00000000000..64b5fc3e118 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_unwindbound1.c @@ -0,0 +1,65 @@ +/* + Cohen's integer division + returns x % y + http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohendiv.htm +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "cohendiv-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int x, y; + long long q, r, a, b; + + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + + assume_abort_if_not(y >= 1); + + q = 0; + r = x; + a = 0; + b = 0; + + while (counter++<1) { + __VERIFIER_assert(b == y*a); + __VERIFIER_assert(x == q*y + r); + + if (!(r >= y)) + break; + a = 1; + b = y; + + while (counter++<1) { + __VERIFIER_assert(b == y*a); + __VERIFIER_assert(x == q*y + r); + __VERIFIER_assert(r >= 0); + + if (!(r >= 2 * b)) + break; + + __VERIFIER_assert(r >= 2 * y * a); + + a = 2 * a; + b = 2 * b; + } + r = r - b; + q = q + a; + } + + __VERIFIER_assert(x == q*y + r); + return 0; +} diff --git a/c/nla-digbench-scaling/cohendiv-ll_unwindbound1.yml b/c/nla-digbench-scaling/cohendiv-ll_unwindbound1.yml new file mode 100644 index 00000000000..4192231b992 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_unwindbound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'cohendiv-ll_unwindbound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohendiv-ll_unwindbound10.c b/c/nla-digbench-scaling/cohendiv-ll_unwindbound10.c new file mode 100644 index 00000000000..2879ec620d8 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_unwindbound10.c @@ -0,0 +1,65 @@ +/* + Cohen's integer division + returns x % y + http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohendiv.htm +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "cohendiv-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int x, y; + long long q, r, a, b; + + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + + assume_abort_if_not(y >= 1); + + q = 0; + r = x; + a = 0; + b = 0; + + while (counter++<10) { + __VERIFIER_assert(b == y*a); + __VERIFIER_assert(x == q*y + r); + + if (!(r >= y)) + break; + a = 1; + b = y; + + while (counter++<10) { + __VERIFIER_assert(b == y*a); + __VERIFIER_assert(x == q*y + r); + __VERIFIER_assert(r >= 0); + + if (!(r >= 2 * b)) + break; + + __VERIFIER_assert(r >= 2 * y * a); + + a = 2 * a; + b = 2 * b; + } + r = r - b; + q = q + a; + } + + __VERIFIER_assert(x == q*y + r); + return 0; +} diff --git a/c/nla-digbench-scaling/cohendiv-ll_unwindbound10.yml b/c/nla-digbench-scaling/cohendiv-ll_unwindbound10.yml new file mode 100644 index 00000000000..36582150f62 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_unwindbound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'cohendiv-ll_unwindbound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohendiv-ll_unwindbound100.c b/c/nla-digbench-scaling/cohendiv-ll_unwindbound100.c new file mode 100644 index 00000000000..a0168fb8bae --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_unwindbound100.c @@ -0,0 +1,65 @@ +/* + Cohen's integer division + returns x % y + http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohendiv.htm +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "cohendiv-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int x, y; + long long q, r, a, b; + + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + + assume_abort_if_not(y >= 1); + + q = 0; + r = x; + a = 0; + b = 0; + + while (counter++<100) { + __VERIFIER_assert(b == y*a); + __VERIFIER_assert(x == q*y + r); + + if (!(r >= y)) + break; + a = 1; + b = y; + + while (counter++<100) { + __VERIFIER_assert(b == y*a); + __VERIFIER_assert(x == q*y + r); + __VERIFIER_assert(r >= 0); + + if (!(r >= 2 * b)) + break; + + __VERIFIER_assert(r >= 2 * y * a); + + a = 2 * a; + b = 2 * b; + } + r = r - b; + q = q + a; + } + + __VERIFIER_assert(x == q*y + r); + return 0; +} diff --git a/c/nla-digbench-scaling/cohendiv-ll_unwindbound100.yml b/c/nla-digbench-scaling/cohendiv-ll_unwindbound100.yml new file mode 100644 index 00000000000..7a2e03a395f --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_unwindbound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'cohendiv-ll_unwindbound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohendiv-ll_unwindbound2.c b/c/nla-digbench-scaling/cohendiv-ll_unwindbound2.c new file mode 100644 index 00000000000..f3f5d09f185 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_unwindbound2.c @@ -0,0 +1,65 @@ +/* + Cohen's integer division + returns x % y + http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohendiv.htm +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "cohendiv-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int x, y; + long long q, r, a, b; + + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + + assume_abort_if_not(y >= 1); + + q = 0; + r = x; + a = 0; + b = 0; + + while (counter++<2) { + __VERIFIER_assert(b == y*a); + __VERIFIER_assert(x == q*y + r); + + if (!(r >= y)) + break; + a = 1; + b = y; + + while (counter++<2) { + __VERIFIER_assert(b == y*a); + __VERIFIER_assert(x == q*y + r); + __VERIFIER_assert(r >= 0); + + if (!(r >= 2 * b)) + break; + + __VERIFIER_assert(r >= 2 * y * a); + + a = 2 * a; + b = 2 * b; + } + r = r - b; + q = q + a; + } + + __VERIFIER_assert(x == q*y + r); + return 0; +} diff --git a/c/nla-digbench-scaling/cohendiv-ll_unwindbound2.yml b/c/nla-digbench-scaling/cohendiv-ll_unwindbound2.yml new file mode 100644 index 00000000000..4e740e52d84 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_unwindbound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'cohendiv-ll_unwindbound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohendiv-ll_unwindbound20.c b/c/nla-digbench-scaling/cohendiv-ll_unwindbound20.c new file mode 100644 index 00000000000..1b70eb35943 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_unwindbound20.c @@ -0,0 +1,65 @@ +/* + Cohen's integer division + returns x % y + http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohendiv.htm +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "cohendiv-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int x, y; + long long q, r, a, b; + + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + + assume_abort_if_not(y >= 1); + + q = 0; + r = x; + a = 0; + b = 0; + + while (counter++<20) { + __VERIFIER_assert(b == y*a); + __VERIFIER_assert(x == q*y + r); + + if (!(r >= y)) + break; + a = 1; + b = y; + + while (counter++<20) { + __VERIFIER_assert(b == y*a); + __VERIFIER_assert(x == q*y + r); + __VERIFIER_assert(r >= 0); + + if (!(r >= 2 * b)) + break; + + __VERIFIER_assert(r >= 2 * y * a); + + a = 2 * a; + b = 2 * b; + } + r = r - b; + q = q + a; + } + + __VERIFIER_assert(x == q*y + r); + return 0; +} diff --git a/c/nla-digbench-scaling/cohendiv-ll_unwindbound20.yml b/c/nla-digbench-scaling/cohendiv-ll_unwindbound20.yml new file mode 100644 index 00000000000..1679f144d60 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_unwindbound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'cohendiv-ll_unwindbound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohendiv-ll_unwindbound5.c b/c/nla-digbench-scaling/cohendiv-ll_unwindbound5.c new file mode 100644 index 00000000000..fe6881381d4 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_unwindbound5.c @@ -0,0 +1,65 @@ +/* + Cohen's integer division + returns x % y + http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohendiv.htm +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "cohendiv-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int x, y; + long long q, r, a, b; + + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + + assume_abort_if_not(y >= 1); + + q = 0; + r = x; + a = 0; + b = 0; + + while (counter++<5) { + __VERIFIER_assert(b == y*a); + __VERIFIER_assert(x == q*y + r); + + if (!(r >= y)) + break; + a = 1; + b = y; + + while (counter++<5) { + __VERIFIER_assert(b == y*a); + __VERIFIER_assert(x == q*y + r); + __VERIFIER_assert(r >= 0); + + if (!(r >= 2 * b)) + break; + + __VERIFIER_assert(r >= 2 * y * a); + + a = 2 * a; + b = 2 * b; + } + r = r - b; + q = q + a; + } + + __VERIFIER_assert(x == q*y + r); + return 0; +} diff --git a/c/nla-digbench-scaling/cohendiv-ll_unwindbound5.yml b/c/nla-digbench-scaling/cohendiv-ll_unwindbound5.yml new file mode 100644 index 00000000000..c0252576c96 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_unwindbound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'cohendiv-ll_unwindbound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohendiv-ll_unwindbound50.c b/c/nla-digbench-scaling/cohendiv-ll_unwindbound50.c new file mode 100644 index 00000000000..ccbfde30d4c --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_unwindbound50.c @@ -0,0 +1,65 @@ +/* + Cohen's integer division + returns x % y + http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohendiv.htm +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "cohendiv-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int x, y; + long long q, r, a, b; + + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + + assume_abort_if_not(y >= 1); + + q = 0; + r = x; + a = 0; + b = 0; + + while (counter++<50) { + __VERIFIER_assert(b == y*a); + __VERIFIER_assert(x == q*y + r); + + if (!(r >= y)) + break; + a = 1; + b = y; + + while (counter++<50) { + __VERIFIER_assert(b == y*a); + __VERIFIER_assert(x == q*y + r); + __VERIFIER_assert(r >= 0); + + if (!(r >= 2 * b)) + break; + + __VERIFIER_assert(r >= 2 * y * a); + + a = 2 * a; + b = 2 * b; + } + r = r - b; + q = q + a; + } + + __VERIFIER_assert(x == q*y + r); + return 0; +} diff --git a/c/nla-digbench-scaling/cohendiv-ll_unwindbound50.yml b/c/nla-digbench-scaling/cohendiv-ll_unwindbound50.yml new file mode 100644 index 00000000000..57a3813930d --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_unwindbound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'cohendiv-ll_unwindbound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohendiv-ll_valuebound1.c b/c/nla-digbench-scaling/cohendiv-ll_valuebound1.c new file mode 100644 index 00000000000..0ee8f16292e --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_valuebound1.c @@ -0,0 +1,66 @@ +/* + Cohen's integer division + returns x % y + http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohendiv.htm +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "cohendiv-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int x, y; + long long q, r, a, b; + + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=1); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=1); + + assume_abort_if_not(y >= 1); + + q = 0; + r = x; + a = 0; + b = 0; + + while (1) { + __VERIFIER_assert(b == y*a); + __VERIFIER_assert(x == q*y + r); + + if (!(r >= y)) + break; + a = 1; + b = y; + + while (1) { + __VERIFIER_assert(b == y*a); + __VERIFIER_assert(x == q*y + r); + __VERIFIER_assert(r >= 0); + + if (!(r >= 2 * b)) + break; + + __VERIFIER_assert(r >= 2 * y * a); + + a = 2 * a; + b = 2 * b; + } + r = r - b; + q = q + a; + } + + __VERIFIER_assert(x == q*y + r); + return 0; +} diff --git a/c/nla-digbench-scaling/cohendiv-ll_valuebound1.yml b/c/nla-digbench-scaling/cohendiv-ll_valuebound1.yml new file mode 100644 index 00000000000..0bafd9d3cbc --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_valuebound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'cohendiv-ll_valuebound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohendiv-ll_valuebound10.c b/c/nla-digbench-scaling/cohendiv-ll_valuebound10.c new file mode 100644 index 00000000000..28df26bf708 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_valuebound10.c @@ -0,0 +1,66 @@ +/* + Cohen's integer division + returns x % y + http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohendiv.htm +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "cohendiv-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int x, y; + long long q, r, a, b; + + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=10); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=10); + + assume_abort_if_not(y >= 1); + + q = 0; + r = x; + a = 0; + b = 0; + + while (1) { + __VERIFIER_assert(b == y*a); + __VERIFIER_assert(x == q*y + r); + + if (!(r >= y)) + break; + a = 1; + b = y; + + while (1) { + __VERIFIER_assert(b == y*a); + __VERIFIER_assert(x == q*y + r); + __VERIFIER_assert(r >= 0); + + if (!(r >= 2 * b)) + break; + + __VERIFIER_assert(r >= 2 * y * a); + + a = 2 * a; + b = 2 * b; + } + r = r - b; + q = q + a; + } + + __VERIFIER_assert(x == q*y + r); + return 0; +} diff --git a/c/nla-digbench-scaling/cohendiv-ll_valuebound10.yml b/c/nla-digbench-scaling/cohendiv-ll_valuebound10.yml new file mode 100644 index 00000000000..61b893396e4 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_valuebound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'cohendiv-ll_valuebound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohendiv-ll_valuebound100.c b/c/nla-digbench-scaling/cohendiv-ll_valuebound100.c new file mode 100644 index 00000000000..4e249f76cd5 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_valuebound100.c @@ -0,0 +1,66 @@ +/* + Cohen's integer division + returns x % y + http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohendiv.htm +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "cohendiv-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int x, y; + long long q, r, a, b; + + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=100); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=100); + + assume_abort_if_not(y >= 1); + + q = 0; + r = x; + a = 0; + b = 0; + + while (1) { + __VERIFIER_assert(b == y*a); + __VERIFIER_assert(x == q*y + r); + + if (!(r >= y)) + break; + a = 1; + b = y; + + while (1) { + __VERIFIER_assert(b == y*a); + __VERIFIER_assert(x == q*y + r); + __VERIFIER_assert(r >= 0); + + if (!(r >= 2 * b)) + break; + + __VERIFIER_assert(r >= 2 * y * a); + + a = 2 * a; + b = 2 * b; + } + r = r - b; + q = q + a; + } + + __VERIFIER_assert(x == q*y + r); + return 0; +} diff --git a/c/nla-digbench-scaling/cohendiv-ll_valuebound100.yml b/c/nla-digbench-scaling/cohendiv-ll_valuebound100.yml new file mode 100644 index 00000000000..e3effc17c65 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_valuebound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'cohendiv-ll_valuebound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohendiv-ll_valuebound2.c b/c/nla-digbench-scaling/cohendiv-ll_valuebound2.c new file mode 100644 index 00000000000..bf0442edfc5 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_valuebound2.c @@ -0,0 +1,66 @@ +/* + Cohen's integer division + returns x % y + http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohendiv.htm +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "cohendiv-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int x, y; + long long q, r, a, b; + + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=2); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=2); + + assume_abort_if_not(y >= 1); + + q = 0; + r = x; + a = 0; + b = 0; + + while (1) { + __VERIFIER_assert(b == y*a); + __VERIFIER_assert(x == q*y + r); + + if (!(r >= y)) + break; + a = 1; + b = y; + + while (1) { + __VERIFIER_assert(b == y*a); + __VERIFIER_assert(x == q*y + r); + __VERIFIER_assert(r >= 0); + + if (!(r >= 2 * b)) + break; + + __VERIFIER_assert(r >= 2 * y * a); + + a = 2 * a; + b = 2 * b; + } + r = r - b; + q = q + a; + } + + __VERIFIER_assert(x == q*y + r); + return 0; +} diff --git a/c/nla-digbench-scaling/cohendiv-ll_valuebound2.yml b/c/nla-digbench-scaling/cohendiv-ll_valuebound2.yml new file mode 100644 index 00000000000..af44d28ccf6 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_valuebound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'cohendiv-ll_valuebound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohendiv-ll_valuebound20.c b/c/nla-digbench-scaling/cohendiv-ll_valuebound20.c new file mode 100644 index 00000000000..2ae364809b8 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_valuebound20.c @@ -0,0 +1,66 @@ +/* + Cohen's integer division + returns x % y + http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohendiv.htm +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "cohendiv-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int x, y; + long long q, r, a, b; + + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=20); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=20); + + assume_abort_if_not(y >= 1); + + q = 0; + r = x; + a = 0; + b = 0; + + while (1) { + __VERIFIER_assert(b == y*a); + __VERIFIER_assert(x == q*y + r); + + if (!(r >= y)) + break; + a = 1; + b = y; + + while (1) { + __VERIFIER_assert(b == y*a); + __VERIFIER_assert(x == q*y + r); + __VERIFIER_assert(r >= 0); + + if (!(r >= 2 * b)) + break; + + __VERIFIER_assert(r >= 2 * y * a); + + a = 2 * a; + b = 2 * b; + } + r = r - b; + q = q + a; + } + + __VERIFIER_assert(x == q*y + r); + return 0; +} diff --git a/c/nla-digbench-scaling/cohendiv-ll_valuebound20.yml b/c/nla-digbench-scaling/cohendiv-ll_valuebound20.yml new file mode 100644 index 00000000000..ce63ba79481 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_valuebound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'cohendiv-ll_valuebound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohendiv-ll_valuebound5.c b/c/nla-digbench-scaling/cohendiv-ll_valuebound5.c new file mode 100644 index 00000000000..f8844c1ef34 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_valuebound5.c @@ -0,0 +1,66 @@ +/* + Cohen's integer division + returns x % y + http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohendiv.htm +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "cohendiv-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int x, y; + long long q, r, a, b; + + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=5); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=5); + + assume_abort_if_not(y >= 1); + + q = 0; + r = x; + a = 0; + b = 0; + + while (1) { + __VERIFIER_assert(b == y*a); + __VERIFIER_assert(x == q*y + r); + + if (!(r >= y)) + break; + a = 1; + b = y; + + while (1) { + __VERIFIER_assert(b == y*a); + __VERIFIER_assert(x == q*y + r); + __VERIFIER_assert(r >= 0); + + if (!(r >= 2 * b)) + break; + + __VERIFIER_assert(r >= 2 * y * a); + + a = 2 * a; + b = 2 * b; + } + r = r - b; + q = q + a; + } + + __VERIFIER_assert(x == q*y + r); + return 0; +} diff --git a/c/nla-digbench-scaling/cohendiv-ll_valuebound5.yml b/c/nla-digbench-scaling/cohendiv-ll_valuebound5.yml new file mode 100644 index 00000000000..74b3a5a43b6 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_valuebound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'cohendiv-ll_valuebound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohendiv-ll_valuebound50.c b/c/nla-digbench-scaling/cohendiv-ll_valuebound50.c new file mode 100644 index 00000000000..4b864089c3b --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_valuebound50.c @@ -0,0 +1,66 @@ +/* + Cohen's integer division + returns x % y + http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohendiv.htm +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "cohendiv-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int x, y; + long long q, r, a, b; + + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=50); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=50); + + assume_abort_if_not(y >= 1); + + q = 0; + r = x; + a = 0; + b = 0; + + while (1) { + __VERIFIER_assert(b == y*a); + __VERIFIER_assert(x == q*y + r); + + if (!(r >= y)) + break; + a = 1; + b = y; + + while (1) { + __VERIFIER_assert(b == y*a); + __VERIFIER_assert(x == q*y + r); + __VERIFIER_assert(r >= 0); + + if (!(r >= 2 * b)) + break; + + __VERIFIER_assert(r >= 2 * y * a); + + a = 2 * a; + b = 2 * b; + } + r = r - b; + q = q + a; + } + + __VERIFIER_assert(x == q*y + r); + return 0; +} diff --git a/c/nla-digbench-scaling/cohendiv-ll_valuebound50.yml b/c/nla-digbench-scaling/cohendiv-ll_valuebound50.yml new file mode 100644 index 00000000000..e3c9f628991 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_valuebound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'cohendiv-ll_valuebound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohendiv_unwindbound1.c b/c/nla-digbench-scaling/cohendiv_unwindbound1.c deleted file mode 100644 index 58b4819a987..00000000000 --- a/c/nla-digbench-scaling/cohendiv_unwindbound1.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - Cohen's integer division - returns x % y - http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohendiv.htm -*/ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int x, y, q, r, a, b; - - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - - assume_abort_if_not(y >= 1); - - q = 0; - r = x; - a = 0; - b = 0; - - while (counter++<1) { - __VERIFIER_assert(b == y*a); - __VERIFIER_assert(x == q*y + r); - - if (!(r >= y)) - break; - a = 1; - b = y; - - while (counter++<1) { - __VERIFIER_assert(b == y*a); - __VERIFIER_assert(x == q*y + r); - __VERIFIER_assert(r >= 0); - - if (!(r >= 2 * b)) - break; - - __VERIFIER_assert(r >= 2 * y * a); - - a = 2 * a; - b = 2 * b; - } - r = r - b; - q = q + a; - } - - __VERIFIER_assert(x == q*y + r); - return 0; -} diff --git a/c/nla-digbench-scaling/cohendiv_unwindbound1.yml b/c/nla-digbench-scaling/cohendiv_unwindbound1.yml deleted file mode 100644 index 9994a4059c9..00000000000 --- a/c/nla-digbench-scaling/cohendiv_unwindbound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'cohendiv_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohendiv_unwindbound10.c b/c/nla-digbench-scaling/cohendiv_unwindbound10.c deleted file mode 100644 index d384ed67102..00000000000 --- a/c/nla-digbench-scaling/cohendiv_unwindbound10.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - Cohen's integer division - returns x % y - http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohendiv.htm -*/ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int x, y, q, r, a, b; - - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - - assume_abort_if_not(y >= 1); - - q = 0; - r = x; - a = 0; - b = 0; - - while (counter++<10) { - __VERIFIER_assert(b == y*a); - __VERIFIER_assert(x == q*y + r); - - if (!(r >= y)) - break; - a = 1; - b = y; - - while (counter++<10) { - __VERIFIER_assert(b == y*a); - __VERIFIER_assert(x == q*y + r); - __VERIFIER_assert(r >= 0); - - if (!(r >= 2 * b)) - break; - - __VERIFIER_assert(r >= 2 * y * a); - - a = 2 * a; - b = 2 * b; - } - r = r - b; - q = q + a; - } - - __VERIFIER_assert(x == q*y + r); - return 0; -} diff --git a/c/nla-digbench-scaling/cohendiv_unwindbound10.yml b/c/nla-digbench-scaling/cohendiv_unwindbound10.yml deleted file mode 100644 index f5cc0969abf..00000000000 --- a/c/nla-digbench-scaling/cohendiv_unwindbound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'cohendiv_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohendiv_unwindbound100.c b/c/nla-digbench-scaling/cohendiv_unwindbound100.c deleted file mode 100644 index 93c9c27da38..00000000000 --- a/c/nla-digbench-scaling/cohendiv_unwindbound100.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - Cohen's integer division - returns x % y - http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohendiv.htm -*/ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int x, y, q, r, a, b; - - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - - assume_abort_if_not(y >= 1); - - q = 0; - r = x; - a = 0; - b = 0; - - while (counter++<100) { - __VERIFIER_assert(b == y*a); - __VERIFIER_assert(x == q*y + r); - - if (!(r >= y)) - break; - a = 1; - b = y; - - while (counter++<100) { - __VERIFIER_assert(b == y*a); - __VERIFIER_assert(x == q*y + r); - __VERIFIER_assert(r >= 0); - - if (!(r >= 2 * b)) - break; - - __VERIFIER_assert(r >= 2 * y * a); - - a = 2 * a; - b = 2 * b; - } - r = r - b; - q = q + a; - } - - __VERIFIER_assert(x == q*y + r); - return 0; -} diff --git a/c/nla-digbench-scaling/cohendiv_unwindbound100.yml b/c/nla-digbench-scaling/cohendiv_unwindbound100.yml deleted file mode 100644 index 8fe7a031459..00000000000 --- a/c/nla-digbench-scaling/cohendiv_unwindbound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'cohendiv_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohendiv_unwindbound2.c b/c/nla-digbench-scaling/cohendiv_unwindbound2.c deleted file mode 100644 index 5ce8f30f70f..00000000000 --- a/c/nla-digbench-scaling/cohendiv_unwindbound2.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - Cohen's integer division - returns x % y - http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohendiv.htm -*/ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int x, y, q, r, a, b; - - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - - assume_abort_if_not(y >= 1); - - q = 0; - r = x; - a = 0; - b = 0; - - while (counter++<2) { - __VERIFIER_assert(b == y*a); - __VERIFIER_assert(x == q*y + r); - - if (!(r >= y)) - break; - a = 1; - b = y; - - while (counter++<2) { - __VERIFIER_assert(b == y*a); - __VERIFIER_assert(x == q*y + r); - __VERIFIER_assert(r >= 0); - - if (!(r >= 2 * b)) - break; - - __VERIFIER_assert(r >= 2 * y * a); - - a = 2 * a; - b = 2 * b; - } - r = r - b; - q = q + a; - } - - __VERIFIER_assert(x == q*y + r); - return 0; -} diff --git a/c/nla-digbench-scaling/cohendiv_unwindbound2.yml b/c/nla-digbench-scaling/cohendiv_unwindbound2.yml deleted file mode 100644 index 9cc565f2543..00000000000 --- a/c/nla-digbench-scaling/cohendiv_unwindbound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'cohendiv_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohendiv_unwindbound20.c b/c/nla-digbench-scaling/cohendiv_unwindbound20.c deleted file mode 100644 index cf460bc18f6..00000000000 --- a/c/nla-digbench-scaling/cohendiv_unwindbound20.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - Cohen's integer division - returns x % y - http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohendiv.htm -*/ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int x, y, q, r, a, b; - - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - - assume_abort_if_not(y >= 1); - - q = 0; - r = x; - a = 0; - b = 0; - - while (counter++<20) { - __VERIFIER_assert(b == y*a); - __VERIFIER_assert(x == q*y + r); - - if (!(r >= y)) - break; - a = 1; - b = y; - - while (counter++<20) { - __VERIFIER_assert(b == y*a); - __VERIFIER_assert(x == q*y + r); - __VERIFIER_assert(r >= 0); - - if (!(r >= 2 * b)) - break; - - __VERIFIER_assert(r >= 2 * y * a); - - a = 2 * a; - b = 2 * b; - } - r = r - b; - q = q + a; - } - - __VERIFIER_assert(x == q*y + r); - return 0; -} diff --git a/c/nla-digbench-scaling/cohendiv_unwindbound20.yml b/c/nla-digbench-scaling/cohendiv_unwindbound20.yml deleted file mode 100644 index dd6747df60b..00000000000 --- a/c/nla-digbench-scaling/cohendiv_unwindbound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'cohendiv_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohendiv_unwindbound5.c b/c/nla-digbench-scaling/cohendiv_unwindbound5.c deleted file mode 100644 index a6d6bf12666..00000000000 --- a/c/nla-digbench-scaling/cohendiv_unwindbound5.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - Cohen's integer division - returns x % y - http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohendiv.htm -*/ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int x, y, q, r, a, b; - - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - - assume_abort_if_not(y >= 1); - - q = 0; - r = x; - a = 0; - b = 0; - - while (counter++<5) { - __VERIFIER_assert(b == y*a); - __VERIFIER_assert(x == q*y + r); - - if (!(r >= y)) - break; - a = 1; - b = y; - - while (counter++<5) { - __VERIFIER_assert(b == y*a); - __VERIFIER_assert(x == q*y + r); - __VERIFIER_assert(r >= 0); - - if (!(r >= 2 * b)) - break; - - __VERIFIER_assert(r >= 2 * y * a); - - a = 2 * a; - b = 2 * b; - } - r = r - b; - q = q + a; - } - - __VERIFIER_assert(x == q*y + r); - return 0; -} diff --git a/c/nla-digbench-scaling/cohendiv_unwindbound5.yml b/c/nla-digbench-scaling/cohendiv_unwindbound5.yml deleted file mode 100644 index 053f475bd4e..00000000000 --- a/c/nla-digbench-scaling/cohendiv_unwindbound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'cohendiv_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohendiv_unwindbound50.c b/c/nla-digbench-scaling/cohendiv_unwindbound50.c deleted file mode 100644 index ddb0af3aeb9..00000000000 --- a/c/nla-digbench-scaling/cohendiv_unwindbound50.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - Cohen's integer division - returns x % y - http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohendiv.htm -*/ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int x, y, q, r, a, b; - - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - - assume_abort_if_not(y >= 1); - - q = 0; - r = x; - a = 0; - b = 0; - - while (counter++<50) { - __VERIFIER_assert(b == y*a); - __VERIFIER_assert(x == q*y + r); - - if (!(r >= y)) - break; - a = 1; - b = y; - - while (counter++<50) { - __VERIFIER_assert(b == y*a); - __VERIFIER_assert(x == q*y + r); - __VERIFIER_assert(r >= 0); - - if (!(r >= 2 * b)) - break; - - __VERIFIER_assert(r >= 2 * y * a); - - a = 2 * a; - b = 2 * b; - } - r = r - b; - q = q + a; - } - - __VERIFIER_assert(x == q*y + r); - return 0; -} diff --git a/c/nla-digbench-scaling/cohendiv_unwindbound50.yml b/c/nla-digbench-scaling/cohendiv_unwindbound50.yml deleted file mode 100644 index cc00ce9e660..00000000000 --- a/c/nla-digbench-scaling/cohendiv_unwindbound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'cohendiv_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohendiv_valuebound1.c b/c/nla-digbench-scaling/cohendiv_valuebound1.c deleted file mode 100644 index fcfdbfb5b8f..00000000000 --- a/c/nla-digbench-scaling/cohendiv_valuebound1.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - Cohen's integer division - returns x % y - http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohendiv.htm -*/ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int x, y, q, r, a, b; - - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=1); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=1); - - assume_abort_if_not(y >= 1); - - q = 0; - r = x; - a = 0; - b = 0; - - while (1) { - __VERIFIER_assert(b == y*a); - __VERIFIER_assert(x == q*y + r); - - if (!(r >= y)) - break; - a = 1; - b = y; - - while (1) { - __VERIFIER_assert(b == y*a); - __VERIFIER_assert(x == q*y + r); - __VERIFIER_assert(r >= 0); - - if (!(r >= 2 * b)) - break; - - __VERIFIER_assert(r >= 2 * y * a); - - a = 2 * a; - b = 2 * b; - } - r = r - b; - q = q + a; - } - - __VERIFIER_assert(x == q*y + r); - return 0; -} diff --git a/c/nla-digbench-scaling/cohendiv_valuebound1.yml b/c/nla-digbench-scaling/cohendiv_valuebound1.yml deleted file mode 100644 index 9606930ee9d..00000000000 --- a/c/nla-digbench-scaling/cohendiv_valuebound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'cohendiv_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohendiv_valuebound10.c b/c/nla-digbench-scaling/cohendiv_valuebound10.c deleted file mode 100644 index 52c431afb6b..00000000000 --- a/c/nla-digbench-scaling/cohendiv_valuebound10.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - Cohen's integer division - returns x % y - http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohendiv.htm -*/ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int x, y, q, r, a, b; - - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=10); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=10); - - assume_abort_if_not(y >= 1); - - q = 0; - r = x; - a = 0; - b = 0; - - while (1) { - __VERIFIER_assert(b == y*a); - __VERIFIER_assert(x == q*y + r); - - if (!(r >= y)) - break; - a = 1; - b = y; - - while (1) { - __VERIFIER_assert(b == y*a); - __VERIFIER_assert(x == q*y + r); - __VERIFIER_assert(r >= 0); - - if (!(r >= 2 * b)) - break; - - __VERIFIER_assert(r >= 2 * y * a); - - a = 2 * a; - b = 2 * b; - } - r = r - b; - q = q + a; - } - - __VERIFIER_assert(x == q*y + r); - return 0; -} diff --git a/c/nla-digbench-scaling/cohendiv_valuebound10.yml b/c/nla-digbench-scaling/cohendiv_valuebound10.yml deleted file mode 100644 index 82c602085a0..00000000000 --- a/c/nla-digbench-scaling/cohendiv_valuebound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'cohendiv_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohendiv_valuebound100.c b/c/nla-digbench-scaling/cohendiv_valuebound100.c deleted file mode 100644 index 50dced3e4ac..00000000000 --- a/c/nla-digbench-scaling/cohendiv_valuebound100.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - Cohen's integer division - returns x % y - http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohendiv.htm -*/ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int x, y, q, r, a, b; - - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=100); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=100); - - assume_abort_if_not(y >= 1); - - q = 0; - r = x; - a = 0; - b = 0; - - while (1) { - __VERIFIER_assert(b == y*a); - __VERIFIER_assert(x == q*y + r); - - if (!(r >= y)) - break; - a = 1; - b = y; - - while (1) { - __VERIFIER_assert(b == y*a); - __VERIFIER_assert(x == q*y + r); - __VERIFIER_assert(r >= 0); - - if (!(r >= 2 * b)) - break; - - __VERIFIER_assert(r >= 2 * y * a); - - a = 2 * a; - b = 2 * b; - } - r = r - b; - q = q + a; - } - - __VERIFIER_assert(x == q*y + r); - return 0; -} diff --git a/c/nla-digbench-scaling/cohendiv_valuebound100.yml b/c/nla-digbench-scaling/cohendiv_valuebound100.yml deleted file mode 100644 index 6ee5b3bd3e8..00000000000 --- a/c/nla-digbench-scaling/cohendiv_valuebound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'cohendiv_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohendiv_valuebound2.c b/c/nla-digbench-scaling/cohendiv_valuebound2.c deleted file mode 100644 index 9b65c868a42..00000000000 --- a/c/nla-digbench-scaling/cohendiv_valuebound2.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - Cohen's integer division - returns x % y - http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohendiv.htm -*/ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int x, y, q, r, a, b; - - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=2); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=2); - - assume_abort_if_not(y >= 1); - - q = 0; - r = x; - a = 0; - b = 0; - - while (1) { - __VERIFIER_assert(b == y*a); - __VERIFIER_assert(x == q*y + r); - - if (!(r >= y)) - break; - a = 1; - b = y; - - while (1) { - __VERIFIER_assert(b == y*a); - __VERIFIER_assert(x == q*y + r); - __VERIFIER_assert(r >= 0); - - if (!(r >= 2 * b)) - break; - - __VERIFIER_assert(r >= 2 * y * a); - - a = 2 * a; - b = 2 * b; - } - r = r - b; - q = q + a; - } - - __VERIFIER_assert(x == q*y + r); - return 0; -} diff --git a/c/nla-digbench-scaling/cohendiv_valuebound2.yml b/c/nla-digbench-scaling/cohendiv_valuebound2.yml deleted file mode 100644 index 70084e0fe3d..00000000000 --- a/c/nla-digbench-scaling/cohendiv_valuebound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'cohendiv_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohendiv_valuebound20.c b/c/nla-digbench-scaling/cohendiv_valuebound20.c deleted file mode 100644 index fd9b9ac63b4..00000000000 --- a/c/nla-digbench-scaling/cohendiv_valuebound20.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - Cohen's integer division - returns x % y - http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohendiv.htm -*/ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int x, y, q, r, a, b; - - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=20); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=20); - - assume_abort_if_not(y >= 1); - - q = 0; - r = x; - a = 0; - b = 0; - - while (1) { - __VERIFIER_assert(b == y*a); - __VERIFIER_assert(x == q*y + r); - - if (!(r >= y)) - break; - a = 1; - b = y; - - while (1) { - __VERIFIER_assert(b == y*a); - __VERIFIER_assert(x == q*y + r); - __VERIFIER_assert(r >= 0); - - if (!(r >= 2 * b)) - break; - - __VERIFIER_assert(r >= 2 * y * a); - - a = 2 * a; - b = 2 * b; - } - r = r - b; - q = q + a; - } - - __VERIFIER_assert(x == q*y + r); - return 0; -} diff --git a/c/nla-digbench-scaling/cohendiv_valuebound20.yml b/c/nla-digbench-scaling/cohendiv_valuebound20.yml deleted file mode 100644 index 6b50fc0b9c3..00000000000 --- a/c/nla-digbench-scaling/cohendiv_valuebound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'cohendiv_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohendiv_valuebound5.c b/c/nla-digbench-scaling/cohendiv_valuebound5.c deleted file mode 100644 index 979b464cd5b..00000000000 --- a/c/nla-digbench-scaling/cohendiv_valuebound5.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - Cohen's integer division - returns x % y - http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohendiv.htm -*/ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int x, y, q, r, a, b; - - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=5); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=5); - - assume_abort_if_not(y >= 1); - - q = 0; - r = x; - a = 0; - b = 0; - - while (1) { - __VERIFIER_assert(b == y*a); - __VERIFIER_assert(x == q*y + r); - - if (!(r >= y)) - break; - a = 1; - b = y; - - while (1) { - __VERIFIER_assert(b == y*a); - __VERIFIER_assert(x == q*y + r); - __VERIFIER_assert(r >= 0); - - if (!(r >= 2 * b)) - break; - - __VERIFIER_assert(r >= 2 * y * a); - - a = 2 * a; - b = 2 * b; - } - r = r - b; - q = q + a; - } - - __VERIFIER_assert(x == q*y + r); - return 0; -} diff --git a/c/nla-digbench-scaling/cohendiv_valuebound5.yml b/c/nla-digbench-scaling/cohendiv_valuebound5.yml deleted file mode 100644 index 3f13056f1e1..00000000000 --- a/c/nla-digbench-scaling/cohendiv_valuebound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'cohendiv_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/cohendiv_valuebound50.c b/c/nla-digbench-scaling/cohendiv_valuebound50.c deleted file mode 100644 index 1116e300f1a..00000000000 --- a/c/nla-digbench-scaling/cohendiv_valuebound50.c +++ /dev/null @@ -1,64 +0,0 @@ -/* - Cohen's integer division - returns x % y - http://www.cs.upc.edu/~erodri/webpage/polynomial_invariants/cohendiv.htm -*/ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int x, y, q, r, a, b; - - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=50); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=50); - - assume_abort_if_not(y >= 1); - - q = 0; - r = x; - a = 0; - b = 0; - - while (1) { - __VERIFIER_assert(b == y*a); - __VERIFIER_assert(x == q*y + r); - - if (!(r >= y)) - break; - a = 1; - b = y; - - while (1) { - __VERIFIER_assert(b == y*a); - __VERIFIER_assert(x == q*y + r); - __VERIFIER_assert(r >= 0); - - if (!(r >= 2 * b)) - break; - - __VERIFIER_assert(r >= 2 * y * a); - - a = 2 * a; - b = 2 * b; - } - r = r - b; - q = q + a; - } - - __VERIFIER_assert(x == q*y + r); - return 0; -} diff --git a/c/nla-digbench-scaling/cohendiv_valuebound50.yml b/c/nla-digbench-scaling/cohendiv_valuebound50.yml deleted file mode 100644 index db4601ea089..00000000000 --- a/c/nla-digbench-scaling/cohendiv_valuebound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'cohendiv_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/dijkstra-u_unwindbound1.c b/c/nla-digbench-scaling/dijkstra-u_unwindbound1.c new file mode 100644 index 00000000000..a50c2bb718a --- /dev/null +++ b/c/nla-digbench-scaling/dijkstra-u_unwindbound1.c @@ -0,0 +1,61 @@ +/* Compute the floor of the square root, by Dijkstra */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "dijkstra-u.c", 5, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + unsigned int n, p, q, r, h; + + n = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(n < 4294967295 / 4); // Avoid non-terminating loop + + p = 0; + q = 1; + r = n; + h = 0; + while (counter++<1) { + if (!(q <= n)) + break; + + q = 4 * q; + } + //q == 4^n + + while (counter++<1) { + __VERIFIER_assert(r < 2 * p + q); + __VERIFIER_assert(p*p + r*q == n*q); + __VERIFIER_assert(h * h * h - 12 * h * n * q + 16 * n * p * q - h * q * q - 4 * p * q * q + 12 * h * q * r - 16 * p * q * r == 0); + __VERIFIER_assert(h * h * n - 4 * h * n * p + 4 * (n * n) * q - n * q * q - h * h * r + 4 * h * p * r - 8 * n * q * r + q * q * r + 4 * q * r * r == 0); + __VERIFIER_assert(h * h * p - 4 * h * n * q + 4 * n * p * q - p * q * q + 4 * h * q * r - 4 * p * q * r == 0); + __VERIFIER_assert(p * p - n * q + q * r == 0); + + if (!(q != 1)) + break; + + q = q / 4; + h = p + q; + p = p / 2; + if (r >= h) { + p = p + q; + r = r - h; + } + } + __VERIFIER_assert(h*h*h - 12*h*n + 16*n*p + 12*h*r - 16*p*r - h - 4*p == 0); + __VERIFIER_assert(p*p - n + r == 0); + __VERIFIER_assert(h*h*p - 4*h*n + 4*n*p + 4*h*r - 4*p*r - p == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/dijkstra-u_unwindbound1.yml b/c/nla-digbench-scaling/dijkstra-u_unwindbound1.yml new file mode 100644 index 00000000000..9bd7b9021bf --- /dev/null +++ b/c/nla-digbench-scaling/dijkstra-u_unwindbound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'dijkstra-u_unwindbound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/dijkstra-u_unwindbound10.c b/c/nla-digbench-scaling/dijkstra-u_unwindbound10.c new file mode 100644 index 00000000000..0840adb39c6 --- /dev/null +++ b/c/nla-digbench-scaling/dijkstra-u_unwindbound10.c @@ -0,0 +1,61 @@ +/* Compute the floor of the square root, by Dijkstra */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "dijkstra-u.c", 5, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + unsigned int n, p, q, r, h; + + n = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(n < 4294967295 / 4); // Avoid non-terminating loop + + p = 0; + q = 1; + r = n; + h = 0; + while (counter++<10) { + if (!(q <= n)) + break; + + q = 4 * q; + } + //q == 4^n + + while (counter++<10) { + __VERIFIER_assert(r < 2 * p + q); + __VERIFIER_assert(p*p + r*q == n*q); + __VERIFIER_assert(h * h * h - 12 * h * n * q + 16 * n * p * q - h * q * q - 4 * p * q * q + 12 * h * q * r - 16 * p * q * r == 0); + __VERIFIER_assert(h * h * n - 4 * h * n * p + 4 * (n * n) * q - n * q * q - h * h * r + 4 * h * p * r - 8 * n * q * r + q * q * r + 4 * q * r * r == 0); + __VERIFIER_assert(h * h * p - 4 * h * n * q + 4 * n * p * q - p * q * q + 4 * h * q * r - 4 * p * q * r == 0); + __VERIFIER_assert(p * p - n * q + q * r == 0); + + if (!(q != 1)) + break; + + q = q / 4; + h = p + q; + p = p / 2; + if (r >= h) { + p = p + q; + r = r - h; + } + } + __VERIFIER_assert(h*h*h - 12*h*n + 16*n*p + 12*h*r - 16*p*r - h - 4*p == 0); + __VERIFIER_assert(p*p - n + r == 0); + __VERIFIER_assert(h*h*p - 4*h*n + 4*n*p + 4*h*r - 4*p*r - p == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/dijkstra-u_unwindbound10.yml b/c/nla-digbench-scaling/dijkstra-u_unwindbound10.yml new file mode 100644 index 00000000000..2c6c3566156 --- /dev/null +++ b/c/nla-digbench-scaling/dijkstra-u_unwindbound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'dijkstra-u_unwindbound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/dijkstra-u_unwindbound100.c b/c/nla-digbench-scaling/dijkstra-u_unwindbound100.c new file mode 100644 index 00000000000..d522c1f117b --- /dev/null +++ b/c/nla-digbench-scaling/dijkstra-u_unwindbound100.c @@ -0,0 +1,61 @@ +/* Compute the floor of the square root, by Dijkstra */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "dijkstra-u.c", 5, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + unsigned int n, p, q, r, h; + + n = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(n < 4294967295 / 4); // Avoid non-terminating loop + + p = 0; + q = 1; + r = n; + h = 0; + while (counter++<100) { + if (!(q <= n)) + break; + + q = 4 * q; + } + //q == 4^n + + while (counter++<100) { + __VERIFIER_assert(r < 2 * p + q); + __VERIFIER_assert(p*p + r*q == n*q); + __VERIFIER_assert(h * h * h - 12 * h * n * q + 16 * n * p * q - h * q * q - 4 * p * q * q + 12 * h * q * r - 16 * p * q * r == 0); + __VERIFIER_assert(h * h * n - 4 * h * n * p + 4 * (n * n) * q - n * q * q - h * h * r + 4 * h * p * r - 8 * n * q * r + q * q * r + 4 * q * r * r == 0); + __VERIFIER_assert(h * h * p - 4 * h * n * q + 4 * n * p * q - p * q * q + 4 * h * q * r - 4 * p * q * r == 0); + __VERIFIER_assert(p * p - n * q + q * r == 0); + + if (!(q != 1)) + break; + + q = q / 4; + h = p + q; + p = p / 2; + if (r >= h) { + p = p + q; + r = r - h; + } + } + __VERIFIER_assert(h*h*h - 12*h*n + 16*n*p + 12*h*r - 16*p*r - h - 4*p == 0); + __VERIFIER_assert(p*p - n + r == 0); + __VERIFIER_assert(h*h*p - 4*h*n + 4*n*p + 4*h*r - 4*p*r - p == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/dijkstra-u_unwindbound100.yml b/c/nla-digbench-scaling/dijkstra-u_unwindbound100.yml new file mode 100644 index 00000000000..f461d3277f4 --- /dev/null +++ b/c/nla-digbench-scaling/dijkstra-u_unwindbound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'dijkstra-u_unwindbound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/dijkstra-u_unwindbound2.c b/c/nla-digbench-scaling/dijkstra-u_unwindbound2.c new file mode 100644 index 00000000000..e801b894f2a --- /dev/null +++ b/c/nla-digbench-scaling/dijkstra-u_unwindbound2.c @@ -0,0 +1,61 @@ +/* Compute the floor of the square root, by Dijkstra */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "dijkstra-u.c", 5, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + unsigned int n, p, q, r, h; + + n = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(n < 4294967295 / 4); // Avoid non-terminating loop + + p = 0; + q = 1; + r = n; + h = 0; + while (counter++<2) { + if (!(q <= n)) + break; + + q = 4 * q; + } + //q == 4^n + + while (counter++<2) { + __VERIFIER_assert(r < 2 * p + q); + __VERIFIER_assert(p*p + r*q == n*q); + __VERIFIER_assert(h * h * h - 12 * h * n * q + 16 * n * p * q - h * q * q - 4 * p * q * q + 12 * h * q * r - 16 * p * q * r == 0); + __VERIFIER_assert(h * h * n - 4 * h * n * p + 4 * (n * n) * q - n * q * q - h * h * r + 4 * h * p * r - 8 * n * q * r + q * q * r + 4 * q * r * r == 0); + __VERIFIER_assert(h * h * p - 4 * h * n * q + 4 * n * p * q - p * q * q + 4 * h * q * r - 4 * p * q * r == 0); + __VERIFIER_assert(p * p - n * q + q * r == 0); + + if (!(q != 1)) + break; + + q = q / 4; + h = p + q; + p = p / 2; + if (r >= h) { + p = p + q; + r = r - h; + } + } + __VERIFIER_assert(h*h*h - 12*h*n + 16*n*p + 12*h*r - 16*p*r - h - 4*p == 0); + __VERIFIER_assert(p*p - n + r == 0); + __VERIFIER_assert(h*h*p - 4*h*n + 4*n*p + 4*h*r - 4*p*r - p == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/dijkstra-u_unwindbound2.yml b/c/nla-digbench-scaling/dijkstra-u_unwindbound2.yml new file mode 100644 index 00000000000..04ee5e106e4 --- /dev/null +++ b/c/nla-digbench-scaling/dijkstra-u_unwindbound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'dijkstra-u_unwindbound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/dijkstra-u_unwindbound20.c b/c/nla-digbench-scaling/dijkstra-u_unwindbound20.c new file mode 100644 index 00000000000..2129ddfafe3 --- /dev/null +++ b/c/nla-digbench-scaling/dijkstra-u_unwindbound20.c @@ -0,0 +1,61 @@ +/* Compute the floor of the square root, by Dijkstra */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "dijkstra-u.c", 5, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + unsigned int n, p, q, r, h; + + n = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(n < 4294967295 / 4); // Avoid non-terminating loop + + p = 0; + q = 1; + r = n; + h = 0; + while (counter++<20) { + if (!(q <= n)) + break; + + q = 4 * q; + } + //q == 4^n + + while (counter++<20) { + __VERIFIER_assert(r < 2 * p + q); + __VERIFIER_assert(p*p + r*q == n*q); + __VERIFIER_assert(h * h * h - 12 * h * n * q + 16 * n * p * q - h * q * q - 4 * p * q * q + 12 * h * q * r - 16 * p * q * r == 0); + __VERIFIER_assert(h * h * n - 4 * h * n * p + 4 * (n * n) * q - n * q * q - h * h * r + 4 * h * p * r - 8 * n * q * r + q * q * r + 4 * q * r * r == 0); + __VERIFIER_assert(h * h * p - 4 * h * n * q + 4 * n * p * q - p * q * q + 4 * h * q * r - 4 * p * q * r == 0); + __VERIFIER_assert(p * p - n * q + q * r == 0); + + if (!(q != 1)) + break; + + q = q / 4; + h = p + q; + p = p / 2; + if (r >= h) { + p = p + q; + r = r - h; + } + } + __VERIFIER_assert(h*h*h - 12*h*n + 16*n*p + 12*h*r - 16*p*r - h - 4*p == 0); + __VERIFIER_assert(p*p - n + r == 0); + __VERIFIER_assert(h*h*p - 4*h*n + 4*n*p + 4*h*r - 4*p*r - p == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/dijkstra-u_unwindbound20.yml b/c/nla-digbench-scaling/dijkstra-u_unwindbound20.yml new file mode 100644 index 00000000000..515cbeac9e6 --- /dev/null +++ b/c/nla-digbench-scaling/dijkstra-u_unwindbound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'dijkstra-u_unwindbound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/dijkstra-u_unwindbound5.c b/c/nla-digbench-scaling/dijkstra-u_unwindbound5.c new file mode 100644 index 00000000000..63a2fe69664 --- /dev/null +++ b/c/nla-digbench-scaling/dijkstra-u_unwindbound5.c @@ -0,0 +1,61 @@ +/* Compute the floor of the square root, by Dijkstra */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "dijkstra-u.c", 5, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + unsigned int n, p, q, r, h; + + n = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(n < 4294967295 / 4); // Avoid non-terminating loop + + p = 0; + q = 1; + r = n; + h = 0; + while (counter++<5) { + if (!(q <= n)) + break; + + q = 4 * q; + } + //q == 4^n + + while (counter++<5) { + __VERIFIER_assert(r < 2 * p + q); + __VERIFIER_assert(p*p + r*q == n*q); + __VERIFIER_assert(h * h * h - 12 * h * n * q + 16 * n * p * q - h * q * q - 4 * p * q * q + 12 * h * q * r - 16 * p * q * r == 0); + __VERIFIER_assert(h * h * n - 4 * h * n * p + 4 * (n * n) * q - n * q * q - h * h * r + 4 * h * p * r - 8 * n * q * r + q * q * r + 4 * q * r * r == 0); + __VERIFIER_assert(h * h * p - 4 * h * n * q + 4 * n * p * q - p * q * q + 4 * h * q * r - 4 * p * q * r == 0); + __VERIFIER_assert(p * p - n * q + q * r == 0); + + if (!(q != 1)) + break; + + q = q / 4; + h = p + q; + p = p / 2; + if (r >= h) { + p = p + q; + r = r - h; + } + } + __VERIFIER_assert(h*h*h - 12*h*n + 16*n*p + 12*h*r - 16*p*r - h - 4*p == 0); + __VERIFIER_assert(p*p - n + r == 0); + __VERIFIER_assert(h*h*p - 4*h*n + 4*n*p + 4*h*r - 4*p*r - p == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/dijkstra-u_unwindbound5.yml b/c/nla-digbench-scaling/dijkstra-u_unwindbound5.yml new file mode 100644 index 00000000000..dbf936f4ca2 --- /dev/null +++ b/c/nla-digbench-scaling/dijkstra-u_unwindbound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'dijkstra-u_unwindbound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/dijkstra-u_unwindbound50.c b/c/nla-digbench-scaling/dijkstra-u_unwindbound50.c new file mode 100644 index 00000000000..0438073b204 --- /dev/null +++ b/c/nla-digbench-scaling/dijkstra-u_unwindbound50.c @@ -0,0 +1,61 @@ +/* Compute the floor of the square root, by Dijkstra */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "dijkstra-u.c", 5, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + unsigned int n, p, q, r, h; + + n = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(n < 4294967295 / 4); // Avoid non-terminating loop + + p = 0; + q = 1; + r = n; + h = 0; + while (counter++<50) { + if (!(q <= n)) + break; + + q = 4 * q; + } + //q == 4^n + + while (counter++<50) { + __VERIFIER_assert(r < 2 * p + q); + __VERIFIER_assert(p*p + r*q == n*q); + __VERIFIER_assert(h * h * h - 12 * h * n * q + 16 * n * p * q - h * q * q - 4 * p * q * q + 12 * h * q * r - 16 * p * q * r == 0); + __VERIFIER_assert(h * h * n - 4 * h * n * p + 4 * (n * n) * q - n * q * q - h * h * r + 4 * h * p * r - 8 * n * q * r + q * q * r + 4 * q * r * r == 0); + __VERIFIER_assert(h * h * p - 4 * h * n * q + 4 * n * p * q - p * q * q + 4 * h * q * r - 4 * p * q * r == 0); + __VERIFIER_assert(p * p - n * q + q * r == 0); + + if (!(q != 1)) + break; + + q = q / 4; + h = p + q; + p = p / 2; + if (r >= h) { + p = p + q; + r = r - h; + } + } + __VERIFIER_assert(h*h*h - 12*h*n + 16*n*p + 12*h*r - 16*p*r - h - 4*p == 0); + __VERIFIER_assert(p*p - n + r == 0); + __VERIFIER_assert(h*h*p - 4*h*n + 4*n*p + 4*h*r - 4*p*r - p == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/dijkstra-u_unwindbound50.yml b/c/nla-digbench-scaling/dijkstra-u_unwindbound50.yml new file mode 100644 index 00000000000..cbb4e9ff784 --- /dev/null +++ b/c/nla-digbench-scaling/dijkstra-u_unwindbound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'dijkstra-u_unwindbound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/dijkstra-u_valuebound1.c b/c/nla-digbench-scaling/dijkstra-u_valuebound1.c new file mode 100644 index 00000000000..b93b88a0abe --- /dev/null +++ b/c/nla-digbench-scaling/dijkstra-u_valuebound1.c @@ -0,0 +1,61 @@ +/* Compute the floor of the square root, by Dijkstra */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "dijkstra-u.c", 5, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + unsigned int n, p, q, r, h; + + n = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(n>=0 && n<=1); + assume_abort_if_not(n < 4294967295 / 4); // Avoid non-terminating loop + + p = 0; + q = 1; + r = n; + h = 0; + while (1) { + if (!(q <= n)) + break; + + q = 4 * q; + } + //q == 4^n + + while (1) { + __VERIFIER_assert(r < 2 * p + q); + __VERIFIER_assert(p*p + r*q == n*q); + __VERIFIER_assert(h * h * h - 12 * h * n * q + 16 * n * p * q - h * q * q - 4 * p * q * q + 12 * h * q * r - 16 * p * q * r == 0); + __VERIFIER_assert(h * h * n - 4 * h * n * p + 4 * (n * n) * q - n * q * q - h * h * r + 4 * h * p * r - 8 * n * q * r + q * q * r + 4 * q * r * r == 0); + __VERIFIER_assert(h * h * p - 4 * h * n * q + 4 * n * p * q - p * q * q + 4 * h * q * r - 4 * p * q * r == 0); + __VERIFIER_assert(p * p - n * q + q * r == 0); + + if (!(q != 1)) + break; + + q = q / 4; + h = p + q; + p = p / 2; + if (r >= h) { + p = p + q; + r = r - h; + } + } + __VERIFIER_assert(h*h*h - 12*h*n + 16*n*p + 12*h*r - 16*p*r - h - 4*p == 0); + __VERIFIER_assert(p*p - n + r == 0); + __VERIFIER_assert(h*h*p - 4*h*n + 4*n*p + 4*h*r - 4*p*r - p == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/dijkstra-u_valuebound1.yml b/c/nla-digbench-scaling/dijkstra-u_valuebound1.yml new file mode 100644 index 00000000000..dd66bbeeb12 --- /dev/null +++ b/c/nla-digbench-scaling/dijkstra-u_valuebound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'dijkstra-u_valuebound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/dijkstra-u_valuebound10.c b/c/nla-digbench-scaling/dijkstra-u_valuebound10.c new file mode 100644 index 00000000000..096897166f9 --- /dev/null +++ b/c/nla-digbench-scaling/dijkstra-u_valuebound10.c @@ -0,0 +1,61 @@ +/* Compute the floor of the square root, by Dijkstra */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "dijkstra-u.c", 5, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + unsigned int n, p, q, r, h; + + n = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(n>=0 && n<=10); + assume_abort_if_not(n < 4294967295 / 4); // Avoid non-terminating loop + + p = 0; + q = 1; + r = n; + h = 0; + while (1) { + if (!(q <= n)) + break; + + q = 4 * q; + } + //q == 4^n + + while (1) { + __VERIFIER_assert(r < 2 * p + q); + __VERIFIER_assert(p*p + r*q == n*q); + __VERIFIER_assert(h * h * h - 12 * h * n * q + 16 * n * p * q - h * q * q - 4 * p * q * q + 12 * h * q * r - 16 * p * q * r == 0); + __VERIFIER_assert(h * h * n - 4 * h * n * p + 4 * (n * n) * q - n * q * q - h * h * r + 4 * h * p * r - 8 * n * q * r + q * q * r + 4 * q * r * r == 0); + __VERIFIER_assert(h * h * p - 4 * h * n * q + 4 * n * p * q - p * q * q + 4 * h * q * r - 4 * p * q * r == 0); + __VERIFIER_assert(p * p - n * q + q * r == 0); + + if (!(q != 1)) + break; + + q = q / 4; + h = p + q; + p = p / 2; + if (r >= h) { + p = p + q; + r = r - h; + } + } + __VERIFIER_assert(h*h*h - 12*h*n + 16*n*p + 12*h*r - 16*p*r - h - 4*p == 0); + __VERIFIER_assert(p*p - n + r == 0); + __VERIFIER_assert(h*h*p - 4*h*n + 4*n*p + 4*h*r - 4*p*r - p == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/dijkstra-u_valuebound10.yml b/c/nla-digbench-scaling/dijkstra-u_valuebound10.yml new file mode 100644 index 00000000000..3cb9f78acfa --- /dev/null +++ b/c/nla-digbench-scaling/dijkstra-u_valuebound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'dijkstra-u_valuebound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/dijkstra-u_valuebound100.c b/c/nla-digbench-scaling/dijkstra-u_valuebound100.c new file mode 100644 index 00000000000..dc21e3c3558 --- /dev/null +++ b/c/nla-digbench-scaling/dijkstra-u_valuebound100.c @@ -0,0 +1,61 @@ +/* Compute the floor of the square root, by Dijkstra */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "dijkstra-u.c", 5, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + unsigned int n, p, q, r, h; + + n = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(n>=0 && n<=100); + assume_abort_if_not(n < 4294967295 / 4); // Avoid non-terminating loop + + p = 0; + q = 1; + r = n; + h = 0; + while (1) { + if (!(q <= n)) + break; + + q = 4 * q; + } + //q == 4^n + + while (1) { + __VERIFIER_assert(r < 2 * p + q); + __VERIFIER_assert(p*p + r*q == n*q); + __VERIFIER_assert(h * h * h - 12 * h * n * q + 16 * n * p * q - h * q * q - 4 * p * q * q + 12 * h * q * r - 16 * p * q * r == 0); + __VERIFIER_assert(h * h * n - 4 * h * n * p + 4 * (n * n) * q - n * q * q - h * h * r + 4 * h * p * r - 8 * n * q * r + q * q * r + 4 * q * r * r == 0); + __VERIFIER_assert(h * h * p - 4 * h * n * q + 4 * n * p * q - p * q * q + 4 * h * q * r - 4 * p * q * r == 0); + __VERIFIER_assert(p * p - n * q + q * r == 0); + + if (!(q != 1)) + break; + + q = q / 4; + h = p + q; + p = p / 2; + if (r >= h) { + p = p + q; + r = r - h; + } + } + __VERIFIER_assert(h*h*h - 12*h*n + 16*n*p + 12*h*r - 16*p*r - h - 4*p == 0); + __VERIFIER_assert(p*p - n + r == 0); + __VERIFIER_assert(h*h*p - 4*h*n + 4*n*p + 4*h*r - 4*p*r - p == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/dijkstra-u_valuebound100.yml b/c/nla-digbench-scaling/dijkstra-u_valuebound100.yml new file mode 100644 index 00000000000..e4cdfe8def0 --- /dev/null +++ b/c/nla-digbench-scaling/dijkstra-u_valuebound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'dijkstra-u_valuebound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/dijkstra-u_valuebound2.c b/c/nla-digbench-scaling/dijkstra-u_valuebound2.c new file mode 100644 index 00000000000..f4ab54d64bf --- /dev/null +++ b/c/nla-digbench-scaling/dijkstra-u_valuebound2.c @@ -0,0 +1,61 @@ +/* Compute the floor of the square root, by Dijkstra */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "dijkstra-u.c", 5, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + unsigned int n, p, q, r, h; + + n = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(n>=0 && n<=2); + assume_abort_if_not(n < 4294967295 / 4); // Avoid non-terminating loop + + p = 0; + q = 1; + r = n; + h = 0; + while (1) { + if (!(q <= n)) + break; + + q = 4 * q; + } + //q == 4^n + + while (1) { + __VERIFIER_assert(r < 2 * p + q); + __VERIFIER_assert(p*p + r*q == n*q); + __VERIFIER_assert(h * h * h - 12 * h * n * q + 16 * n * p * q - h * q * q - 4 * p * q * q + 12 * h * q * r - 16 * p * q * r == 0); + __VERIFIER_assert(h * h * n - 4 * h * n * p + 4 * (n * n) * q - n * q * q - h * h * r + 4 * h * p * r - 8 * n * q * r + q * q * r + 4 * q * r * r == 0); + __VERIFIER_assert(h * h * p - 4 * h * n * q + 4 * n * p * q - p * q * q + 4 * h * q * r - 4 * p * q * r == 0); + __VERIFIER_assert(p * p - n * q + q * r == 0); + + if (!(q != 1)) + break; + + q = q / 4; + h = p + q; + p = p / 2; + if (r >= h) { + p = p + q; + r = r - h; + } + } + __VERIFIER_assert(h*h*h - 12*h*n + 16*n*p + 12*h*r - 16*p*r - h - 4*p == 0); + __VERIFIER_assert(p*p - n + r == 0); + __VERIFIER_assert(h*h*p - 4*h*n + 4*n*p + 4*h*r - 4*p*r - p == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/dijkstra-u_valuebound2.yml b/c/nla-digbench-scaling/dijkstra-u_valuebound2.yml new file mode 100644 index 00000000000..4657cfef8fb --- /dev/null +++ b/c/nla-digbench-scaling/dijkstra-u_valuebound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'dijkstra-u_valuebound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/dijkstra-u_valuebound20.c b/c/nla-digbench-scaling/dijkstra-u_valuebound20.c new file mode 100644 index 00000000000..263adf689b8 --- /dev/null +++ b/c/nla-digbench-scaling/dijkstra-u_valuebound20.c @@ -0,0 +1,61 @@ +/* Compute the floor of the square root, by Dijkstra */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "dijkstra-u.c", 5, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + unsigned int n, p, q, r, h; + + n = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(n>=0 && n<=20); + assume_abort_if_not(n < 4294967295 / 4); // Avoid non-terminating loop + + p = 0; + q = 1; + r = n; + h = 0; + while (1) { + if (!(q <= n)) + break; + + q = 4 * q; + } + //q == 4^n + + while (1) { + __VERIFIER_assert(r < 2 * p + q); + __VERIFIER_assert(p*p + r*q == n*q); + __VERIFIER_assert(h * h * h - 12 * h * n * q + 16 * n * p * q - h * q * q - 4 * p * q * q + 12 * h * q * r - 16 * p * q * r == 0); + __VERIFIER_assert(h * h * n - 4 * h * n * p + 4 * (n * n) * q - n * q * q - h * h * r + 4 * h * p * r - 8 * n * q * r + q * q * r + 4 * q * r * r == 0); + __VERIFIER_assert(h * h * p - 4 * h * n * q + 4 * n * p * q - p * q * q + 4 * h * q * r - 4 * p * q * r == 0); + __VERIFIER_assert(p * p - n * q + q * r == 0); + + if (!(q != 1)) + break; + + q = q / 4; + h = p + q; + p = p / 2; + if (r >= h) { + p = p + q; + r = r - h; + } + } + __VERIFIER_assert(h*h*h - 12*h*n + 16*n*p + 12*h*r - 16*p*r - h - 4*p == 0); + __VERIFIER_assert(p*p - n + r == 0); + __VERIFIER_assert(h*h*p - 4*h*n + 4*n*p + 4*h*r - 4*p*r - p == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/dijkstra-u_valuebound20.yml b/c/nla-digbench-scaling/dijkstra-u_valuebound20.yml new file mode 100644 index 00000000000..a670d255596 --- /dev/null +++ b/c/nla-digbench-scaling/dijkstra-u_valuebound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'dijkstra-u_valuebound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/dijkstra-u_valuebound5.c b/c/nla-digbench-scaling/dijkstra-u_valuebound5.c new file mode 100644 index 00000000000..f6078ce7832 --- /dev/null +++ b/c/nla-digbench-scaling/dijkstra-u_valuebound5.c @@ -0,0 +1,61 @@ +/* Compute the floor of the square root, by Dijkstra */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "dijkstra-u.c", 5, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + unsigned int n, p, q, r, h; + + n = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(n>=0 && n<=5); + assume_abort_if_not(n < 4294967295 / 4); // Avoid non-terminating loop + + p = 0; + q = 1; + r = n; + h = 0; + while (1) { + if (!(q <= n)) + break; + + q = 4 * q; + } + //q == 4^n + + while (1) { + __VERIFIER_assert(r < 2 * p + q); + __VERIFIER_assert(p*p + r*q == n*q); + __VERIFIER_assert(h * h * h - 12 * h * n * q + 16 * n * p * q - h * q * q - 4 * p * q * q + 12 * h * q * r - 16 * p * q * r == 0); + __VERIFIER_assert(h * h * n - 4 * h * n * p + 4 * (n * n) * q - n * q * q - h * h * r + 4 * h * p * r - 8 * n * q * r + q * q * r + 4 * q * r * r == 0); + __VERIFIER_assert(h * h * p - 4 * h * n * q + 4 * n * p * q - p * q * q + 4 * h * q * r - 4 * p * q * r == 0); + __VERIFIER_assert(p * p - n * q + q * r == 0); + + if (!(q != 1)) + break; + + q = q / 4; + h = p + q; + p = p / 2; + if (r >= h) { + p = p + q; + r = r - h; + } + } + __VERIFIER_assert(h*h*h - 12*h*n + 16*n*p + 12*h*r - 16*p*r - h - 4*p == 0); + __VERIFIER_assert(p*p - n + r == 0); + __VERIFIER_assert(h*h*p - 4*h*n + 4*n*p + 4*h*r - 4*p*r - p == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/dijkstra-u_valuebound5.yml b/c/nla-digbench-scaling/dijkstra-u_valuebound5.yml new file mode 100644 index 00000000000..61af2b096e2 --- /dev/null +++ b/c/nla-digbench-scaling/dijkstra-u_valuebound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'dijkstra-u_valuebound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/dijkstra-u_valuebound50.c b/c/nla-digbench-scaling/dijkstra-u_valuebound50.c new file mode 100644 index 00000000000..bcb60f753ba --- /dev/null +++ b/c/nla-digbench-scaling/dijkstra-u_valuebound50.c @@ -0,0 +1,61 @@ +/* Compute the floor of the square root, by Dijkstra */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "dijkstra-u.c", 5, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + unsigned int n, p, q, r, h; + + n = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(n>=0 && n<=50); + assume_abort_if_not(n < 4294967295 / 4); // Avoid non-terminating loop + + p = 0; + q = 1; + r = n; + h = 0; + while (1) { + if (!(q <= n)) + break; + + q = 4 * q; + } + //q == 4^n + + while (1) { + __VERIFIER_assert(r < 2 * p + q); + __VERIFIER_assert(p*p + r*q == n*q); + __VERIFIER_assert(h * h * h - 12 * h * n * q + 16 * n * p * q - h * q * q - 4 * p * q * q + 12 * h * q * r - 16 * p * q * r == 0); + __VERIFIER_assert(h * h * n - 4 * h * n * p + 4 * (n * n) * q - n * q * q - h * h * r + 4 * h * p * r - 8 * n * q * r + q * q * r + 4 * q * r * r == 0); + __VERIFIER_assert(h * h * p - 4 * h * n * q + 4 * n * p * q - p * q * q + 4 * h * q * r - 4 * p * q * r == 0); + __VERIFIER_assert(p * p - n * q + q * r == 0); + + if (!(q != 1)) + break; + + q = q / 4; + h = p + q; + p = p / 2; + if (r >= h) { + p = p + q; + r = r - h; + } + } + __VERIFIER_assert(h*h*h - 12*h*n + 16*n*p + 12*h*r - 16*p*r - h - 4*p == 0); + __VERIFIER_assert(p*p - n + r == 0); + __VERIFIER_assert(h*h*p - 4*h*n + 4*n*p + 4*h*r - 4*p*r - p == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/dijkstra-u_valuebound50.yml b/c/nla-digbench-scaling/dijkstra-u_valuebound50.yml new file mode 100644 index 00000000000..726477fc64a --- /dev/null +++ b/c/nla-digbench-scaling/dijkstra-u_valuebound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'dijkstra-u_valuebound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/dijkstra_unwindbound1.c b/c/nla-digbench-scaling/dijkstra_unwindbound1.c deleted file mode 100644 index c26ef43f3a1..00000000000 --- a/c/nla-digbench-scaling/dijkstra_unwindbound1.c +++ /dev/null @@ -1,59 +0,0 @@ -/* Compute the floor of the square root, by Dijkstra */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int n, p, q, r, h; - - n = __VERIFIER_nondet_int(); - - p = 0; - q = 1; - r = n; - h = 0; - while (counter++<1) { - if (!(q <= n)) - break; - - q = 4 * q; - } - //q == 4^n - - while (counter++<1) { - __VERIFIER_assert(r < 2 * p + q); - __VERIFIER_assert(p*p + r*q == n*q); - __VERIFIER_assert(h * h * h - 12 * h * n * q + 16 * n * p * q - h * q * q - 4 * p * q * q + 12 * h * q * r - 16 * p * q * r == 0); - __VERIFIER_assert(h * h * n - 4 * h * n * p + 4 * (n * n) * q - n * q * q - h * h * r + 4 * h * p * r - 8 * n * q * r + q * q * r + 4 * q * r * r == 0); - __VERIFIER_assert(h * h * p - 4 * h * n * q + 4 * n * p * q - p * q * q + 4 * h * q * r - 4 * p * q * r == 0); - __VERIFIER_assert(p * p - n * q + q * r == 0); - - if (!(q != 1)) - break; - - q = q / 4; - h = p + q; - p = p / 2; - if (r >= h) { - p = p + q; - r = r - h; - } - } - __VERIFIER_assert(h*h*h - 12*h*n + 16*n*p + 12*h*r - 16*p*r - h - 4*p == 0); - __VERIFIER_assert(p*p - n + r == 0); - __VERIFIER_assert(h*h*p - 4*h*n + 4*n*p + 4*h*r - 4*p*r - p == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/dijkstra_unwindbound1.yml b/c/nla-digbench-scaling/dijkstra_unwindbound1.yml deleted file mode 100644 index b2cb4607bcc..00000000000 --- a/c/nla-digbench-scaling/dijkstra_unwindbound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'dijkstra_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/dijkstra_unwindbound10.c b/c/nla-digbench-scaling/dijkstra_unwindbound10.c deleted file mode 100644 index cd81524c219..00000000000 --- a/c/nla-digbench-scaling/dijkstra_unwindbound10.c +++ /dev/null @@ -1,59 +0,0 @@ -/* Compute the floor of the square root, by Dijkstra */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int n, p, q, r, h; - - n = __VERIFIER_nondet_int(); - - p = 0; - q = 1; - r = n; - h = 0; - while (counter++<10) { - if (!(q <= n)) - break; - - q = 4 * q; - } - //q == 4^n - - while (counter++<10) { - __VERIFIER_assert(r < 2 * p + q); - __VERIFIER_assert(p*p + r*q == n*q); - __VERIFIER_assert(h * h * h - 12 * h * n * q + 16 * n * p * q - h * q * q - 4 * p * q * q + 12 * h * q * r - 16 * p * q * r == 0); - __VERIFIER_assert(h * h * n - 4 * h * n * p + 4 * (n * n) * q - n * q * q - h * h * r + 4 * h * p * r - 8 * n * q * r + q * q * r + 4 * q * r * r == 0); - __VERIFIER_assert(h * h * p - 4 * h * n * q + 4 * n * p * q - p * q * q + 4 * h * q * r - 4 * p * q * r == 0); - __VERIFIER_assert(p * p - n * q + q * r == 0); - - if (!(q != 1)) - break; - - q = q / 4; - h = p + q; - p = p / 2; - if (r >= h) { - p = p + q; - r = r - h; - } - } - __VERIFIER_assert(h*h*h - 12*h*n + 16*n*p + 12*h*r - 16*p*r - h - 4*p == 0); - __VERIFIER_assert(p*p - n + r == 0); - __VERIFIER_assert(h*h*p - 4*h*n + 4*n*p + 4*h*r - 4*p*r - p == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/dijkstra_unwindbound10.yml b/c/nla-digbench-scaling/dijkstra_unwindbound10.yml deleted file mode 100644 index 1c96f466a86..00000000000 --- a/c/nla-digbench-scaling/dijkstra_unwindbound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'dijkstra_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/dijkstra_unwindbound100.c b/c/nla-digbench-scaling/dijkstra_unwindbound100.c deleted file mode 100644 index 24f14e5162a..00000000000 --- a/c/nla-digbench-scaling/dijkstra_unwindbound100.c +++ /dev/null @@ -1,59 +0,0 @@ -/* Compute the floor of the square root, by Dijkstra */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int n, p, q, r, h; - - n = __VERIFIER_nondet_int(); - - p = 0; - q = 1; - r = n; - h = 0; - while (counter++<100) { - if (!(q <= n)) - break; - - q = 4 * q; - } - //q == 4^n - - while (counter++<100) { - __VERIFIER_assert(r < 2 * p + q); - __VERIFIER_assert(p*p + r*q == n*q); - __VERIFIER_assert(h * h * h - 12 * h * n * q + 16 * n * p * q - h * q * q - 4 * p * q * q + 12 * h * q * r - 16 * p * q * r == 0); - __VERIFIER_assert(h * h * n - 4 * h * n * p + 4 * (n * n) * q - n * q * q - h * h * r + 4 * h * p * r - 8 * n * q * r + q * q * r + 4 * q * r * r == 0); - __VERIFIER_assert(h * h * p - 4 * h * n * q + 4 * n * p * q - p * q * q + 4 * h * q * r - 4 * p * q * r == 0); - __VERIFIER_assert(p * p - n * q + q * r == 0); - - if (!(q != 1)) - break; - - q = q / 4; - h = p + q; - p = p / 2; - if (r >= h) { - p = p + q; - r = r - h; - } - } - __VERIFIER_assert(h*h*h - 12*h*n + 16*n*p + 12*h*r - 16*p*r - h - 4*p == 0); - __VERIFIER_assert(p*p - n + r == 0); - __VERIFIER_assert(h*h*p - 4*h*n + 4*n*p + 4*h*r - 4*p*r - p == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/dijkstra_unwindbound100.yml b/c/nla-digbench-scaling/dijkstra_unwindbound100.yml deleted file mode 100644 index 18f60455009..00000000000 --- a/c/nla-digbench-scaling/dijkstra_unwindbound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'dijkstra_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/dijkstra_unwindbound2.c b/c/nla-digbench-scaling/dijkstra_unwindbound2.c deleted file mode 100644 index f6a09d31bd5..00000000000 --- a/c/nla-digbench-scaling/dijkstra_unwindbound2.c +++ /dev/null @@ -1,59 +0,0 @@ -/* Compute the floor of the square root, by Dijkstra */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int n, p, q, r, h; - - n = __VERIFIER_nondet_int(); - - p = 0; - q = 1; - r = n; - h = 0; - while (counter++<2) { - if (!(q <= n)) - break; - - q = 4 * q; - } - //q == 4^n - - while (counter++<2) { - __VERIFIER_assert(r < 2 * p + q); - __VERIFIER_assert(p*p + r*q == n*q); - __VERIFIER_assert(h * h * h - 12 * h * n * q + 16 * n * p * q - h * q * q - 4 * p * q * q + 12 * h * q * r - 16 * p * q * r == 0); - __VERIFIER_assert(h * h * n - 4 * h * n * p + 4 * (n * n) * q - n * q * q - h * h * r + 4 * h * p * r - 8 * n * q * r + q * q * r + 4 * q * r * r == 0); - __VERIFIER_assert(h * h * p - 4 * h * n * q + 4 * n * p * q - p * q * q + 4 * h * q * r - 4 * p * q * r == 0); - __VERIFIER_assert(p * p - n * q + q * r == 0); - - if (!(q != 1)) - break; - - q = q / 4; - h = p + q; - p = p / 2; - if (r >= h) { - p = p + q; - r = r - h; - } - } - __VERIFIER_assert(h*h*h - 12*h*n + 16*n*p + 12*h*r - 16*p*r - h - 4*p == 0); - __VERIFIER_assert(p*p - n + r == 0); - __VERIFIER_assert(h*h*p - 4*h*n + 4*n*p + 4*h*r - 4*p*r - p == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/dijkstra_unwindbound2.yml b/c/nla-digbench-scaling/dijkstra_unwindbound2.yml deleted file mode 100644 index c88e2f5a9a0..00000000000 --- a/c/nla-digbench-scaling/dijkstra_unwindbound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'dijkstra_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/dijkstra_unwindbound20.c b/c/nla-digbench-scaling/dijkstra_unwindbound20.c deleted file mode 100644 index d2d36356f74..00000000000 --- a/c/nla-digbench-scaling/dijkstra_unwindbound20.c +++ /dev/null @@ -1,59 +0,0 @@ -/* Compute the floor of the square root, by Dijkstra */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int n, p, q, r, h; - - n = __VERIFIER_nondet_int(); - - p = 0; - q = 1; - r = n; - h = 0; - while (counter++<20) { - if (!(q <= n)) - break; - - q = 4 * q; - } - //q == 4^n - - while (counter++<20) { - __VERIFIER_assert(r < 2 * p + q); - __VERIFIER_assert(p*p + r*q == n*q); - __VERIFIER_assert(h * h * h - 12 * h * n * q + 16 * n * p * q - h * q * q - 4 * p * q * q + 12 * h * q * r - 16 * p * q * r == 0); - __VERIFIER_assert(h * h * n - 4 * h * n * p + 4 * (n * n) * q - n * q * q - h * h * r + 4 * h * p * r - 8 * n * q * r + q * q * r + 4 * q * r * r == 0); - __VERIFIER_assert(h * h * p - 4 * h * n * q + 4 * n * p * q - p * q * q + 4 * h * q * r - 4 * p * q * r == 0); - __VERIFIER_assert(p * p - n * q + q * r == 0); - - if (!(q != 1)) - break; - - q = q / 4; - h = p + q; - p = p / 2; - if (r >= h) { - p = p + q; - r = r - h; - } - } - __VERIFIER_assert(h*h*h - 12*h*n + 16*n*p + 12*h*r - 16*p*r - h - 4*p == 0); - __VERIFIER_assert(p*p - n + r == 0); - __VERIFIER_assert(h*h*p - 4*h*n + 4*n*p + 4*h*r - 4*p*r - p == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/dijkstra_unwindbound20.yml b/c/nla-digbench-scaling/dijkstra_unwindbound20.yml deleted file mode 100644 index e125fb43024..00000000000 --- a/c/nla-digbench-scaling/dijkstra_unwindbound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'dijkstra_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/dijkstra_unwindbound5.c b/c/nla-digbench-scaling/dijkstra_unwindbound5.c deleted file mode 100644 index beeedb3d3c1..00000000000 --- a/c/nla-digbench-scaling/dijkstra_unwindbound5.c +++ /dev/null @@ -1,59 +0,0 @@ -/* Compute the floor of the square root, by Dijkstra */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int n, p, q, r, h; - - n = __VERIFIER_nondet_int(); - - p = 0; - q = 1; - r = n; - h = 0; - while (counter++<5) { - if (!(q <= n)) - break; - - q = 4 * q; - } - //q == 4^n - - while (counter++<5) { - __VERIFIER_assert(r < 2 * p + q); - __VERIFIER_assert(p*p + r*q == n*q); - __VERIFIER_assert(h * h * h - 12 * h * n * q + 16 * n * p * q - h * q * q - 4 * p * q * q + 12 * h * q * r - 16 * p * q * r == 0); - __VERIFIER_assert(h * h * n - 4 * h * n * p + 4 * (n * n) * q - n * q * q - h * h * r + 4 * h * p * r - 8 * n * q * r + q * q * r + 4 * q * r * r == 0); - __VERIFIER_assert(h * h * p - 4 * h * n * q + 4 * n * p * q - p * q * q + 4 * h * q * r - 4 * p * q * r == 0); - __VERIFIER_assert(p * p - n * q + q * r == 0); - - if (!(q != 1)) - break; - - q = q / 4; - h = p + q; - p = p / 2; - if (r >= h) { - p = p + q; - r = r - h; - } - } - __VERIFIER_assert(h*h*h - 12*h*n + 16*n*p + 12*h*r - 16*p*r - h - 4*p == 0); - __VERIFIER_assert(p*p - n + r == 0); - __VERIFIER_assert(h*h*p - 4*h*n + 4*n*p + 4*h*r - 4*p*r - p == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/dijkstra_unwindbound5.yml b/c/nla-digbench-scaling/dijkstra_unwindbound5.yml deleted file mode 100644 index 64a298887cf..00000000000 --- a/c/nla-digbench-scaling/dijkstra_unwindbound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'dijkstra_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/dijkstra_unwindbound50.c b/c/nla-digbench-scaling/dijkstra_unwindbound50.c deleted file mode 100644 index d79e1fb9874..00000000000 --- a/c/nla-digbench-scaling/dijkstra_unwindbound50.c +++ /dev/null @@ -1,59 +0,0 @@ -/* Compute the floor of the square root, by Dijkstra */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int n, p, q, r, h; - - n = __VERIFIER_nondet_int(); - - p = 0; - q = 1; - r = n; - h = 0; - while (counter++<50) { - if (!(q <= n)) - break; - - q = 4 * q; - } - //q == 4^n - - while (counter++<50) { - __VERIFIER_assert(r < 2 * p + q); - __VERIFIER_assert(p*p + r*q == n*q); - __VERIFIER_assert(h * h * h - 12 * h * n * q + 16 * n * p * q - h * q * q - 4 * p * q * q + 12 * h * q * r - 16 * p * q * r == 0); - __VERIFIER_assert(h * h * n - 4 * h * n * p + 4 * (n * n) * q - n * q * q - h * h * r + 4 * h * p * r - 8 * n * q * r + q * q * r + 4 * q * r * r == 0); - __VERIFIER_assert(h * h * p - 4 * h * n * q + 4 * n * p * q - p * q * q + 4 * h * q * r - 4 * p * q * r == 0); - __VERIFIER_assert(p * p - n * q + q * r == 0); - - if (!(q != 1)) - break; - - q = q / 4; - h = p + q; - p = p / 2; - if (r >= h) { - p = p + q; - r = r - h; - } - } - __VERIFIER_assert(h*h*h - 12*h*n + 16*n*p + 12*h*r - 16*p*r - h - 4*p == 0); - __VERIFIER_assert(p*p - n + r == 0); - __VERIFIER_assert(h*h*p - 4*h*n + 4*n*p + 4*h*r - 4*p*r - p == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/dijkstra_unwindbound50.yml b/c/nla-digbench-scaling/dijkstra_unwindbound50.yml deleted file mode 100644 index 0687aff4f46..00000000000 --- a/c/nla-digbench-scaling/dijkstra_unwindbound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'dijkstra_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/dijkstra_valuebound1.c b/c/nla-digbench-scaling/dijkstra_valuebound1.c deleted file mode 100644 index 6102c9b6389..00000000000 --- a/c/nla-digbench-scaling/dijkstra_valuebound1.c +++ /dev/null @@ -1,59 +0,0 @@ -/* Compute the floor of the square root, by Dijkstra */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int n, p, q, r, h; - - n = __VERIFIER_nondet_int(); - assume_abort_if_not(n>0 && n<=1); - - p = 0; - q = 1; - r = n; - h = 0; - while (1) { - if (!(q <= n)) - break; - - q = 4 * q; - } - //q == 4^n - - while (1) { - __VERIFIER_assert(r < 2 * p + q); - __VERIFIER_assert(p*p + r*q == n*q); - __VERIFIER_assert(h * h * h - 12 * h * n * q + 16 * n * p * q - h * q * q - 4 * p * q * q + 12 * h * q * r - 16 * p * q * r == 0); - __VERIFIER_assert(h * h * n - 4 * h * n * p + 4 * (n * n) * q - n * q * q - h * h * r + 4 * h * p * r - 8 * n * q * r + q * q * r + 4 * q * r * r == 0); - __VERIFIER_assert(h * h * p - 4 * h * n * q + 4 * n * p * q - p * q * q + 4 * h * q * r - 4 * p * q * r == 0); - __VERIFIER_assert(p * p - n * q + q * r == 0); - - if (!(q != 1)) - break; - - q = q / 4; - h = p + q; - p = p / 2; - if (r >= h) { - p = p + q; - r = r - h; - } - } - __VERIFIER_assert(h*h*h - 12*h*n + 16*n*p + 12*h*r - 16*p*r - h - 4*p == 0); - __VERIFIER_assert(p*p - n + r == 0); - __VERIFIER_assert(h*h*p - 4*h*n + 4*n*p + 4*h*r - 4*p*r - p == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/dijkstra_valuebound1.yml b/c/nla-digbench-scaling/dijkstra_valuebound1.yml deleted file mode 100644 index cf405795a30..00000000000 --- a/c/nla-digbench-scaling/dijkstra_valuebound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'dijkstra_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/dijkstra_valuebound10.c b/c/nla-digbench-scaling/dijkstra_valuebound10.c deleted file mode 100644 index c31d94f0d85..00000000000 --- a/c/nla-digbench-scaling/dijkstra_valuebound10.c +++ /dev/null @@ -1,59 +0,0 @@ -/* Compute the floor of the square root, by Dijkstra */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int n, p, q, r, h; - - n = __VERIFIER_nondet_int(); - assume_abort_if_not(n>0 && n<=10); - - p = 0; - q = 1; - r = n; - h = 0; - while (1) { - if (!(q <= n)) - break; - - q = 4 * q; - } - //q == 4^n - - while (1) { - __VERIFIER_assert(r < 2 * p + q); - __VERIFIER_assert(p*p + r*q == n*q); - __VERIFIER_assert(h * h * h - 12 * h * n * q + 16 * n * p * q - h * q * q - 4 * p * q * q + 12 * h * q * r - 16 * p * q * r == 0); - __VERIFIER_assert(h * h * n - 4 * h * n * p + 4 * (n * n) * q - n * q * q - h * h * r + 4 * h * p * r - 8 * n * q * r + q * q * r + 4 * q * r * r == 0); - __VERIFIER_assert(h * h * p - 4 * h * n * q + 4 * n * p * q - p * q * q + 4 * h * q * r - 4 * p * q * r == 0); - __VERIFIER_assert(p * p - n * q + q * r == 0); - - if (!(q != 1)) - break; - - q = q / 4; - h = p + q; - p = p / 2; - if (r >= h) { - p = p + q; - r = r - h; - } - } - __VERIFIER_assert(h*h*h - 12*h*n + 16*n*p + 12*h*r - 16*p*r - h - 4*p == 0); - __VERIFIER_assert(p*p - n + r == 0); - __VERIFIER_assert(h*h*p - 4*h*n + 4*n*p + 4*h*r - 4*p*r - p == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/dijkstra_valuebound10.yml b/c/nla-digbench-scaling/dijkstra_valuebound10.yml deleted file mode 100644 index a5f3c2ef56c..00000000000 --- a/c/nla-digbench-scaling/dijkstra_valuebound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'dijkstra_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/dijkstra_valuebound100.c b/c/nla-digbench-scaling/dijkstra_valuebound100.c deleted file mode 100644 index 2af33b573a5..00000000000 --- a/c/nla-digbench-scaling/dijkstra_valuebound100.c +++ /dev/null @@ -1,59 +0,0 @@ -/* Compute the floor of the square root, by Dijkstra */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int n, p, q, r, h; - - n = __VERIFIER_nondet_int(); - assume_abort_if_not(n>0 && n<=100); - - p = 0; - q = 1; - r = n; - h = 0; - while (1) { - if (!(q <= n)) - break; - - q = 4 * q; - } - //q == 4^n - - while (1) { - __VERIFIER_assert(r < 2 * p + q); - __VERIFIER_assert(p*p + r*q == n*q); - __VERIFIER_assert(h * h * h - 12 * h * n * q + 16 * n * p * q - h * q * q - 4 * p * q * q + 12 * h * q * r - 16 * p * q * r == 0); - __VERIFIER_assert(h * h * n - 4 * h * n * p + 4 * (n * n) * q - n * q * q - h * h * r + 4 * h * p * r - 8 * n * q * r + q * q * r + 4 * q * r * r == 0); - __VERIFIER_assert(h * h * p - 4 * h * n * q + 4 * n * p * q - p * q * q + 4 * h * q * r - 4 * p * q * r == 0); - __VERIFIER_assert(p * p - n * q + q * r == 0); - - if (!(q != 1)) - break; - - q = q / 4; - h = p + q; - p = p / 2; - if (r >= h) { - p = p + q; - r = r - h; - } - } - __VERIFIER_assert(h*h*h - 12*h*n + 16*n*p + 12*h*r - 16*p*r - h - 4*p == 0); - __VERIFIER_assert(p*p - n + r == 0); - __VERIFIER_assert(h*h*p - 4*h*n + 4*n*p + 4*h*r - 4*p*r - p == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/dijkstra_valuebound100.yml b/c/nla-digbench-scaling/dijkstra_valuebound100.yml deleted file mode 100644 index df3495af4e4..00000000000 --- a/c/nla-digbench-scaling/dijkstra_valuebound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'dijkstra_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/dijkstra_valuebound2.c b/c/nla-digbench-scaling/dijkstra_valuebound2.c deleted file mode 100644 index c5773930aac..00000000000 --- a/c/nla-digbench-scaling/dijkstra_valuebound2.c +++ /dev/null @@ -1,59 +0,0 @@ -/* Compute the floor of the square root, by Dijkstra */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int n, p, q, r, h; - - n = __VERIFIER_nondet_int(); - assume_abort_if_not(n>0 && n<=2); - - p = 0; - q = 1; - r = n; - h = 0; - while (1) { - if (!(q <= n)) - break; - - q = 4 * q; - } - //q == 4^n - - while (1) { - __VERIFIER_assert(r < 2 * p + q); - __VERIFIER_assert(p*p + r*q == n*q); - __VERIFIER_assert(h * h * h - 12 * h * n * q + 16 * n * p * q - h * q * q - 4 * p * q * q + 12 * h * q * r - 16 * p * q * r == 0); - __VERIFIER_assert(h * h * n - 4 * h * n * p + 4 * (n * n) * q - n * q * q - h * h * r + 4 * h * p * r - 8 * n * q * r + q * q * r + 4 * q * r * r == 0); - __VERIFIER_assert(h * h * p - 4 * h * n * q + 4 * n * p * q - p * q * q + 4 * h * q * r - 4 * p * q * r == 0); - __VERIFIER_assert(p * p - n * q + q * r == 0); - - if (!(q != 1)) - break; - - q = q / 4; - h = p + q; - p = p / 2; - if (r >= h) { - p = p + q; - r = r - h; - } - } - __VERIFIER_assert(h*h*h - 12*h*n + 16*n*p + 12*h*r - 16*p*r - h - 4*p == 0); - __VERIFIER_assert(p*p - n + r == 0); - __VERIFIER_assert(h*h*p - 4*h*n + 4*n*p + 4*h*r - 4*p*r - p == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/dijkstra_valuebound2.yml b/c/nla-digbench-scaling/dijkstra_valuebound2.yml deleted file mode 100644 index 20ff1f9feed..00000000000 --- a/c/nla-digbench-scaling/dijkstra_valuebound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'dijkstra_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/dijkstra_valuebound20.c b/c/nla-digbench-scaling/dijkstra_valuebound20.c deleted file mode 100644 index 00ca91c64b5..00000000000 --- a/c/nla-digbench-scaling/dijkstra_valuebound20.c +++ /dev/null @@ -1,59 +0,0 @@ -/* Compute the floor of the square root, by Dijkstra */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int n, p, q, r, h; - - n = __VERIFIER_nondet_int(); - assume_abort_if_not(n>0 && n<=20); - - p = 0; - q = 1; - r = n; - h = 0; - while (1) { - if (!(q <= n)) - break; - - q = 4 * q; - } - //q == 4^n - - while (1) { - __VERIFIER_assert(r < 2 * p + q); - __VERIFIER_assert(p*p + r*q == n*q); - __VERIFIER_assert(h * h * h - 12 * h * n * q + 16 * n * p * q - h * q * q - 4 * p * q * q + 12 * h * q * r - 16 * p * q * r == 0); - __VERIFIER_assert(h * h * n - 4 * h * n * p + 4 * (n * n) * q - n * q * q - h * h * r + 4 * h * p * r - 8 * n * q * r + q * q * r + 4 * q * r * r == 0); - __VERIFIER_assert(h * h * p - 4 * h * n * q + 4 * n * p * q - p * q * q + 4 * h * q * r - 4 * p * q * r == 0); - __VERIFIER_assert(p * p - n * q + q * r == 0); - - if (!(q != 1)) - break; - - q = q / 4; - h = p + q; - p = p / 2; - if (r >= h) { - p = p + q; - r = r - h; - } - } - __VERIFIER_assert(h*h*h - 12*h*n + 16*n*p + 12*h*r - 16*p*r - h - 4*p == 0); - __VERIFIER_assert(p*p - n + r == 0); - __VERIFIER_assert(h*h*p - 4*h*n + 4*n*p + 4*h*r - 4*p*r - p == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/dijkstra_valuebound20.yml b/c/nla-digbench-scaling/dijkstra_valuebound20.yml deleted file mode 100644 index 8c2a42c1799..00000000000 --- a/c/nla-digbench-scaling/dijkstra_valuebound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'dijkstra_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/dijkstra_valuebound5.c b/c/nla-digbench-scaling/dijkstra_valuebound5.c deleted file mode 100644 index 8db6842b78b..00000000000 --- a/c/nla-digbench-scaling/dijkstra_valuebound5.c +++ /dev/null @@ -1,59 +0,0 @@ -/* Compute the floor of the square root, by Dijkstra */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int n, p, q, r, h; - - n = __VERIFIER_nondet_int(); - assume_abort_if_not(n>0 && n<=5); - - p = 0; - q = 1; - r = n; - h = 0; - while (1) { - if (!(q <= n)) - break; - - q = 4 * q; - } - //q == 4^n - - while (1) { - __VERIFIER_assert(r < 2 * p + q); - __VERIFIER_assert(p*p + r*q == n*q); - __VERIFIER_assert(h * h * h - 12 * h * n * q + 16 * n * p * q - h * q * q - 4 * p * q * q + 12 * h * q * r - 16 * p * q * r == 0); - __VERIFIER_assert(h * h * n - 4 * h * n * p + 4 * (n * n) * q - n * q * q - h * h * r + 4 * h * p * r - 8 * n * q * r + q * q * r + 4 * q * r * r == 0); - __VERIFIER_assert(h * h * p - 4 * h * n * q + 4 * n * p * q - p * q * q + 4 * h * q * r - 4 * p * q * r == 0); - __VERIFIER_assert(p * p - n * q + q * r == 0); - - if (!(q != 1)) - break; - - q = q / 4; - h = p + q; - p = p / 2; - if (r >= h) { - p = p + q; - r = r - h; - } - } - __VERIFIER_assert(h*h*h - 12*h*n + 16*n*p + 12*h*r - 16*p*r - h - 4*p == 0); - __VERIFIER_assert(p*p - n + r == 0); - __VERIFIER_assert(h*h*p - 4*h*n + 4*n*p + 4*h*r - 4*p*r - p == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/dijkstra_valuebound5.yml b/c/nla-digbench-scaling/dijkstra_valuebound5.yml deleted file mode 100644 index 1d474ff7964..00000000000 --- a/c/nla-digbench-scaling/dijkstra_valuebound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'dijkstra_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/dijkstra_valuebound50.c b/c/nla-digbench-scaling/dijkstra_valuebound50.c deleted file mode 100644 index ec33ee38445..00000000000 --- a/c/nla-digbench-scaling/dijkstra_valuebound50.c +++ /dev/null @@ -1,59 +0,0 @@ -/* Compute the floor of the square root, by Dijkstra */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int n, p, q, r, h; - - n = __VERIFIER_nondet_int(); - assume_abort_if_not(n>0 && n<=50); - - p = 0; - q = 1; - r = n; - h = 0; - while (1) { - if (!(q <= n)) - break; - - q = 4 * q; - } - //q == 4^n - - while (1) { - __VERIFIER_assert(r < 2 * p + q); - __VERIFIER_assert(p*p + r*q == n*q); - __VERIFIER_assert(h * h * h - 12 * h * n * q + 16 * n * p * q - h * q * q - 4 * p * q * q + 12 * h * q * r - 16 * p * q * r == 0); - __VERIFIER_assert(h * h * n - 4 * h * n * p + 4 * (n * n) * q - n * q * q - h * h * r + 4 * h * p * r - 8 * n * q * r + q * q * r + 4 * q * r * r == 0); - __VERIFIER_assert(h * h * p - 4 * h * n * q + 4 * n * p * q - p * q * q + 4 * h * q * r - 4 * p * q * r == 0); - __VERIFIER_assert(p * p - n * q + q * r == 0); - - if (!(q != 1)) - break; - - q = q / 4; - h = p + q; - p = p / 2; - if (r >= h) { - p = p + q; - r = r - h; - } - } - __VERIFIER_assert(h*h*h - 12*h*n + 16*n*p + 12*h*r - 16*p*r - h - 4*p == 0); - __VERIFIER_assert(p*p - n + r == 0); - __VERIFIER_assert(h*h*p - 4*h*n + 4*n*p + 4*h*r - 4*p*r - p == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/dijkstra_valuebound50.yml b/c/nla-digbench-scaling/dijkstra_valuebound50.yml deleted file mode 100644 index 6b508d1ebe0..00000000000 --- a/c/nla-digbench-scaling/dijkstra_valuebound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'dijkstra_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/divbin2_unwindbound1.c b/c/nla-digbench-scaling/divbin2_unwindbound1.c index 8052847ed2e..6f442ee386c 100644 --- a/c/nla-digbench-scaling/divbin2_unwindbound1.c +++ b/c/nla-digbench-scaling/divbin2_unwindbound1.c @@ -6,7 +6,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/divbin2_unwindbound1.i b/c/nla-digbench-scaling/divbin2_unwindbound1.i index e221832b3a4..987ab9a89a9 100644 --- a/c/nla-digbench-scaling/divbin2_unwindbound1.i +++ b/c/nla-digbench-scaling/divbin2_unwindbound1.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "divbin2.c", 10, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/divbin2_unwindbound1.yml b/c/nla-digbench-scaling/divbin2_unwindbound1.yml index e98d44ee6e4..67f41fdc8a9 100644 --- a/c/nla-digbench-scaling/divbin2_unwindbound1.yml +++ b/c/nla-digbench-scaling/divbin2_unwindbound1.yml @@ -3,6 +3,8 @@ input_files: 'divbin2_unwindbound1.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/divbin2_unwindbound10.c b/c/nla-digbench-scaling/divbin2_unwindbound10.c index b4aa73ee0a8..38ebb1d42f7 100644 --- a/c/nla-digbench-scaling/divbin2_unwindbound10.c +++ b/c/nla-digbench-scaling/divbin2_unwindbound10.c @@ -6,7 +6,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/divbin2_unwindbound10.i b/c/nla-digbench-scaling/divbin2_unwindbound10.i index 4fdc302ddc1..870de6a90e9 100644 --- a/c/nla-digbench-scaling/divbin2_unwindbound10.i +++ b/c/nla-digbench-scaling/divbin2_unwindbound10.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "divbin2.c", 10, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/divbin2_unwindbound10.yml b/c/nla-digbench-scaling/divbin2_unwindbound10.yml index 32522203df2..87667d7b7b9 100644 --- a/c/nla-digbench-scaling/divbin2_unwindbound10.yml +++ b/c/nla-digbench-scaling/divbin2_unwindbound10.yml @@ -3,6 +3,8 @@ input_files: 'divbin2_unwindbound10.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/divbin2_unwindbound100.c b/c/nla-digbench-scaling/divbin2_unwindbound100.c index be112245746..671a0b419d6 100644 --- a/c/nla-digbench-scaling/divbin2_unwindbound100.c +++ b/c/nla-digbench-scaling/divbin2_unwindbound100.c @@ -6,7 +6,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/divbin2_unwindbound100.i b/c/nla-digbench-scaling/divbin2_unwindbound100.i index d6c07f710c4..44c3a0412d0 100644 --- a/c/nla-digbench-scaling/divbin2_unwindbound100.i +++ b/c/nla-digbench-scaling/divbin2_unwindbound100.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "divbin2.c", 10, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/divbin2_unwindbound100.yml b/c/nla-digbench-scaling/divbin2_unwindbound100.yml index b4a8d9a601c..10ac64b770d 100644 --- a/c/nla-digbench-scaling/divbin2_unwindbound100.yml +++ b/c/nla-digbench-scaling/divbin2_unwindbound100.yml @@ -3,6 +3,8 @@ input_files: 'divbin2_unwindbound100.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/divbin2_unwindbound2.c b/c/nla-digbench-scaling/divbin2_unwindbound2.c index ff6241c0265..7fe71c54a90 100644 --- a/c/nla-digbench-scaling/divbin2_unwindbound2.c +++ b/c/nla-digbench-scaling/divbin2_unwindbound2.c @@ -6,7 +6,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/divbin2_unwindbound2.i b/c/nla-digbench-scaling/divbin2_unwindbound2.i index 024e1eca0e8..8d5078d9a8c 100644 --- a/c/nla-digbench-scaling/divbin2_unwindbound2.i +++ b/c/nla-digbench-scaling/divbin2_unwindbound2.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "divbin2.c", 10, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/divbin2_unwindbound2.yml b/c/nla-digbench-scaling/divbin2_unwindbound2.yml index e802fe1d723..3eec2e0e8a7 100644 --- a/c/nla-digbench-scaling/divbin2_unwindbound2.yml +++ b/c/nla-digbench-scaling/divbin2_unwindbound2.yml @@ -3,6 +3,8 @@ input_files: 'divbin2_unwindbound2.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/divbin2_unwindbound20.c b/c/nla-digbench-scaling/divbin2_unwindbound20.c index 434081ae4c6..b3bdae6f547 100644 --- a/c/nla-digbench-scaling/divbin2_unwindbound20.c +++ b/c/nla-digbench-scaling/divbin2_unwindbound20.c @@ -6,7 +6,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/divbin2_unwindbound20.i b/c/nla-digbench-scaling/divbin2_unwindbound20.i index 76870fbf0e3..50436dcfb3b 100644 --- a/c/nla-digbench-scaling/divbin2_unwindbound20.i +++ b/c/nla-digbench-scaling/divbin2_unwindbound20.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "divbin2.c", 10, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/divbin2_unwindbound20.yml b/c/nla-digbench-scaling/divbin2_unwindbound20.yml index de173c8b274..93fe667bc24 100644 --- a/c/nla-digbench-scaling/divbin2_unwindbound20.yml +++ b/c/nla-digbench-scaling/divbin2_unwindbound20.yml @@ -3,6 +3,8 @@ input_files: 'divbin2_unwindbound20.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/divbin2_unwindbound5.c b/c/nla-digbench-scaling/divbin2_unwindbound5.c index 7854211f8a1..caa27a20e97 100644 --- a/c/nla-digbench-scaling/divbin2_unwindbound5.c +++ b/c/nla-digbench-scaling/divbin2_unwindbound5.c @@ -6,7 +6,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/divbin2_unwindbound5.i b/c/nla-digbench-scaling/divbin2_unwindbound5.i index a591e8c7f2e..a912cae9560 100644 --- a/c/nla-digbench-scaling/divbin2_unwindbound5.i +++ b/c/nla-digbench-scaling/divbin2_unwindbound5.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "divbin2.c", 10, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/divbin2_unwindbound5.yml b/c/nla-digbench-scaling/divbin2_unwindbound5.yml index 6f3d1af04bd..50b9b7f003c 100644 --- a/c/nla-digbench-scaling/divbin2_unwindbound5.yml +++ b/c/nla-digbench-scaling/divbin2_unwindbound5.yml @@ -3,6 +3,8 @@ input_files: 'divbin2_unwindbound5.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/divbin2_unwindbound50.c b/c/nla-digbench-scaling/divbin2_unwindbound50.c index 637de53b7cb..c08bbb69328 100644 --- a/c/nla-digbench-scaling/divbin2_unwindbound50.c +++ b/c/nla-digbench-scaling/divbin2_unwindbound50.c @@ -6,7 +6,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/divbin2_unwindbound50.i b/c/nla-digbench-scaling/divbin2_unwindbound50.i index ef2c2c15a79..57ed009ba5b 100644 --- a/c/nla-digbench-scaling/divbin2_unwindbound50.i +++ b/c/nla-digbench-scaling/divbin2_unwindbound50.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "divbin2.c", 10, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/divbin2_unwindbound50.yml b/c/nla-digbench-scaling/divbin2_unwindbound50.yml index 438fababd73..06c106e963e 100644 --- a/c/nla-digbench-scaling/divbin2_unwindbound50.yml +++ b/c/nla-digbench-scaling/divbin2_unwindbound50.yml @@ -3,6 +3,8 @@ input_files: 'divbin2_unwindbound50.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/divbin2_valuebound1.c b/c/nla-digbench-scaling/divbin2_valuebound1.c index 65d9d9d7da1..a8d7b4ae340 100644 --- a/c/nla-digbench-scaling/divbin2_valuebound1.c +++ b/c/nla-digbench-scaling/divbin2_valuebound1.c @@ -6,7 +6,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -24,7 +25,7 @@ int main() { unsigned A, B; unsigned q, r, b; A = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(A>0 && A<=1); + assume_abort_if_not(A>=0 && A<=1); B = 1; q = 0; diff --git a/c/nla-digbench-scaling/divbin2_valuebound1.i b/c/nla-digbench-scaling/divbin2_valuebound1.i index c4f1fca443b..8efa28f7bb7 100644 --- a/c/nla-digbench-scaling/divbin2_valuebound1.i +++ b/c/nla-digbench-scaling/divbin2_valuebound1.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "divbin2.c", 10, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -16,7 +26,7 @@ int main() { unsigned A, B; unsigned q, r, b; A = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(A>0 && A<=1); + assume_abort_if_not(A>=0 && A<=1); B = 1; q = 0; r = A; diff --git a/c/nla-digbench-scaling/divbin2_valuebound1.yml b/c/nla-digbench-scaling/divbin2_valuebound1.yml index 9db70e59542..88cd2dd49b0 100644 --- a/c/nla-digbench-scaling/divbin2_valuebound1.yml +++ b/c/nla-digbench-scaling/divbin2_valuebound1.yml @@ -3,6 +3,8 @@ input_files: 'divbin2_valuebound1.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/divbin2_valuebound10.c b/c/nla-digbench-scaling/divbin2_valuebound10.c index b26359ec7f9..0a2458ab7a0 100644 --- a/c/nla-digbench-scaling/divbin2_valuebound10.c +++ b/c/nla-digbench-scaling/divbin2_valuebound10.c @@ -6,7 +6,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -24,7 +25,7 @@ int main() { unsigned A, B; unsigned q, r, b; A = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(A>0 && A<=10); + assume_abort_if_not(A>=0 && A<=10); B = 1; q = 0; diff --git a/c/nla-digbench-scaling/divbin2_valuebound10.i b/c/nla-digbench-scaling/divbin2_valuebound10.i index 1a2ee8f7bfc..f6a02af7909 100644 --- a/c/nla-digbench-scaling/divbin2_valuebound10.i +++ b/c/nla-digbench-scaling/divbin2_valuebound10.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "divbin2.c", 10, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -16,7 +26,7 @@ int main() { unsigned A, B; unsigned q, r, b; A = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(A>0 && A<=10); + assume_abort_if_not(A>=0 && A<=10); B = 1; q = 0; r = A; diff --git a/c/nla-digbench-scaling/divbin2_valuebound10.yml b/c/nla-digbench-scaling/divbin2_valuebound10.yml index 002d5a26459..58ed74c6571 100644 --- a/c/nla-digbench-scaling/divbin2_valuebound10.yml +++ b/c/nla-digbench-scaling/divbin2_valuebound10.yml @@ -3,6 +3,8 @@ input_files: 'divbin2_valuebound10.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/divbin2_valuebound100.c b/c/nla-digbench-scaling/divbin2_valuebound100.c index 409fbd40361..990dcbd0d8f 100644 --- a/c/nla-digbench-scaling/divbin2_valuebound100.c +++ b/c/nla-digbench-scaling/divbin2_valuebound100.c @@ -6,7 +6,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -24,7 +25,7 @@ int main() { unsigned A, B; unsigned q, r, b; A = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(A>0 && A<=100); + assume_abort_if_not(A>=0 && A<=100); B = 1; q = 0; diff --git a/c/nla-digbench-scaling/divbin2_valuebound100.i b/c/nla-digbench-scaling/divbin2_valuebound100.i index a9809c57c77..199ea1bdc03 100644 --- a/c/nla-digbench-scaling/divbin2_valuebound100.i +++ b/c/nla-digbench-scaling/divbin2_valuebound100.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "divbin2.c", 10, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -16,7 +26,7 @@ int main() { unsigned A, B; unsigned q, r, b; A = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(A>0 && A<=100); + assume_abort_if_not(A>=0 && A<=100); B = 1; q = 0; r = A; diff --git a/c/nla-digbench-scaling/divbin2_valuebound100.yml b/c/nla-digbench-scaling/divbin2_valuebound100.yml index 846c2c0d316..1e293b7af03 100644 --- a/c/nla-digbench-scaling/divbin2_valuebound100.yml +++ b/c/nla-digbench-scaling/divbin2_valuebound100.yml @@ -3,6 +3,8 @@ input_files: 'divbin2_valuebound100.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/divbin2_valuebound2.c b/c/nla-digbench-scaling/divbin2_valuebound2.c index 95474b46502..39e8a08cfce 100644 --- a/c/nla-digbench-scaling/divbin2_valuebound2.c +++ b/c/nla-digbench-scaling/divbin2_valuebound2.c @@ -6,7 +6,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -24,7 +25,7 @@ int main() { unsigned A, B; unsigned q, r, b; A = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(A>0 && A<=2); + assume_abort_if_not(A>=0 && A<=2); B = 1; q = 0; diff --git a/c/nla-digbench-scaling/divbin2_valuebound2.i b/c/nla-digbench-scaling/divbin2_valuebound2.i index eadbecf62c7..06b64ba04ce 100644 --- a/c/nla-digbench-scaling/divbin2_valuebound2.i +++ b/c/nla-digbench-scaling/divbin2_valuebound2.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "divbin2.c", 10, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -16,7 +26,7 @@ int main() { unsigned A, B; unsigned q, r, b; A = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(A>0 && A<=2); + assume_abort_if_not(A>=0 && A<=2); B = 1; q = 0; r = A; diff --git a/c/nla-digbench-scaling/divbin2_valuebound2.yml b/c/nla-digbench-scaling/divbin2_valuebound2.yml index d74ba7473a3..62ba1480737 100644 --- a/c/nla-digbench-scaling/divbin2_valuebound2.yml +++ b/c/nla-digbench-scaling/divbin2_valuebound2.yml @@ -3,6 +3,8 @@ input_files: 'divbin2_valuebound2.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/divbin2_valuebound20.c b/c/nla-digbench-scaling/divbin2_valuebound20.c index ffcdf9089ba..d4bf2c72164 100644 --- a/c/nla-digbench-scaling/divbin2_valuebound20.c +++ b/c/nla-digbench-scaling/divbin2_valuebound20.c @@ -6,7 +6,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -24,7 +25,7 @@ int main() { unsigned A, B; unsigned q, r, b; A = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(A>0 && A<=20); + assume_abort_if_not(A>=0 && A<=20); B = 1; q = 0; diff --git a/c/nla-digbench-scaling/divbin2_valuebound20.i b/c/nla-digbench-scaling/divbin2_valuebound20.i index 893a7e4dcd7..89b76694d57 100644 --- a/c/nla-digbench-scaling/divbin2_valuebound20.i +++ b/c/nla-digbench-scaling/divbin2_valuebound20.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "divbin2.c", 10, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -16,7 +26,7 @@ int main() { unsigned A, B; unsigned q, r, b; A = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(A>0 && A<=20); + assume_abort_if_not(A>=0 && A<=20); B = 1; q = 0; r = A; diff --git a/c/nla-digbench-scaling/divbin2_valuebound20.yml b/c/nla-digbench-scaling/divbin2_valuebound20.yml index 95fd0b01750..086ca9d9be2 100644 --- a/c/nla-digbench-scaling/divbin2_valuebound20.yml +++ b/c/nla-digbench-scaling/divbin2_valuebound20.yml @@ -3,6 +3,8 @@ input_files: 'divbin2_valuebound20.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/divbin2_valuebound5.c b/c/nla-digbench-scaling/divbin2_valuebound5.c index 669f8b63a11..971eb181543 100644 --- a/c/nla-digbench-scaling/divbin2_valuebound5.c +++ b/c/nla-digbench-scaling/divbin2_valuebound5.c @@ -6,7 +6,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -24,7 +25,7 @@ int main() { unsigned A, B; unsigned q, r, b; A = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(A>0 && A<=5); + assume_abort_if_not(A>=0 && A<=5); B = 1; q = 0; diff --git a/c/nla-digbench-scaling/divbin2_valuebound5.i b/c/nla-digbench-scaling/divbin2_valuebound5.i index 70174b21393..d90c567df0d 100644 --- a/c/nla-digbench-scaling/divbin2_valuebound5.i +++ b/c/nla-digbench-scaling/divbin2_valuebound5.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "divbin2.c", 10, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -16,7 +26,7 @@ int main() { unsigned A, B; unsigned q, r, b; A = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(A>0 && A<=5); + assume_abort_if_not(A>=0 && A<=5); B = 1; q = 0; r = A; diff --git a/c/nla-digbench-scaling/divbin2_valuebound5.yml b/c/nla-digbench-scaling/divbin2_valuebound5.yml index 5b7134c901c..ea45f351a34 100644 --- a/c/nla-digbench-scaling/divbin2_valuebound5.yml +++ b/c/nla-digbench-scaling/divbin2_valuebound5.yml @@ -3,6 +3,8 @@ input_files: 'divbin2_valuebound5.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/divbin2_valuebound50.c b/c/nla-digbench-scaling/divbin2_valuebound50.c index 4915c8539e5..18e3a7dab8e 100644 --- a/c/nla-digbench-scaling/divbin2_valuebound50.c +++ b/c/nla-digbench-scaling/divbin2_valuebound50.c @@ -6,7 +6,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -24,7 +25,7 @@ int main() { unsigned A, B; unsigned q, r, b; A = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(A>0 && A<=50); + assume_abort_if_not(A>=0 && A<=50); B = 1; q = 0; diff --git a/c/nla-digbench-scaling/divbin2_valuebound50.i b/c/nla-digbench-scaling/divbin2_valuebound50.i index 36c8b506ead..56483539764 100644 --- a/c/nla-digbench-scaling/divbin2_valuebound50.i +++ b/c/nla-digbench-scaling/divbin2_valuebound50.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "divbin2.c", 10, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -16,7 +26,7 @@ int main() { unsigned A, B; unsigned q, r, b; A = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(A>0 && A<=50); + assume_abort_if_not(A>=0 && A<=50); B = 1; q = 0; r = A; diff --git a/c/nla-digbench-scaling/divbin2_valuebound50.yml b/c/nla-digbench-scaling/divbin2_valuebound50.yml index 152c432934f..ca9faf7c5a3 100644 --- a/c/nla-digbench-scaling/divbin2_valuebound50.yml +++ b/c/nla-digbench-scaling/divbin2_valuebound50.yml @@ -3,6 +3,8 @@ input_files: 'divbin2_valuebound50.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/divbin_unwindbound1.c b/c/nla-digbench-scaling/divbin_unwindbound1.c index 9153e356cd4..c191bff8356 100644 --- a/c/nla-digbench-scaling/divbin_unwindbound1.c +++ b/c/nla-digbench-scaling/divbin_unwindbound1.c @@ -6,7 +6,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/divbin_unwindbound1.i b/c/nla-digbench-scaling/divbin_unwindbound1.i index d7ca66fbebe..9f289d4d3b3 100644 --- a/c/nla-digbench-scaling/divbin_unwindbound1.i +++ b/c/nla-digbench-scaling/divbin_unwindbound1.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "divbin.c", 10, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/divbin_unwindbound1.yml b/c/nla-digbench-scaling/divbin_unwindbound1.yml index 4f5cd87ff65..29cbfc23193 100644 --- a/c/nla-digbench-scaling/divbin_unwindbound1.yml +++ b/c/nla-digbench-scaling/divbin_unwindbound1.yml @@ -3,6 +3,8 @@ input_files: 'divbin_unwindbound1.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/divbin_unwindbound10.c b/c/nla-digbench-scaling/divbin_unwindbound10.c index a78294b73fb..d8402c70b87 100644 --- a/c/nla-digbench-scaling/divbin_unwindbound10.c +++ b/c/nla-digbench-scaling/divbin_unwindbound10.c @@ -6,7 +6,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/divbin_unwindbound10.i b/c/nla-digbench-scaling/divbin_unwindbound10.i index 2d88d9942e7..94a6bc46c88 100644 --- a/c/nla-digbench-scaling/divbin_unwindbound10.i +++ b/c/nla-digbench-scaling/divbin_unwindbound10.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "divbin.c", 10, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/divbin_unwindbound10.yml b/c/nla-digbench-scaling/divbin_unwindbound10.yml index 22dce06b12a..aab84ea276d 100644 --- a/c/nla-digbench-scaling/divbin_unwindbound10.yml +++ b/c/nla-digbench-scaling/divbin_unwindbound10.yml @@ -3,6 +3,8 @@ input_files: 'divbin_unwindbound10.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/divbin_unwindbound100.c b/c/nla-digbench-scaling/divbin_unwindbound100.c index 3ab443553f6..0b1953d70d4 100644 --- a/c/nla-digbench-scaling/divbin_unwindbound100.c +++ b/c/nla-digbench-scaling/divbin_unwindbound100.c @@ -6,7 +6,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/divbin_unwindbound100.i b/c/nla-digbench-scaling/divbin_unwindbound100.i index 756e82a0c06..09401c079a4 100644 --- a/c/nla-digbench-scaling/divbin_unwindbound100.i +++ b/c/nla-digbench-scaling/divbin_unwindbound100.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "divbin.c", 10, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/divbin_unwindbound100.yml b/c/nla-digbench-scaling/divbin_unwindbound100.yml index 5b308a49ff4..687a7060ab9 100644 --- a/c/nla-digbench-scaling/divbin_unwindbound100.yml +++ b/c/nla-digbench-scaling/divbin_unwindbound100.yml @@ -3,6 +3,8 @@ input_files: 'divbin_unwindbound100.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/divbin_unwindbound2.c b/c/nla-digbench-scaling/divbin_unwindbound2.c index 7dfe40877d0..d4d1bb326e5 100644 --- a/c/nla-digbench-scaling/divbin_unwindbound2.c +++ b/c/nla-digbench-scaling/divbin_unwindbound2.c @@ -6,7 +6,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/divbin_unwindbound2.i b/c/nla-digbench-scaling/divbin_unwindbound2.i index 6900d7a1f07..a9a6cd4e3da 100644 --- a/c/nla-digbench-scaling/divbin_unwindbound2.i +++ b/c/nla-digbench-scaling/divbin_unwindbound2.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "divbin.c", 10, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/divbin_unwindbound2.yml b/c/nla-digbench-scaling/divbin_unwindbound2.yml index 5a7a625193a..9755f334e75 100644 --- a/c/nla-digbench-scaling/divbin_unwindbound2.yml +++ b/c/nla-digbench-scaling/divbin_unwindbound2.yml @@ -3,6 +3,8 @@ input_files: 'divbin_unwindbound2.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/divbin_unwindbound20.c b/c/nla-digbench-scaling/divbin_unwindbound20.c index 52564ce0ec6..ce59147e57f 100644 --- a/c/nla-digbench-scaling/divbin_unwindbound20.c +++ b/c/nla-digbench-scaling/divbin_unwindbound20.c @@ -6,7 +6,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/divbin_unwindbound20.i b/c/nla-digbench-scaling/divbin_unwindbound20.i index 3454ee33144..24c7026b34c 100644 --- a/c/nla-digbench-scaling/divbin_unwindbound20.i +++ b/c/nla-digbench-scaling/divbin_unwindbound20.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "divbin.c", 10, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/divbin_unwindbound20.yml b/c/nla-digbench-scaling/divbin_unwindbound20.yml index a704437eb5d..c3c827b8f49 100644 --- a/c/nla-digbench-scaling/divbin_unwindbound20.yml +++ b/c/nla-digbench-scaling/divbin_unwindbound20.yml @@ -3,6 +3,8 @@ input_files: 'divbin_unwindbound20.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/divbin_unwindbound5.c b/c/nla-digbench-scaling/divbin_unwindbound5.c index 38e49d19193..c5c3af20750 100644 --- a/c/nla-digbench-scaling/divbin_unwindbound5.c +++ b/c/nla-digbench-scaling/divbin_unwindbound5.c @@ -6,7 +6,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/divbin_unwindbound5.i b/c/nla-digbench-scaling/divbin_unwindbound5.i index c967a04507f..5b2bfa566bd 100644 --- a/c/nla-digbench-scaling/divbin_unwindbound5.i +++ b/c/nla-digbench-scaling/divbin_unwindbound5.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "divbin.c", 10, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/divbin_unwindbound5.yml b/c/nla-digbench-scaling/divbin_unwindbound5.yml index b88592a7de6..b26fa80c35f 100644 --- a/c/nla-digbench-scaling/divbin_unwindbound5.yml +++ b/c/nla-digbench-scaling/divbin_unwindbound5.yml @@ -3,6 +3,8 @@ input_files: 'divbin_unwindbound5.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/divbin_unwindbound50.c b/c/nla-digbench-scaling/divbin_unwindbound50.c index 37a73f73477..05885494c1b 100644 --- a/c/nla-digbench-scaling/divbin_unwindbound50.c +++ b/c/nla-digbench-scaling/divbin_unwindbound50.c @@ -6,7 +6,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/divbin_unwindbound50.i b/c/nla-digbench-scaling/divbin_unwindbound50.i index f8ea7ce1244..4eafca2d845 100644 --- a/c/nla-digbench-scaling/divbin_unwindbound50.i +++ b/c/nla-digbench-scaling/divbin_unwindbound50.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "divbin.c", 10, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/divbin_unwindbound50.yml b/c/nla-digbench-scaling/divbin_unwindbound50.yml index 8076fb2d95f..be01e60ce7e 100644 --- a/c/nla-digbench-scaling/divbin_unwindbound50.yml +++ b/c/nla-digbench-scaling/divbin_unwindbound50.yml @@ -3,6 +3,8 @@ input_files: 'divbin_unwindbound50.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/divbin_valuebound1.c b/c/nla-digbench-scaling/divbin_valuebound1.c index 6209e0e76f9..c2fdca12cc7 100644 --- a/c/nla-digbench-scaling/divbin_valuebound1.c +++ b/c/nla-digbench-scaling/divbin_valuebound1.c @@ -6,7 +6,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -24,9 +25,9 @@ int main() { unsigned A, B; unsigned q, r, b; A = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(A>0 && A<=1); + assume_abort_if_not(A>=0 && A<=1); B = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(B>0 && B<=1); + assume_abort_if_not(B>=0 && B<=1); assume_abort_if_not(B < UINT_MAX/2); assume_abort_if_not(B >= 1); diff --git a/c/nla-digbench-scaling/divbin_valuebound1.i b/c/nla-digbench-scaling/divbin_valuebound1.i index 58040bb9a5a..c06982db4ac 100644 --- a/c/nla-digbench-scaling/divbin_valuebound1.i +++ b/c/nla-digbench-scaling/divbin_valuebound1.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "divbin.c", 10, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -16,9 +26,9 @@ int main() { unsigned A, B; unsigned q, r, b; A = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(A>0 && A<=1); + assume_abort_if_not(A>=0 && A<=1); B = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(B>0 && B<=1); + assume_abort_if_not(B>=0 && B<=1); assume_abort_if_not(B < (0x7fffffff * 2U + 1U)/2); assume_abort_if_not(B >= 1); q = 0; diff --git a/c/nla-digbench-scaling/divbin_valuebound1.yml b/c/nla-digbench-scaling/divbin_valuebound1.yml index 7f77b44a7bf..9d644a93de4 100644 --- a/c/nla-digbench-scaling/divbin_valuebound1.yml +++ b/c/nla-digbench-scaling/divbin_valuebound1.yml @@ -3,6 +3,8 @@ input_files: 'divbin_valuebound1.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/divbin_valuebound10.c b/c/nla-digbench-scaling/divbin_valuebound10.c index 64eaf885712..09ebbb39983 100644 --- a/c/nla-digbench-scaling/divbin_valuebound10.c +++ b/c/nla-digbench-scaling/divbin_valuebound10.c @@ -6,7 +6,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -24,9 +25,9 @@ int main() { unsigned A, B; unsigned q, r, b; A = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(A>0 && A<=10); + assume_abort_if_not(A>=0 && A<=10); B = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(B>0 && B<=10); + assume_abort_if_not(B>=0 && B<=10); assume_abort_if_not(B < UINT_MAX/2); assume_abort_if_not(B >= 1); diff --git a/c/nla-digbench-scaling/divbin_valuebound10.i b/c/nla-digbench-scaling/divbin_valuebound10.i index 4009bc07fe0..70ea1d0a28c 100644 --- a/c/nla-digbench-scaling/divbin_valuebound10.i +++ b/c/nla-digbench-scaling/divbin_valuebound10.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "divbin.c", 10, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -16,9 +26,9 @@ int main() { unsigned A, B; unsigned q, r, b; A = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(A>0 && A<=10); + assume_abort_if_not(A>=0 && A<=10); B = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(B>0 && B<=10); + assume_abort_if_not(B>=0 && B<=10); assume_abort_if_not(B < (0x7fffffff * 2U + 1U)/2); assume_abort_if_not(B >= 1); q = 0; diff --git a/c/nla-digbench-scaling/divbin_valuebound10.yml b/c/nla-digbench-scaling/divbin_valuebound10.yml index dd8e2895da3..d513b6ea49c 100644 --- a/c/nla-digbench-scaling/divbin_valuebound10.yml +++ b/c/nla-digbench-scaling/divbin_valuebound10.yml @@ -3,6 +3,8 @@ input_files: 'divbin_valuebound10.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/divbin_valuebound100.c b/c/nla-digbench-scaling/divbin_valuebound100.c index 1f6f259842f..28ffb3d4308 100644 --- a/c/nla-digbench-scaling/divbin_valuebound100.c +++ b/c/nla-digbench-scaling/divbin_valuebound100.c @@ -6,7 +6,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -24,9 +25,9 @@ int main() { unsigned A, B; unsigned q, r, b; A = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(A>0 && A<=100); + assume_abort_if_not(A>=0 && A<=100); B = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(B>0 && B<=100); + assume_abort_if_not(B>=0 && B<=100); assume_abort_if_not(B < UINT_MAX/2); assume_abort_if_not(B >= 1); diff --git a/c/nla-digbench-scaling/divbin_valuebound100.i b/c/nla-digbench-scaling/divbin_valuebound100.i index 9435aac649c..758e6a1f08a 100644 --- a/c/nla-digbench-scaling/divbin_valuebound100.i +++ b/c/nla-digbench-scaling/divbin_valuebound100.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "divbin.c", 10, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -16,9 +26,9 @@ int main() { unsigned A, B; unsigned q, r, b; A = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(A>0 && A<=100); + assume_abort_if_not(A>=0 && A<=100); B = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(B>0 && B<=100); + assume_abort_if_not(B>=0 && B<=100); assume_abort_if_not(B < (0x7fffffff * 2U + 1U)/2); assume_abort_if_not(B >= 1); q = 0; diff --git a/c/nla-digbench-scaling/divbin_valuebound100.yml b/c/nla-digbench-scaling/divbin_valuebound100.yml index de2f21543d6..17ab787906b 100644 --- a/c/nla-digbench-scaling/divbin_valuebound100.yml +++ b/c/nla-digbench-scaling/divbin_valuebound100.yml @@ -3,6 +3,8 @@ input_files: 'divbin_valuebound100.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/divbin_valuebound2.c b/c/nla-digbench-scaling/divbin_valuebound2.c index 5e739d2821a..c660a690a69 100644 --- a/c/nla-digbench-scaling/divbin_valuebound2.c +++ b/c/nla-digbench-scaling/divbin_valuebound2.c @@ -6,7 +6,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -24,9 +25,9 @@ int main() { unsigned A, B; unsigned q, r, b; A = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(A>0 && A<=2); + assume_abort_if_not(A>=0 && A<=2); B = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(B>0 && B<=2); + assume_abort_if_not(B>=0 && B<=2); assume_abort_if_not(B < UINT_MAX/2); assume_abort_if_not(B >= 1); diff --git a/c/nla-digbench-scaling/divbin_valuebound2.i b/c/nla-digbench-scaling/divbin_valuebound2.i index dd14767b5c7..e1d0469c147 100644 --- a/c/nla-digbench-scaling/divbin_valuebound2.i +++ b/c/nla-digbench-scaling/divbin_valuebound2.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "divbin.c", 10, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -16,9 +26,9 @@ int main() { unsigned A, B; unsigned q, r, b; A = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(A>0 && A<=2); + assume_abort_if_not(A>=0 && A<=2); B = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(B>0 && B<=2); + assume_abort_if_not(B>=0 && B<=2); assume_abort_if_not(B < (0x7fffffff * 2U + 1U)/2); assume_abort_if_not(B >= 1); q = 0; diff --git a/c/nla-digbench-scaling/divbin_valuebound2.yml b/c/nla-digbench-scaling/divbin_valuebound2.yml index c1a9c5a6c31..159c36134a2 100644 --- a/c/nla-digbench-scaling/divbin_valuebound2.yml +++ b/c/nla-digbench-scaling/divbin_valuebound2.yml @@ -3,6 +3,8 @@ input_files: 'divbin_valuebound2.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/divbin_valuebound20.c b/c/nla-digbench-scaling/divbin_valuebound20.c index 09fe9476383..ee1a2fe42d3 100644 --- a/c/nla-digbench-scaling/divbin_valuebound20.c +++ b/c/nla-digbench-scaling/divbin_valuebound20.c @@ -6,7 +6,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -24,9 +25,9 @@ int main() { unsigned A, B; unsigned q, r, b; A = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(A>0 && A<=20); + assume_abort_if_not(A>=0 && A<=20); B = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(B>0 && B<=20); + assume_abort_if_not(B>=0 && B<=20); assume_abort_if_not(B < UINT_MAX/2); assume_abort_if_not(B >= 1); diff --git a/c/nla-digbench-scaling/divbin_valuebound20.i b/c/nla-digbench-scaling/divbin_valuebound20.i index b8b418e913c..f4991289915 100644 --- a/c/nla-digbench-scaling/divbin_valuebound20.i +++ b/c/nla-digbench-scaling/divbin_valuebound20.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "divbin.c", 10, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -16,9 +26,9 @@ int main() { unsigned A, B; unsigned q, r, b; A = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(A>0 && A<=20); + assume_abort_if_not(A>=0 && A<=20); B = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(B>0 && B<=20); + assume_abort_if_not(B>=0 && B<=20); assume_abort_if_not(B < (0x7fffffff * 2U + 1U)/2); assume_abort_if_not(B >= 1); q = 0; diff --git a/c/nla-digbench-scaling/divbin_valuebound20.yml b/c/nla-digbench-scaling/divbin_valuebound20.yml index c7db21d61c8..e0118a1047a 100644 --- a/c/nla-digbench-scaling/divbin_valuebound20.yml +++ b/c/nla-digbench-scaling/divbin_valuebound20.yml @@ -3,6 +3,8 @@ input_files: 'divbin_valuebound20.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/divbin_valuebound5.c b/c/nla-digbench-scaling/divbin_valuebound5.c index 063da06287c..4484e4c4aee 100644 --- a/c/nla-digbench-scaling/divbin_valuebound5.c +++ b/c/nla-digbench-scaling/divbin_valuebound5.c @@ -6,7 +6,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -24,9 +25,9 @@ int main() { unsigned A, B; unsigned q, r, b; A = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(A>0 && A<=5); + assume_abort_if_not(A>=0 && A<=5); B = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(B>0 && B<=5); + assume_abort_if_not(B>=0 && B<=5); assume_abort_if_not(B < UINT_MAX/2); assume_abort_if_not(B >= 1); diff --git a/c/nla-digbench-scaling/divbin_valuebound5.i b/c/nla-digbench-scaling/divbin_valuebound5.i index 5151c415cda..d1dccdb7868 100644 --- a/c/nla-digbench-scaling/divbin_valuebound5.i +++ b/c/nla-digbench-scaling/divbin_valuebound5.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "divbin.c", 10, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -16,9 +26,9 @@ int main() { unsigned A, B; unsigned q, r, b; A = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(A>0 && A<=5); + assume_abort_if_not(A>=0 && A<=5); B = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(B>0 && B<=5); + assume_abort_if_not(B>=0 && B<=5); assume_abort_if_not(B < (0x7fffffff * 2U + 1U)/2); assume_abort_if_not(B >= 1); q = 0; diff --git a/c/nla-digbench-scaling/divbin_valuebound5.yml b/c/nla-digbench-scaling/divbin_valuebound5.yml index 8bbcefec159..c6025caa7a1 100644 --- a/c/nla-digbench-scaling/divbin_valuebound5.yml +++ b/c/nla-digbench-scaling/divbin_valuebound5.yml @@ -3,6 +3,8 @@ input_files: 'divbin_valuebound5.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/divbin_valuebound50.c b/c/nla-digbench-scaling/divbin_valuebound50.c index 40dc0acf285..e1ae49df85b 100644 --- a/c/nla-digbench-scaling/divbin_valuebound50.c +++ b/c/nla-digbench-scaling/divbin_valuebound50.c @@ -6,7 +6,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -24,9 +25,9 @@ int main() { unsigned A, B; unsigned q, r, b; A = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(A>0 && A<=50); + assume_abort_if_not(A>=0 && A<=50); B = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(B>0 && B<=50); + assume_abort_if_not(B>=0 && B<=50); assume_abort_if_not(B < UINT_MAX/2); assume_abort_if_not(B >= 1); diff --git a/c/nla-digbench-scaling/divbin_valuebound50.i b/c/nla-digbench-scaling/divbin_valuebound50.i index cefb202a08f..3df058076b2 100644 --- a/c/nla-digbench-scaling/divbin_valuebound50.i +++ b/c/nla-digbench-scaling/divbin_valuebound50.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "divbin.c", 10, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -16,9 +26,9 @@ int main() { unsigned A, B; unsigned q, r, b; A = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(A>0 && A<=50); + assume_abort_if_not(A>=0 && A<=50); B = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(B>0 && B<=50); + assume_abort_if_not(B>=0 && B<=50); assume_abort_if_not(B < (0x7fffffff * 2U + 1U)/2); assume_abort_if_not(B >= 1); q = 0; diff --git a/c/nla-digbench-scaling/divbin_valuebound50.yml b/c/nla-digbench-scaling/divbin_valuebound50.yml index 4f63f37b75a..1ce00712e96 100644 --- a/c/nla-digbench-scaling/divbin_valuebound50.yml +++ b/c/nla-digbench-scaling/divbin_valuebound50.yml @@ -3,6 +3,8 @@ input_files: 'divbin_valuebound50.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/egcd-ll_unwindbound1.c b/c/nla-digbench-scaling/egcd-ll_unwindbound1.c new file mode 100644 index 00000000000..01440d13148 --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_unwindbound1.c @@ -0,0 +1,58 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + long long a, b, p, q, r, s; + int x, y; + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + + while (counter++<1) { + __VERIFIER_assert(1 == p * s - r * q); + __VERIFIER_assert(a == y * r + x * p); + __VERIFIER_assert(b == x * q + y * s); + + if (!(a != b)) + break; + + if (a > b) { + a = a - b; + p = p - q; + r = r - s; + } else { + b = b - a; + q = q - p; + s = s - r; + } + } + + __VERIFIER_assert(a - b == 0); + __VERIFIER_assert(p*x + r*y - b == 0); + __VERIFIER_assert(q*r - p*s + 1 == 0); + __VERIFIER_assert(q*x + s*y - b == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/egcd-ll_unwindbound1.yml b/c/nla-digbench-scaling/egcd-ll_unwindbound1.yml new file mode 100644 index 00000000000..398c406fcf1 --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_unwindbound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd-ll_unwindbound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd-ll_unwindbound10.c b/c/nla-digbench-scaling/egcd-ll_unwindbound10.c new file mode 100644 index 00000000000..f257131ef5b --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_unwindbound10.c @@ -0,0 +1,58 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + long long a, b, p, q, r, s; + int x, y; + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + + while (counter++<10) { + __VERIFIER_assert(1 == p * s - r * q); + __VERIFIER_assert(a == y * r + x * p); + __VERIFIER_assert(b == x * q + y * s); + + if (!(a != b)) + break; + + if (a > b) { + a = a - b; + p = p - q; + r = r - s; + } else { + b = b - a; + q = q - p; + s = s - r; + } + } + + __VERIFIER_assert(a - b == 0); + __VERIFIER_assert(p*x + r*y - b == 0); + __VERIFIER_assert(q*r - p*s + 1 == 0); + __VERIFIER_assert(q*x + s*y - b == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/egcd-ll_unwindbound10.yml b/c/nla-digbench-scaling/egcd-ll_unwindbound10.yml new file mode 100644 index 00000000000..a36eef26687 --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_unwindbound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd-ll_unwindbound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd-ll_unwindbound100.c b/c/nla-digbench-scaling/egcd-ll_unwindbound100.c new file mode 100644 index 00000000000..d149953ea5e --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_unwindbound100.c @@ -0,0 +1,58 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + long long a, b, p, q, r, s; + int x, y; + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + + while (counter++<100) { + __VERIFIER_assert(1 == p * s - r * q); + __VERIFIER_assert(a == y * r + x * p); + __VERIFIER_assert(b == x * q + y * s); + + if (!(a != b)) + break; + + if (a > b) { + a = a - b; + p = p - q; + r = r - s; + } else { + b = b - a; + q = q - p; + s = s - r; + } + } + + __VERIFIER_assert(a - b == 0); + __VERIFIER_assert(p*x + r*y - b == 0); + __VERIFIER_assert(q*r - p*s + 1 == 0); + __VERIFIER_assert(q*x + s*y - b == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/egcd-ll_unwindbound100.yml b/c/nla-digbench-scaling/egcd-ll_unwindbound100.yml new file mode 100644 index 00000000000..44c08108200 --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_unwindbound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd-ll_unwindbound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd-ll_unwindbound2.c b/c/nla-digbench-scaling/egcd-ll_unwindbound2.c new file mode 100644 index 00000000000..d2900cccf7f --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_unwindbound2.c @@ -0,0 +1,58 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + long long a, b, p, q, r, s; + int x, y; + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + + while (counter++<2) { + __VERIFIER_assert(1 == p * s - r * q); + __VERIFIER_assert(a == y * r + x * p); + __VERIFIER_assert(b == x * q + y * s); + + if (!(a != b)) + break; + + if (a > b) { + a = a - b; + p = p - q; + r = r - s; + } else { + b = b - a; + q = q - p; + s = s - r; + } + } + + __VERIFIER_assert(a - b == 0); + __VERIFIER_assert(p*x + r*y - b == 0); + __VERIFIER_assert(q*r - p*s + 1 == 0); + __VERIFIER_assert(q*x + s*y - b == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/egcd-ll_unwindbound2.yml b/c/nla-digbench-scaling/egcd-ll_unwindbound2.yml new file mode 100644 index 00000000000..a30b5d73032 --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_unwindbound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd-ll_unwindbound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd-ll_unwindbound20.c b/c/nla-digbench-scaling/egcd-ll_unwindbound20.c new file mode 100644 index 00000000000..489f8519fe2 --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_unwindbound20.c @@ -0,0 +1,58 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + long long a, b, p, q, r, s; + int x, y; + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + + while (counter++<20) { + __VERIFIER_assert(1 == p * s - r * q); + __VERIFIER_assert(a == y * r + x * p); + __VERIFIER_assert(b == x * q + y * s); + + if (!(a != b)) + break; + + if (a > b) { + a = a - b; + p = p - q; + r = r - s; + } else { + b = b - a; + q = q - p; + s = s - r; + } + } + + __VERIFIER_assert(a - b == 0); + __VERIFIER_assert(p*x + r*y - b == 0); + __VERIFIER_assert(q*r - p*s + 1 == 0); + __VERIFIER_assert(q*x + s*y - b == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/egcd-ll_unwindbound20.yml b/c/nla-digbench-scaling/egcd-ll_unwindbound20.yml new file mode 100644 index 00000000000..c6414353514 --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_unwindbound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd-ll_unwindbound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd-ll_unwindbound5.c b/c/nla-digbench-scaling/egcd-ll_unwindbound5.c new file mode 100644 index 00000000000..38634779033 --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_unwindbound5.c @@ -0,0 +1,58 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + long long a, b, p, q, r, s; + int x, y; + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + + while (counter++<5) { + __VERIFIER_assert(1 == p * s - r * q); + __VERIFIER_assert(a == y * r + x * p); + __VERIFIER_assert(b == x * q + y * s); + + if (!(a != b)) + break; + + if (a > b) { + a = a - b; + p = p - q; + r = r - s; + } else { + b = b - a; + q = q - p; + s = s - r; + } + } + + __VERIFIER_assert(a - b == 0); + __VERIFIER_assert(p*x + r*y - b == 0); + __VERIFIER_assert(q*r - p*s + 1 == 0); + __VERIFIER_assert(q*x + s*y - b == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/egcd-ll_unwindbound5.yml b/c/nla-digbench-scaling/egcd-ll_unwindbound5.yml new file mode 100644 index 00000000000..bb4b14d73a2 --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_unwindbound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd-ll_unwindbound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd-ll_unwindbound50.c b/c/nla-digbench-scaling/egcd-ll_unwindbound50.c new file mode 100644 index 00000000000..e74c02bde34 --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_unwindbound50.c @@ -0,0 +1,58 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + long long a, b, p, q, r, s; + int x, y; + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + + while (counter++<50) { + __VERIFIER_assert(1 == p * s - r * q); + __VERIFIER_assert(a == y * r + x * p); + __VERIFIER_assert(b == x * q + y * s); + + if (!(a != b)) + break; + + if (a > b) { + a = a - b; + p = p - q; + r = r - s; + } else { + b = b - a; + q = q - p; + s = s - r; + } + } + + __VERIFIER_assert(a - b == 0); + __VERIFIER_assert(p*x + r*y - b == 0); + __VERIFIER_assert(q*r - p*s + 1 == 0); + __VERIFIER_assert(q*x + s*y - b == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/egcd-ll_unwindbound50.yml b/c/nla-digbench-scaling/egcd-ll_unwindbound50.yml new file mode 100644 index 00000000000..0577372431b --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_unwindbound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd-ll_unwindbound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd-ll_valuebound1.c b/c/nla-digbench-scaling/egcd-ll_valuebound1.c new file mode 100644 index 00000000000..2d92a0dee0a --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_valuebound1.c @@ -0,0 +1,59 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + long long a, b, p, q, r, s; + int x, y; + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=1); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=1); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + + while (1) { + __VERIFIER_assert(1 == p * s - r * q); + __VERIFIER_assert(a == y * r + x * p); + __VERIFIER_assert(b == x * q + y * s); + + if (!(a != b)) + break; + + if (a > b) { + a = a - b; + p = p - q; + r = r - s; + } else { + b = b - a; + q = q - p; + s = s - r; + } + } + + __VERIFIER_assert(a - b == 0); + __VERIFIER_assert(p*x + r*y - b == 0); + __VERIFIER_assert(q*r - p*s + 1 == 0); + __VERIFIER_assert(q*x + s*y - b == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/egcd-ll_valuebound1.yml b/c/nla-digbench-scaling/egcd-ll_valuebound1.yml new file mode 100644 index 00000000000..ed4ca8724ac --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_valuebound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd-ll_valuebound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd-ll_valuebound10.c b/c/nla-digbench-scaling/egcd-ll_valuebound10.c new file mode 100644 index 00000000000..8ff5e6eb82d --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_valuebound10.c @@ -0,0 +1,59 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + long long a, b, p, q, r, s; + int x, y; + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=10); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=10); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + + while (1) { + __VERIFIER_assert(1 == p * s - r * q); + __VERIFIER_assert(a == y * r + x * p); + __VERIFIER_assert(b == x * q + y * s); + + if (!(a != b)) + break; + + if (a > b) { + a = a - b; + p = p - q; + r = r - s; + } else { + b = b - a; + q = q - p; + s = s - r; + } + } + + __VERIFIER_assert(a - b == 0); + __VERIFIER_assert(p*x + r*y - b == 0); + __VERIFIER_assert(q*r - p*s + 1 == 0); + __VERIFIER_assert(q*x + s*y - b == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/egcd-ll_valuebound10.yml b/c/nla-digbench-scaling/egcd-ll_valuebound10.yml new file mode 100644 index 00000000000..21aa4e27d76 --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_valuebound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd-ll_valuebound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd-ll_valuebound100.c b/c/nla-digbench-scaling/egcd-ll_valuebound100.c new file mode 100644 index 00000000000..08ab7f4ff30 --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_valuebound100.c @@ -0,0 +1,59 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + long long a, b, p, q, r, s; + int x, y; + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=100); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=100); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + + while (1) { + __VERIFIER_assert(1 == p * s - r * q); + __VERIFIER_assert(a == y * r + x * p); + __VERIFIER_assert(b == x * q + y * s); + + if (!(a != b)) + break; + + if (a > b) { + a = a - b; + p = p - q; + r = r - s; + } else { + b = b - a; + q = q - p; + s = s - r; + } + } + + __VERIFIER_assert(a - b == 0); + __VERIFIER_assert(p*x + r*y - b == 0); + __VERIFIER_assert(q*r - p*s + 1 == 0); + __VERIFIER_assert(q*x + s*y - b == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/egcd-ll_valuebound100.yml b/c/nla-digbench-scaling/egcd-ll_valuebound100.yml new file mode 100644 index 00000000000..00a3404ba8a --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_valuebound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd-ll_valuebound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd-ll_valuebound2.c b/c/nla-digbench-scaling/egcd-ll_valuebound2.c new file mode 100644 index 00000000000..f9a8d78658a --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_valuebound2.c @@ -0,0 +1,59 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + long long a, b, p, q, r, s; + int x, y; + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=2); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=2); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + + while (1) { + __VERIFIER_assert(1 == p * s - r * q); + __VERIFIER_assert(a == y * r + x * p); + __VERIFIER_assert(b == x * q + y * s); + + if (!(a != b)) + break; + + if (a > b) { + a = a - b; + p = p - q; + r = r - s; + } else { + b = b - a; + q = q - p; + s = s - r; + } + } + + __VERIFIER_assert(a - b == 0); + __VERIFIER_assert(p*x + r*y - b == 0); + __VERIFIER_assert(q*r - p*s + 1 == 0); + __VERIFIER_assert(q*x + s*y - b == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/egcd-ll_valuebound2.yml b/c/nla-digbench-scaling/egcd-ll_valuebound2.yml new file mode 100644 index 00000000000..659c2083687 --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_valuebound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd-ll_valuebound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd-ll_valuebound20.c b/c/nla-digbench-scaling/egcd-ll_valuebound20.c new file mode 100644 index 00000000000..248e514f582 --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_valuebound20.c @@ -0,0 +1,59 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + long long a, b, p, q, r, s; + int x, y; + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=20); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=20); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + + while (1) { + __VERIFIER_assert(1 == p * s - r * q); + __VERIFIER_assert(a == y * r + x * p); + __VERIFIER_assert(b == x * q + y * s); + + if (!(a != b)) + break; + + if (a > b) { + a = a - b; + p = p - q; + r = r - s; + } else { + b = b - a; + q = q - p; + s = s - r; + } + } + + __VERIFIER_assert(a - b == 0); + __VERIFIER_assert(p*x + r*y - b == 0); + __VERIFIER_assert(q*r - p*s + 1 == 0); + __VERIFIER_assert(q*x + s*y - b == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/egcd-ll_valuebound20.yml b/c/nla-digbench-scaling/egcd-ll_valuebound20.yml new file mode 100644 index 00000000000..5f4b3d69678 --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_valuebound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd-ll_valuebound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd-ll_valuebound5.c b/c/nla-digbench-scaling/egcd-ll_valuebound5.c new file mode 100644 index 00000000000..8247963a938 --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_valuebound5.c @@ -0,0 +1,59 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + long long a, b, p, q, r, s; + int x, y; + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=5); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=5); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + + while (1) { + __VERIFIER_assert(1 == p * s - r * q); + __VERIFIER_assert(a == y * r + x * p); + __VERIFIER_assert(b == x * q + y * s); + + if (!(a != b)) + break; + + if (a > b) { + a = a - b; + p = p - q; + r = r - s; + } else { + b = b - a; + q = q - p; + s = s - r; + } + } + + __VERIFIER_assert(a - b == 0); + __VERIFIER_assert(p*x + r*y - b == 0); + __VERIFIER_assert(q*r - p*s + 1 == 0); + __VERIFIER_assert(q*x + s*y - b == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/egcd-ll_valuebound5.yml b/c/nla-digbench-scaling/egcd-ll_valuebound5.yml new file mode 100644 index 00000000000..8f504e1d16c --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_valuebound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd-ll_valuebound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd-ll_valuebound50.c b/c/nla-digbench-scaling/egcd-ll_valuebound50.c new file mode 100644 index 00000000000..ed49aceb1cc --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_valuebound50.c @@ -0,0 +1,59 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + long long a, b, p, q, r, s; + int x, y; + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=50); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=50); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + + while (1) { + __VERIFIER_assert(1 == p * s - r * q); + __VERIFIER_assert(a == y * r + x * p); + __VERIFIER_assert(b == x * q + y * s); + + if (!(a != b)) + break; + + if (a > b) { + a = a - b; + p = p - q; + r = r - s; + } else { + b = b - a; + q = q - p; + s = s - r; + } + } + + __VERIFIER_assert(a - b == 0); + __VERIFIER_assert(p*x + r*y - b == 0); + __VERIFIER_assert(q*r - p*s + 1 == 0); + __VERIFIER_assert(q*x + s*y - b == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/egcd-ll_valuebound50.yml b/c/nla-digbench-scaling/egcd-ll_valuebound50.yml new file mode 100644 index 00000000000..62e91b57e41 --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_valuebound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd-ll_valuebound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd2-ll_unwindbound1.c b/c/nla-digbench-scaling/egcd2-ll_unwindbound1.c new file mode 100644 index 00000000000..fa808ad95b2 --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_unwindbound1.c @@ -0,0 +1,73 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd2-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int x, y; + long long a, b, p, q, r, s, c, k, xy, yy; + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + c = 0; + k = 0; + xy = (long long) x * y; + yy = (long long) y * y; + assume_abort_if_not(xy < 2147483647); + assume_abort_if_not(yy < 2147483647); + + while (counter++<1) { + if (!(b != 0)) + break; + c = a; + k = 0; + + while (counter++<1) { + __VERIFIER_assert(a == k * b + c); + __VERIFIER_assert(a == y*r + x*p); + __VERIFIER_assert(b == x * q + y * s); + __VERIFIER_assert(q*xy + s*yy - q*x - b*y - s*y + b == 0); + if (!(c >= b)) + break; + c = c - b; + k = k + 1; + } + + a = b; + b = c; + + long long temp; + temp = p; + p = q; + q = temp - q * k; + temp = r; + r = s; + s = temp - s * k; + } + + + __VERIFIER_assert(q*x + s*y == 0); + __VERIFIER_assert(p*x + r*y == a); + return a; +} diff --git a/c/nla-digbench-scaling/egcd2-ll_unwindbound1.yml b/c/nla-digbench-scaling/egcd2-ll_unwindbound1.yml new file mode 100644 index 00000000000..0b05068c05b --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_unwindbound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd2-ll_unwindbound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd2-ll_unwindbound10.c b/c/nla-digbench-scaling/egcd2-ll_unwindbound10.c new file mode 100644 index 00000000000..2b3f73b89dc --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_unwindbound10.c @@ -0,0 +1,73 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd2-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int x, y; + long long a, b, p, q, r, s, c, k, xy, yy; + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + c = 0; + k = 0; + xy = (long long) x * y; + yy = (long long) y * y; + assume_abort_if_not(xy < 2147483647); + assume_abort_if_not(yy < 2147483647); + + while (counter++<10) { + if (!(b != 0)) + break; + c = a; + k = 0; + + while (counter++<10) { + __VERIFIER_assert(a == k * b + c); + __VERIFIER_assert(a == y*r + x*p); + __VERIFIER_assert(b == x * q + y * s); + __VERIFIER_assert(q*xy + s*yy - q*x - b*y - s*y + b == 0); + if (!(c >= b)) + break; + c = c - b; + k = k + 1; + } + + a = b; + b = c; + + long long temp; + temp = p; + p = q; + q = temp - q * k; + temp = r; + r = s; + s = temp - s * k; + } + + + __VERIFIER_assert(q*x + s*y == 0); + __VERIFIER_assert(p*x + r*y == a); + return a; +} diff --git a/c/nla-digbench-scaling/egcd2-ll_unwindbound10.yml b/c/nla-digbench-scaling/egcd2-ll_unwindbound10.yml new file mode 100644 index 00000000000..fdbbd093589 --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_unwindbound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd2-ll_unwindbound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd2-ll_unwindbound100.c b/c/nla-digbench-scaling/egcd2-ll_unwindbound100.c new file mode 100644 index 00000000000..567b2c927e2 --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_unwindbound100.c @@ -0,0 +1,73 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd2-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int x, y; + long long a, b, p, q, r, s, c, k, xy, yy; + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + c = 0; + k = 0; + xy = (long long) x * y; + yy = (long long) y * y; + assume_abort_if_not(xy < 2147483647); + assume_abort_if_not(yy < 2147483647); + + while (counter++<100) { + if (!(b != 0)) + break; + c = a; + k = 0; + + while (counter++<100) { + __VERIFIER_assert(a == k * b + c); + __VERIFIER_assert(a == y*r + x*p); + __VERIFIER_assert(b == x * q + y * s); + __VERIFIER_assert(q*xy + s*yy - q*x - b*y - s*y + b == 0); + if (!(c >= b)) + break; + c = c - b; + k = k + 1; + } + + a = b; + b = c; + + long long temp; + temp = p; + p = q; + q = temp - q * k; + temp = r; + r = s; + s = temp - s * k; + } + + + __VERIFIER_assert(q*x + s*y == 0); + __VERIFIER_assert(p*x + r*y == a); + return a; +} diff --git a/c/nla-digbench-scaling/egcd2-ll_unwindbound100.yml b/c/nla-digbench-scaling/egcd2-ll_unwindbound100.yml new file mode 100644 index 00000000000..455446df064 --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_unwindbound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd2-ll_unwindbound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd2-ll_unwindbound2.c b/c/nla-digbench-scaling/egcd2-ll_unwindbound2.c new file mode 100644 index 00000000000..5603160d878 --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_unwindbound2.c @@ -0,0 +1,73 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd2-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int x, y; + long long a, b, p, q, r, s, c, k, xy, yy; + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + c = 0; + k = 0; + xy = (long long) x * y; + yy = (long long) y * y; + assume_abort_if_not(xy < 2147483647); + assume_abort_if_not(yy < 2147483647); + + while (counter++<2) { + if (!(b != 0)) + break; + c = a; + k = 0; + + while (counter++<2) { + __VERIFIER_assert(a == k * b + c); + __VERIFIER_assert(a == y*r + x*p); + __VERIFIER_assert(b == x * q + y * s); + __VERIFIER_assert(q*xy + s*yy - q*x - b*y - s*y + b == 0); + if (!(c >= b)) + break; + c = c - b; + k = k + 1; + } + + a = b; + b = c; + + long long temp; + temp = p; + p = q; + q = temp - q * k; + temp = r; + r = s; + s = temp - s * k; + } + + + __VERIFIER_assert(q*x + s*y == 0); + __VERIFIER_assert(p*x + r*y == a); + return a; +} diff --git a/c/nla-digbench-scaling/egcd2-ll_unwindbound2.yml b/c/nla-digbench-scaling/egcd2-ll_unwindbound2.yml new file mode 100644 index 00000000000..288664f26e4 --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_unwindbound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd2-ll_unwindbound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd2-ll_unwindbound20.c b/c/nla-digbench-scaling/egcd2-ll_unwindbound20.c new file mode 100644 index 00000000000..e21e085cb2f --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_unwindbound20.c @@ -0,0 +1,73 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd2-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int x, y; + long long a, b, p, q, r, s, c, k, xy, yy; + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + c = 0; + k = 0; + xy = (long long) x * y; + yy = (long long) y * y; + assume_abort_if_not(xy < 2147483647); + assume_abort_if_not(yy < 2147483647); + + while (counter++<20) { + if (!(b != 0)) + break; + c = a; + k = 0; + + while (counter++<20) { + __VERIFIER_assert(a == k * b + c); + __VERIFIER_assert(a == y*r + x*p); + __VERIFIER_assert(b == x * q + y * s); + __VERIFIER_assert(q*xy + s*yy - q*x - b*y - s*y + b == 0); + if (!(c >= b)) + break; + c = c - b; + k = k + 1; + } + + a = b; + b = c; + + long long temp; + temp = p; + p = q; + q = temp - q * k; + temp = r; + r = s; + s = temp - s * k; + } + + + __VERIFIER_assert(q*x + s*y == 0); + __VERIFIER_assert(p*x + r*y == a); + return a; +} diff --git a/c/nla-digbench-scaling/egcd2-ll_unwindbound20.yml b/c/nla-digbench-scaling/egcd2-ll_unwindbound20.yml new file mode 100644 index 00000000000..2ed54913bfc --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_unwindbound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd2-ll_unwindbound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd2-ll_unwindbound5.c b/c/nla-digbench-scaling/egcd2-ll_unwindbound5.c new file mode 100644 index 00000000000..d5a233154ae --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_unwindbound5.c @@ -0,0 +1,73 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd2-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int x, y; + long long a, b, p, q, r, s, c, k, xy, yy; + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + c = 0; + k = 0; + xy = (long long) x * y; + yy = (long long) y * y; + assume_abort_if_not(xy < 2147483647); + assume_abort_if_not(yy < 2147483647); + + while (counter++<5) { + if (!(b != 0)) + break; + c = a; + k = 0; + + while (counter++<5) { + __VERIFIER_assert(a == k * b + c); + __VERIFIER_assert(a == y*r + x*p); + __VERIFIER_assert(b == x * q + y * s); + __VERIFIER_assert(q*xy + s*yy - q*x - b*y - s*y + b == 0); + if (!(c >= b)) + break; + c = c - b; + k = k + 1; + } + + a = b; + b = c; + + long long temp; + temp = p; + p = q; + q = temp - q * k; + temp = r; + r = s; + s = temp - s * k; + } + + + __VERIFIER_assert(q*x + s*y == 0); + __VERIFIER_assert(p*x + r*y == a); + return a; +} diff --git a/c/nla-digbench-scaling/egcd2-ll_unwindbound5.yml b/c/nla-digbench-scaling/egcd2-ll_unwindbound5.yml new file mode 100644 index 00000000000..8fa757a9d32 --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_unwindbound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd2-ll_unwindbound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd2-ll_unwindbound50.c b/c/nla-digbench-scaling/egcd2-ll_unwindbound50.c new file mode 100644 index 00000000000..d7c837b9afc --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_unwindbound50.c @@ -0,0 +1,73 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd2-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int x, y; + long long a, b, p, q, r, s, c, k, xy, yy; + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + c = 0; + k = 0; + xy = (long long) x * y; + yy = (long long) y * y; + assume_abort_if_not(xy < 2147483647); + assume_abort_if_not(yy < 2147483647); + + while (counter++<50) { + if (!(b != 0)) + break; + c = a; + k = 0; + + while (counter++<50) { + __VERIFIER_assert(a == k * b + c); + __VERIFIER_assert(a == y*r + x*p); + __VERIFIER_assert(b == x * q + y * s); + __VERIFIER_assert(q*xy + s*yy - q*x - b*y - s*y + b == 0); + if (!(c >= b)) + break; + c = c - b; + k = k + 1; + } + + a = b; + b = c; + + long long temp; + temp = p; + p = q; + q = temp - q * k; + temp = r; + r = s; + s = temp - s * k; + } + + + __VERIFIER_assert(q*x + s*y == 0); + __VERIFIER_assert(p*x + r*y == a); + return a; +} diff --git a/c/nla-digbench-scaling/egcd2-ll_unwindbound50.yml b/c/nla-digbench-scaling/egcd2-ll_unwindbound50.yml new file mode 100644 index 00000000000..e8d7bcce06d --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_unwindbound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd2-ll_unwindbound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd2-ll_valuebound1.c b/c/nla-digbench-scaling/egcd2-ll_valuebound1.c new file mode 100644 index 00000000000..a06d82a851d --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_valuebound1.c @@ -0,0 +1,74 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd2-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int x, y; + long long a, b, p, q, r, s, c, k, xy, yy; + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=1); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=1); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + c = 0; + k = 0; + xy = (long long) x * y; + yy = (long long) y * y; + assume_abort_if_not(xy < 2147483647); + assume_abort_if_not(yy < 2147483647); + + while (1) { + if (!(b != 0)) + break; + c = a; + k = 0; + + while (1) { + __VERIFIER_assert(a == k * b + c); + __VERIFIER_assert(a == y*r + x*p); + __VERIFIER_assert(b == x * q + y * s); + __VERIFIER_assert(q*xy + s*yy - q*x - b*y - s*y + b == 0); + if (!(c >= b)) + break; + c = c - b; + k = k + 1; + } + + a = b; + b = c; + + long long temp; + temp = p; + p = q; + q = temp - q * k; + temp = r; + r = s; + s = temp - s * k; + } + + + __VERIFIER_assert(q*x + s*y == 0); + __VERIFIER_assert(p*x + r*y == a); + return a; +} diff --git a/c/nla-digbench-scaling/egcd2-ll_valuebound1.yml b/c/nla-digbench-scaling/egcd2-ll_valuebound1.yml new file mode 100644 index 00000000000..f0398214ae6 --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_valuebound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd2-ll_valuebound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd2-ll_valuebound10.c b/c/nla-digbench-scaling/egcd2-ll_valuebound10.c new file mode 100644 index 00000000000..15eca81da69 --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_valuebound10.c @@ -0,0 +1,74 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd2-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int x, y; + long long a, b, p, q, r, s, c, k, xy, yy; + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=10); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=10); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + c = 0; + k = 0; + xy = (long long) x * y; + yy = (long long) y * y; + assume_abort_if_not(xy < 2147483647); + assume_abort_if_not(yy < 2147483647); + + while (1) { + if (!(b != 0)) + break; + c = a; + k = 0; + + while (1) { + __VERIFIER_assert(a == k * b + c); + __VERIFIER_assert(a == y*r + x*p); + __VERIFIER_assert(b == x * q + y * s); + __VERIFIER_assert(q*xy + s*yy - q*x - b*y - s*y + b == 0); + if (!(c >= b)) + break; + c = c - b; + k = k + 1; + } + + a = b; + b = c; + + long long temp; + temp = p; + p = q; + q = temp - q * k; + temp = r; + r = s; + s = temp - s * k; + } + + + __VERIFIER_assert(q*x + s*y == 0); + __VERIFIER_assert(p*x + r*y == a); + return a; +} diff --git a/c/nla-digbench-scaling/egcd2-ll_valuebound10.yml b/c/nla-digbench-scaling/egcd2-ll_valuebound10.yml new file mode 100644 index 00000000000..8e9285382a0 --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_valuebound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd2-ll_valuebound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd2-ll_valuebound100.c b/c/nla-digbench-scaling/egcd2-ll_valuebound100.c new file mode 100644 index 00000000000..abdcd5192e8 --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_valuebound100.c @@ -0,0 +1,74 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd2-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int x, y; + long long a, b, p, q, r, s, c, k, xy, yy; + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=100); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=100); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + c = 0; + k = 0; + xy = (long long) x * y; + yy = (long long) y * y; + assume_abort_if_not(xy < 2147483647); + assume_abort_if_not(yy < 2147483647); + + while (1) { + if (!(b != 0)) + break; + c = a; + k = 0; + + while (1) { + __VERIFIER_assert(a == k * b + c); + __VERIFIER_assert(a == y*r + x*p); + __VERIFIER_assert(b == x * q + y * s); + __VERIFIER_assert(q*xy + s*yy - q*x - b*y - s*y + b == 0); + if (!(c >= b)) + break; + c = c - b; + k = k + 1; + } + + a = b; + b = c; + + long long temp; + temp = p; + p = q; + q = temp - q * k; + temp = r; + r = s; + s = temp - s * k; + } + + + __VERIFIER_assert(q*x + s*y == 0); + __VERIFIER_assert(p*x + r*y == a); + return a; +} diff --git a/c/nla-digbench-scaling/egcd2-ll_valuebound100.yml b/c/nla-digbench-scaling/egcd2-ll_valuebound100.yml new file mode 100644 index 00000000000..20bca025f76 --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_valuebound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd2-ll_valuebound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd2-ll_valuebound2.c b/c/nla-digbench-scaling/egcd2-ll_valuebound2.c new file mode 100644 index 00000000000..63f4dbd405c --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_valuebound2.c @@ -0,0 +1,74 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd2-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int x, y; + long long a, b, p, q, r, s, c, k, xy, yy; + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=2); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=2); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + c = 0; + k = 0; + xy = (long long) x * y; + yy = (long long) y * y; + assume_abort_if_not(xy < 2147483647); + assume_abort_if_not(yy < 2147483647); + + while (1) { + if (!(b != 0)) + break; + c = a; + k = 0; + + while (1) { + __VERIFIER_assert(a == k * b + c); + __VERIFIER_assert(a == y*r + x*p); + __VERIFIER_assert(b == x * q + y * s); + __VERIFIER_assert(q*xy + s*yy - q*x - b*y - s*y + b == 0); + if (!(c >= b)) + break; + c = c - b; + k = k + 1; + } + + a = b; + b = c; + + long long temp; + temp = p; + p = q; + q = temp - q * k; + temp = r; + r = s; + s = temp - s * k; + } + + + __VERIFIER_assert(q*x + s*y == 0); + __VERIFIER_assert(p*x + r*y == a); + return a; +} diff --git a/c/nla-digbench-scaling/egcd2-ll_valuebound2.yml b/c/nla-digbench-scaling/egcd2-ll_valuebound2.yml new file mode 100644 index 00000000000..73e3b096ddf --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_valuebound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd2-ll_valuebound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd2-ll_valuebound20.c b/c/nla-digbench-scaling/egcd2-ll_valuebound20.c new file mode 100644 index 00000000000..b1b636b9f82 --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_valuebound20.c @@ -0,0 +1,74 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd2-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int x, y; + long long a, b, p, q, r, s, c, k, xy, yy; + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=20); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=20); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + c = 0; + k = 0; + xy = (long long) x * y; + yy = (long long) y * y; + assume_abort_if_not(xy < 2147483647); + assume_abort_if_not(yy < 2147483647); + + while (1) { + if (!(b != 0)) + break; + c = a; + k = 0; + + while (1) { + __VERIFIER_assert(a == k * b + c); + __VERIFIER_assert(a == y*r + x*p); + __VERIFIER_assert(b == x * q + y * s); + __VERIFIER_assert(q*xy + s*yy - q*x - b*y - s*y + b == 0); + if (!(c >= b)) + break; + c = c - b; + k = k + 1; + } + + a = b; + b = c; + + long long temp; + temp = p; + p = q; + q = temp - q * k; + temp = r; + r = s; + s = temp - s * k; + } + + + __VERIFIER_assert(q*x + s*y == 0); + __VERIFIER_assert(p*x + r*y == a); + return a; +} diff --git a/c/nla-digbench-scaling/egcd2-ll_valuebound20.yml b/c/nla-digbench-scaling/egcd2-ll_valuebound20.yml new file mode 100644 index 00000000000..7d562041227 --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_valuebound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd2-ll_valuebound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd2-ll_valuebound5.c b/c/nla-digbench-scaling/egcd2-ll_valuebound5.c new file mode 100644 index 00000000000..211a622e995 --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_valuebound5.c @@ -0,0 +1,74 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd2-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int x, y; + long long a, b, p, q, r, s, c, k, xy, yy; + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=5); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=5); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + c = 0; + k = 0; + xy = (long long) x * y; + yy = (long long) y * y; + assume_abort_if_not(xy < 2147483647); + assume_abort_if_not(yy < 2147483647); + + while (1) { + if (!(b != 0)) + break; + c = a; + k = 0; + + while (1) { + __VERIFIER_assert(a == k * b + c); + __VERIFIER_assert(a == y*r + x*p); + __VERIFIER_assert(b == x * q + y * s); + __VERIFIER_assert(q*xy + s*yy - q*x - b*y - s*y + b == 0); + if (!(c >= b)) + break; + c = c - b; + k = k + 1; + } + + a = b; + b = c; + + long long temp; + temp = p; + p = q; + q = temp - q * k; + temp = r; + r = s; + s = temp - s * k; + } + + + __VERIFIER_assert(q*x + s*y == 0); + __VERIFIER_assert(p*x + r*y == a); + return a; +} diff --git a/c/nla-digbench-scaling/egcd2-ll_valuebound5.yml b/c/nla-digbench-scaling/egcd2-ll_valuebound5.yml new file mode 100644 index 00000000000..530f05793e4 --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_valuebound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd2-ll_valuebound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd2-ll_valuebound50.c b/c/nla-digbench-scaling/egcd2-ll_valuebound50.c new file mode 100644 index 00000000000..bb4cab8ae4d --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_valuebound50.c @@ -0,0 +1,74 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd2-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int x, y; + long long a, b, p, q, r, s, c, k, xy, yy; + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=50); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=50); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + c = 0; + k = 0; + xy = (long long) x * y; + yy = (long long) y * y; + assume_abort_if_not(xy < 2147483647); + assume_abort_if_not(yy < 2147483647); + + while (1) { + if (!(b != 0)) + break; + c = a; + k = 0; + + while (1) { + __VERIFIER_assert(a == k * b + c); + __VERIFIER_assert(a == y*r + x*p); + __VERIFIER_assert(b == x * q + y * s); + __VERIFIER_assert(q*xy + s*yy - q*x - b*y - s*y + b == 0); + if (!(c >= b)) + break; + c = c - b; + k = k + 1; + } + + a = b; + b = c; + + long long temp; + temp = p; + p = q; + q = temp - q * k; + temp = r; + r = s; + s = temp - s * k; + } + + + __VERIFIER_assert(q*x + s*y == 0); + __VERIFIER_assert(p*x + r*y == a); + return a; +} diff --git a/c/nla-digbench-scaling/egcd2-ll_valuebound50.yml b/c/nla-digbench-scaling/egcd2-ll_valuebound50.yml new file mode 100644 index 00000000000..8c824aac50f --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_valuebound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd2-ll_valuebound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd2_unwindbound1.c b/c/nla-digbench-scaling/egcd2_unwindbound1.c deleted file mode 100644 index 51606afb64a..00000000000 --- a/c/nla-digbench-scaling/egcd2_unwindbound1.c +++ /dev/null @@ -1,67 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int x, y; - int a, b, p, q, r, s, c, k; - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - c = 0; - k = 0; - while (counter++<1) { - if (!(b != 0)) - break; - c = a; - k = 0; - - while (counter++<1) { - __VERIFIER_assert(a == k * b + c); - __VERIFIER_assert(a == y*r + x*p); - __VERIFIER_assert(b == x * q + y * s); - __VERIFIER_assert(q*x*y + s*y*y - q*x - b*y - s*y + b == 0); - if (!(c >= b)) - break; - c = c - b; - k = k + 1; - } - - a = b; - b = c; - - int temp; - temp = p; - p = q; - q = temp - q * k; - temp = r; - r = s; - s = temp - s * k; - } - - - __VERIFIER_assert(q*x + s*y == 0); - __VERIFIER_assert(p*x + r*y == a); - return a; -} diff --git a/c/nla-digbench-scaling/egcd2_unwindbound1.yml b/c/nla-digbench-scaling/egcd2_unwindbound1.yml deleted file mode 100644 index 199d5b20669..00000000000 --- a/c/nla-digbench-scaling/egcd2_unwindbound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd2_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd2_unwindbound10.c b/c/nla-digbench-scaling/egcd2_unwindbound10.c deleted file mode 100644 index d79230409cb..00000000000 --- a/c/nla-digbench-scaling/egcd2_unwindbound10.c +++ /dev/null @@ -1,67 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int x, y; - int a, b, p, q, r, s, c, k; - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - c = 0; - k = 0; - while (counter++<10) { - if (!(b != 0)) - break; - c = a; - k = 0; - - while (counter++<10) { - __VERIFIER_assert(a == k * b + c); - __VERIFIER_assert(a == y*r + x*p); - __VERIFIER_assert(b == x * q + y * s); - __VERIFIER_assert(q*x*y + s*y*y - q*x - b*y - s*y + b == 0); - if (!(c >= b)) - break; - c = c - b; - k = k + 1; - } - - a = b; - b = c; - - int temp; - temp = p; - p = q; - q = temp - q * k; - temp = r; - r = s; - s = temp - s * k; - } - - - __VERIFIER_assert(q*x + s*y == 0); - __VERIFIER_assert(p*x + r*y == a); - return a; -} diff --git a/c/nla-digbench-scaling/egcd2_unwindbound10.yml b/c/nla-digbench-scaling/egcd2_unwindbound10.yml deleted file mode 100644 index c5f05b468f3..00000000000 --- a/c/nla-digbench-scaling/egcd2_unwindbound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd2_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd2_unwindbound100.c b/c/nla-digbench-scaling/egcd2_unwindbound100.c deleted file mode 100644 index 9186354e6bb..00000000000 --- a/c/nla-digbench-scaling/egcd2_unwindbound100.c +++ /dev/null @@ -1,67 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int x, y; - int a, b, p, q, r, s, c, k; - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - c = 0; - k = 0; - while (counter++<100) { - if (!(b != 0)) - break; - c = a; - k = 0; - - while (counter++<100) { - __VERIFIER_assert(a == k * b + c); - __VERIFIER_assert(a == y*r + x*p); - __VERIFIER_assert(b == x * q + y * s); - __VERIFIER_assert(q*x*y + s*y*y - q*x - b*y - s*y + b == 0); - if (!(c >= b)) - break; - c = c - b; - k = k + 1; - } - - a = b; - b = c; - - int temp; - temp = p; - p = q; - q = temp - q * k; - temp = r; - r = s; - s = temp - s * k; - } - - - __VERIFIER_assert(q*x + s*y == 0); - __VERIFIER_assert(p*x + r*y == a); - return a; -} diff --git a/c/nla-digbench-scaling/egcd2_unwindbound100.yml b/c/nla-digbench-scaling/egcd2_unwindbound100.yml deleted file mode 100644 index ed2a3110d81..00000000000 --- a/c/nla-digbench-scaling/egcd2_unwindbound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd2_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd2_unwindbound2.c b/c/nla-digbench-scaling/egcd2_unwindbound2.c deleted file mode 100644 index 8e0fb8bcd8f..00000000000 --- a/c/nla-digbench-scaling/egcd2_unwindbound2.c +++ /dev/null @@ -1,67 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int x, y; - int a, b, p, q, r, s, c, k; - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - c = 0; - k = 0; - while (counter++<2) { - if (!(b != 0)) - break; - c = a; - k = 0; - - while (counter++<2) { - __VERIFIER_assert(a == k * b + c); - __VERIFIER_assert(a == y*r + x*p); - __VERIFIER_assert(b == x * q + y * s); - __VERIFIER_assert(q*x*y + s*y*y - q*x - b*y - s*y + b == 0); - if (!(c >= b)) - break; - c = c - b; - k = k + 1; - } - - a = b; - b = c; - - int temp; - temp = p; - p = q; - q = temp - q * k; - temp = r; - r = s; - s = temp - s * k; - } - - - __VERIFIER_assert(q*x + s*y == 0); - __VERIFIER_assert(p*x + r*y == a); - return a; -} diff --git a/c/nla-digbench-scaling/egcd2_unwindbound2.yml b/c/nla-digbench-scaling/egcd2_unwindbound2.yml deleted file mode 100644 index 871a083d8f5..00000000000 --- a/c/nla-digbench-scaling/egcd2_unwindbound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd2_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd2_unwindbound20.c b/c/nla-digbench-scaling/egcd2_unwindbound20.c deleted file mode 100644 index f6df2981791..00000000000 --- a/c/nla-digbench-scaling/egcd2_unwindbound20.c +++ /dev/null @@ -1,67 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int x, y; - int a, b, p, q, r, s, c, k; - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - c = 0; - k = 0; - while (counter++<20) { - if (!(b != 0)) - break; - c = a; - k = 0; - - while (counter++<20) { - __VERIFIER_assert(a == k * b + c); - __VERIFIER_assert(a == y*r + x*p); - __VERIFIER_assert(b == x * q + y * s); - __VERIFIER_assert(q*x*y + s*y*y - q*x - b*y - s*y + b == 0); - if (!(c >= b)) - break; - c = c - b; - k = k + 1; - } - - a = b; - b = c; - - int temp; - temp = p; - p = q; - q = temp - q * k; - temp = r; - r = s; - s = temp - s * k; - } - - - __VERIFIER_assert(q*x + s*y == 0); - __VERIFIER_assert(p*x + r*y == a); - return a; -} diff --git a/c/nla-digbench-scaling/egcd2_unwindbound20.yml b/c/nla-digbench-scaling/egcd2_unwindbound20.yml deleted file mode 100644 index 91154c1d03b..00000000000 --- a/c/nla-digbench-scaling/egcd2_unwindbound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd2_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd2_unwindbound5.c b/c/nla-digbench-scaling/egcd2_unwindbound5.c deleted file mode 100644 index a427c991f52..00000000000 --- a/c/nla-digbench-scaling/egcd2_unwindbound5.c +++ /dev/null @@ -1,67 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int x, y; - int a, b, p, q, r, s, c, k; - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - c = 0; - k = 0; - while (counter++<5) { - if (!(b != 0)) - break; - c = a; - k = 0; - - while (counter++<5) { - __VERIFIER_assert(a == k * b + c); - __VERIFIER_assert(a == y*r + x*p); - __VERIFIER_assert(b == x * q + y * s); - __VERIFIER_assert(q*x*y + s*y*y - q*x - b*y - s*y + b == 0); - if (!(c >= b)) - break; - c = c - b; - k = k + 1; - } - - a = b; - b = c; - - int temp; - temp = p; - p = q; - q = temp - q * k; - temp = r; - r = s; - s = temp - s * k; - } - - - __VERIFIER_assert(q*x + s*y == 0); - __VERIFIER_assert(p*x + r*y == a); - return a; -} diff --git a/c/nla-digbench-scaling/egcd2_unwindbound5.yml b/c/nla-digbench-scaling/egcd2_unwindbound5.yml deleted file mode 100644 index 25db41f30b9..00000000000 --- a/c/nla-digbench-scaling/egcd2_unwindbound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd2_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd2_unwindbound50.c b/c/nla-digbench-scaling/egcd2_unwindbound50.c deleted file mode 100644 index fbeb99ac03c..00000000000 --- a/c/nla-digbench-scaling/egcd2_unwindbound50.c +++ /dev/null @@ -1,67 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int x, y; - int a, b, p, q, r, s, c, k; - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - c = 0; - k = 0; - while (counter++<50) { - if (!(b != 0)) - break; - c = a; - k = 0; - - while (counter++<50) { - __VERIFIER_assert(a == k * b + c); - __VERIFIER_assert(a == y*r + x*p); - __VERIFIER_assert(b == x * q + y * s); - __VERIFIER_assert(q*x*y + s*y*y - q*x - b*y - s*y + b == 0); - if (!(c >= b)) - break; - c = c - b; - k = k + 1; - } - - a = b; - b = c; - - int temp; - temp = p; - p = q; - q = temp - q * k; - temp = r; - r = s; - s = temp - s * k; - } - - - __VERIFIER_assert(q*x + s*y == 0); - __VERIFIER_assert(p*x + r*y == a); - return a; -} diff --git a/c/nla-digbench-scaling/egcd2_unwindbound50.yml b/c/nla-digbench-scaling/egcd2_unwindbound50.yml deleted file mode 100644 index 24f550ed5d9..00000000000 --- a/c/nla-digbench-scaling/egcd2_unwindbound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd2_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd2_valuebound1.c b/c/nla-digbench-scaling/egcd2_valuebound1.c deleted file mode 100644 index 9c778d8c43e..00000000000 --- a/c/nla-digbench-scaling/egcd2_valuebound1.c +++ /dev/null @@ -1,68 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int x, y; - int a, b, p, q, r, s, c, k; - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=1); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=1); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - c = 0; - k = 0; - while (1) { - if (!(b != 0)) - break; - c = a; - k = 0; - - while (1) { - __VERIFIER_assert(a == k * b + c); - __VERIFIER_assert(a == y*r + x*p); - __VERIFIER_assert(b == x * q + y * s); - __VERIFIER_assert(q*x*y + s*y*y - q*x - b*y - s*y + b == 0); - if (!(c >= b)) - break; - c = c - b; - k = k + 1; - } - - a = b; - b = c; - - int temp; - temp = p; - p = q; - q = temp - q * k; - temp = r; - r = s; - s = temp - s * k; - } - - - __VERIFIER_assert(q*x + s*y == 0); - __VERIFIER_assert(p*x + r*y == a); - return a; -} diff --git a/c/nla-digbench-scaling/egcd2_valuebound1.yml b/c/nla-digbench-scaling/egcd2_valuebound1.yml deleted file mode 100644 index 524cc2d10ef..00000000000 --- a/c/nla-digbench-scaling/egcd2_valuebound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd2_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd2_valuebound10.c b/c/nla-digbench-scaling/egcd2_valuebound10.c deleted file mode 100644 index 11791cdd8e9..00000000000 --- a/c/nla-digbench-scaling/egcd2_valuebound10.c +++ /dev/null @@ -1,68 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int x, y; - int a, b, p, q, r, s, c, k; - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=10); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=10); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - c = 0; - k = 0; - while (1) { - if (!(b != 0)) - break; - c = a; - k = 0; - - while (1) { - __VERIFIER_assert(a == k * b + c); - __VERIFIER_assert(a == y*r + x*p); - __VERIFIER_assert(b == x * q + y * s); - __VERIFIER_assert(q*x*y + s*y*y - q*x - b*y - s*y + b == 0); - if (!(c >= b)) - break; - c = c - b; - k = k + 1; - } - - a = b; - b = c; - - int temp; - temp = p; - p = q; - q = temp - q * k; - temp = r; - r = s; - s = temp - s * k; - } - - - __VERIFIER_assert(q*x + s*y == 0); - __VERIFIER_assert(p*x + r*y == a); - return a; -} diff --git a/c/nla-digbench-scaling/egcd2_valuebound10.yml b/c/nla-digbench-scaling/egcd2_valuebound10.yml deleted file mode 100644 index a658542adb2..00000000000 --- a/c/nla-digbench-scaling/egcd2_valuebound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd2_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd2_valuebound100.c b/c/nla-digbench-scaling/egcd2_valuebound100.c deleted file mode 100644 index 03bb32d1c98..00000000000 --- a/c/nla-digbench-scaling/egcd2_valuebound100.c +++ /dev/null @@ -1,68 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int x, y; - int a, b, p, q, r, s, c, k; - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=100); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=100); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - c = 0; - k = 0; - while (1) { - if (!(b != 0)) - break; - c = a; - k = 0; - - while (1) { - __VERIFIER_assert(a == k * b + c); - __VERIFIER_assert(a == y*r + x*p); - __VERIFIER_assert(b == x * q + y * s); - __VERIFIER_assert(q*x*y + s*y*y - q*x - b*y - s*y + b == 0); - if (!(c >= b)) - break; - c = c - b; - k = k + 1; - } - - a = b; - b = c; - - int temp; - temp = p; - p = q; - q = temp - q * k; - temp = r; - r = s; - s = temp - s * k; - } - - - __VERIFIER_assert(q*x + s*y == 0); - __VERIFIER_assert(p*x + r*y == a); - return a; -} diff --git a/c/nla-digbench-scaling/egcd2_valuebound100.yml b/c/nla-digbench-scaling/egcd2_valuebound100.yml deleted file mode 100644 index 2a501736b2b..00000000000 --- a/c/nla-digbench-scaling/egcd2_valuebound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd2_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd2_valuebound2.c b/c/nla-digbench-scaling/egcd2_valuebound2.c deleted file mode 100644 index e2b7af48a12..00000000000 --- a/c/nla-digbench-scaling/egcd2_valuebound2.c +++ /dev/null @@ -1,68 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int x, y; - int a, b, p, q, r, s, c, k; - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=2); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=2); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - c = 0; - k = 0; - while (1) { - if (!(b != 0)) - break; - c = a; - k = 0; - - while (1) { - __VERIFIER_assert(a == k * b + c); - __VERIFIER_assert(a == y*r + x*p); - __VERIFIER_assert(b == x * q + y * s); - __VERIFIER_assert(q*x*y + s*y*y - q*x - b*y - s*y + b == 0); - if (!(c >= b)) - break; - c = c - b; - k = k + 1; - } - - a = b; - b = c; - - int temp; - temp = p; - p = q; - q = temp - q * k; - temp = r; - r = s; - s = temp - s * k; - } - - - __VERIFIER_assert(q*x + s*y == 0); - __VERIFIER_assert(p*x + r*y == a); - return a; -} diff --git a/c/nla-digbench-scaling/egcd2_valuebound2.yml b/c/nla-digbench-scaling/egcd2_valuebound2.yml deleted file mode 100644 index d6532cfd004..00000000000 --- a/c/nla-digbench-scaling/egcd2_valuebound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd2_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd2_valuebound20.c b/c/nla-digbench-scaling/egcd2_valuebound20.c deleted file mode 100644 index b470e6983f1..00000000000 --- a/c/nla-digbench-scaling/egcd2_valuebound20.c +++ /dev/null @@ -1,68 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int x, y; - int a, b, p, q, r, s, c, k; - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=20); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=20); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - c = 0; - k = 0; - while (1) { - if (!(b != 0)) - break; - c = a; - k = 0; - - while (1) { - __VERIFIER_assert(a == k * b + c); - __VERIFIER_assert(a == y*r + x*p); - __VERIFIER_assert(b == x * q + y * s); - __VERIFIER_assert(q*x*y + s*y*y - q*x - b*y - s*y + b == 0); - if (!(c >= b)) - break; - c = c - b; - k = k + 1; - } - - a = b; - b = c; - - int temp; - temp = p; - p = q; - q = temp - q * k; - temp = r; - r = s; - s = temp - s * k; - } - - - __VERIFIER_assert(q*x + s*y == 0); - __VERIFIER_assert(p*x + r*y == a); - return a; -} diff --git a/c/nla-digbench-scaling/egcd2_valuebound20.yml b/c/nla-digbench-scaling/egcd2_valuebound20.yml deleted file mode 100644 index e4d25dd6c61..00000000000 --- a/c/nla-digbench-scaling/egcd2_valuebound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd2_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd2_valuebound5.c b/c/nla-digbench-scaling/egcd2_valuebound5.c deleted file mode 100644 index 202ea7fcbda..00000000000 --- a/c/nla-digbench-scaling/egcd2_valuebound5.c +++ /dev/null @@ -1,68 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int x, y; - int a, b, p, q, r, s, c, k; - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=5); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=5); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - c = 0; - k = 0; - while (1) { - if (!(b != 0)) - break; - c = a; - k = 0; - - while (1) { - __VERIFIER_assert(a == k * b + c); - __VERIFIER_assert(a == y*r + x*p); - __VERIFIER_assert(b == x * q + y * s); - __VERIFIER_assert(q*x*y + s*y*y - q*x - b*y - s*y + b == 0); - if (!(c >= b)) - break; - c = c - b; - k = k + 1; - } - - a = b; - b = c; - - int temp; - temp = p; - p = q; - q = temp - q * k; - temp = r; - r = s; - s = temp - s * k; - } - - - __VERIFIER_assert(q*x + s*y == 0); - __VERIFIER_assert(p*x + r*y == a); - return a; -} diff --git a/c/nla-digbench-scaling/egcd2_valuebound5.yml b/c/nla-digbench-scaling/egcd2_valuebound5.yml deleted file mode 100644 index 639915eb87a..00000000000 --- a/c/nla-digbench-scaling/egcd2_valuebound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd2_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd2_valuebound50.c b/c/nla-digbench-scaling/egcd2_valuebound50.c deleted file mode 100644 index cf75f9cfff0..00000000000 --- a/c/nla-digbench-scaling/egcd2_valuebound50.c +++ /dev/null @@ -1,68 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int x, y; - int a, b, p, q, r, s, c, k; - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=50); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=50); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - c = 0; - k = 0; - while (1) { - if (!(b != 0)) - break; - c = a; - k = 0; - - while (1) { - __VERIFIER_assert(a == k * b + c); - __VERIFIER_assert(a == y*r + x*p); - __VERIFIER_assert(b == x * q + y * s); - __VERIFIER_assert(q*x*y + s*y*y - q*x - b*y - s*y + b == 0); - if (!(c >= b)) - break; - c = c - b; - k = k + 1; - } - - a = b; - b = c; - - int temp; - temp = p; - p = q; - q = temp - q * k; - temp = r; - r = s; - s = temp - s * k; - } - - - __VERIFIER_assert(q*x + s*y == 0); - __VERIFIER_assert(p*x + r*y == a); - return a; -} diff --git a/c/nla-digbench-scaling/egcd2_valuebound50.yml b/c/nla-digbench-scaling/egcd2_valuebound50.yml deleted file mode 100644 index 9c6dc1890bb..00000000000 --- a/c/nla-digbench-scaling/egcd2_valuebound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd2_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd3-ll_unwindbound1.c b/c/nla-digbench-scaling/egcd3-ll_unwindbound1.c new file mode 100644 index 00000000000..f1368926c7a --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_unwindbound1.c @@ -0,0 +1,75 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd3-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int x, y; + long long a, b, p, q, r, s; + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + + while (counter++<1) { + if (!(b != 0)) + break; + long long c, k; + c = a; + k = 0; + + while (counter++<1) { + if (!(c >= b)) + break; + long long d, v; + d = 1; + v = b; + + while (counter++<1) { + __VERIFIER_assert(a == y * r + x * p); + __VERIFIER_assert(b == x * q + y * s); + __VERIFIER_assert(a == k * b + c); + __VERIFIER_assert(v == b * d); + + if (!(c >= 2 * v)) + break; + d = 2 * d; + v = 2 * v; + } + c = c - v; + k = k + d; + } + + a = b; + b = c; + long long temp; + temp = p; + p = q; + q = temp - q * k; + temp = r; + r = s; + s = temp - s * k; + } + __VERIFIER_assert(p*x - q*x + r*y - s*y == a); + return 0; +} diff --git a/c/nla-digbench-scaling/egcd3-ll_unwindbound1.yml b/c/nla-digbench-scaling/egcd3-ll_unwindbound1.yml new file mode 100644 index 00000000000..c6e513fb34b --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_unwindbound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd3-ll_unwindbound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd3-ll_unwindbound10.c b/c/nla-digbench-scaling/egcd3-ll_unwindbound10.c new file mode 100644 index 00000000000..f60b37335a2 --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_unwindbound10.c @@ -0,0 +1,75 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd3-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int x, y; + long long a, b, p, q, r, s; + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + + while (counter++<10) { + if (!(b != 0)) + break; + long long c, k; + c = a; + k = 0; + + while (counter++<10) { + if (!(c >= b)) + break; + long long d, v; + d = 1; + v = b; + + while (counter++<10) { + __VERIFIER_assert(a == y * r + x * p); + __VERIFIER_assert(b == x * q + y * s); + __VERIFIER_assert(a == k * b + c); + __VERIFIER_assert(v == b * d); + + if (!(c >= 2 * v)) + break; + d = 2 * d; + v = 2 * v; + } + c = c - v; + k = k + d; + } + + a = b; + b = c; + long long temp; + temp = p; + p = q; + q = temp - q * k; + temp = r; + r = s; + s = temp - s * k; + } + __VERIFIER_assert(p*x - q*x + r*y - s*y == a); + return 0; +} diff --git a/c/nla-digbench-scaling/egcd3-ll_unwindbound10.yml b/c/nla-digbench-scaling/egcd3-ll_unwindbound10.yml new file mode 100644 index 00000000000..be7835182fc --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_unwindbound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd3-ll_unwindbound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd3-ll_unwindbound100.c b/c/nla-digbench-scaling/egcd3-ll_unwindbound100.c new file mode 100644 index 00000000000..38445d0fa66 --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_unwindbound100.c @@ -0,0 +1,75 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd3-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int x, y; + long long a, b, p, q, r, s; + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + + while (counter++<100) { + if (!(b != 0)) + break; + long long c, k; + c = a; + k = 0; + + while (counter++<100) { + if (!(c >= b)) + break; + long long d, v; + d = 1; + v = b; + + while (counter++<100) { + __VERIFIER_assert(a == y * r + x * p); + __VERIFIER_assert(b == x * q + y * s); + __VERIFIER_assert(a == k * b + c); + __VERIFIER_assert(v == b * d); + + if (!(c >= 2 * v)) + break; + d = 2 * d; + v = 2 * v; + } + c = c - v; + k = k + d; + } + + a = b; + b = c; + long long temp; + temp = p; + p = q; + q = temp - q * k; + temp = r; + r = s; + s = temp - s * k; + } + __VERIFIER_assert(p*x - q*x + r*y - s*y == a); + return 0; +} diff --git a/c/nla-digbench-scaling/egcd3-ll_unwindbound100.yml b/c/nla-digbench-scaling/egcd3-ll_unwindbound100.yml new file mode 100644 index 00000000000..1b1d0e6f2ef --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_unwindbound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd3-ll_unwindbound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd3-ll_unwindbound2.c b/c/nla-digbench-scaling/egcd3-ll_unwindbound2.c new file mode 100644 index 00000000000..2bbce602d9a --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_unwindbound2.c @@ -0,0 +1,75 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd3-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int x, y; + long long a, b, p, q, r, s; + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + + while (counter++<2) { + if (!(b != 0)) + break; + long long c, k; + c = a; + k = 0; + + while (counter++<2) { + if (!(c >= b)) + break; + long long d, v; + d = 1; + v = b; + + while (counter++<2) { + __VERIFIER_assert(a == y * r + x * p); + __VERIFIER_assert(b == x * q + y * s); + __VERIFIER_assert(a == k * b + c); + __VERIFIER_assert(v == b * d); + + if (!(c >= 2 * v)) + break; + d = 2 * d; + v = 2 * v; + } + c = c - v; + k = k + d; + } + + a = b; + b = c; + long long temp; + temp = p; + p = q; + q = temp - q * k; + temp = r; + r = s; + s = temp - s * k; + } + __VERIFIER_assert(p*x - q*x + r*y - s*y == a); + return 0; +} diff --git a/c/nla-digbench-scaling/egcd3-ll_unwindbound2.yml b/c/nla-digbench-scaling/egcd3-ll_unwindbound2.yml new file mode 100644 index 00000000000..924130e5e81 --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_unwindbound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd3-ll_unwindbound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd3-ll_unwindbound20.c b/c/nla-digbench-scaling/egcd3-ll_unwindbound20.c new file mode 100644 index 00000000000..efa6519a06e --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_unwindbound20.c @@ -0,0 +1,75 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd3-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int x, y; + long long a, b, p, q, r, s; + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + + while (counter++<20) { + if (!(b != 0)) + break; + long long c, k; + c = a; + k = 0; + + while (counter++<20) { + if (!(c >= b)) + break; + long long d, v; + d = 1; + v = b; + + while (counter++<20) { + __VERIFIER_assert(a == y * r + x * p); + __VERIFIER_assert(b == x * q + y * s); + __VERIFIER_assert(a == k * b + c); + __VERIFIER_assert(v == b * d); + + if (!(c >= 2 * v)) + break; + d = 2 * d; + v = 2 * v; + } + c = c - v; + k = k + d; + } + + a = b; + b = c; + long long temp; + temp = p; + p = q; + q = temp - q * k; + temp = r; + r = s; + s = temp - s * k; + } + __VERIFIER_assert(p*x - q*x + r*y - s*y == a); + return 0; +} diff --git a/c/nla-digbench-scaling/egcd3-ll_unwindbound20.yml b/c/nla-digbench-scaling/egcd3-ll_unwindbound20.yml new file mode 100644 index 00000000000..6a99865bed9 --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_unwindbound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd3-ll_unwindbound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd3-ll_unwindbound5.c b/c/nla-digbench-scaling/egcd3-ll_unwindbound5.c new file mode 100644 index 00000000000..194c78f9c22 --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_unwindbound5.c @@ -0,0 +1,75 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd3-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int x, y; + long long a, b, p, q, r, s; + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + + while (counter++<5) { + if (!(b != 0)) + break; + long long c, k; + c = a; + k = 0; + + while (counter++<5) { + if (!(c >= b)) + break; + long long d, v; + d = 1; + v = b; + + while (counter++<5) { + __VERIFIER_assert(a == y * r + x * p); + __VERIFIER_assert(b == x * q + y * s); + __VERIFIER_assert(a == k * b + c); + __VERIFIER_assert(v == b * d); + + if (!(c >= 2 * v)) + break; + d = 2 * d; + v = 2 * v; + } + c = c - v; + k = k + d; + } + + a = b; + b = c; + long long temp; + temp = p; + p = q; + q = temp - q * k; + temp = r; + r = s; + s = temp - s * k; + } + __VERIFIER_assert(p*x - q*x + r*y - s*y == a); + return 0; +} diff --git a/c/nla-digbench-scaling/egcd3-ll_unwindbound5.yml b/c/nla-digbench-scaling/egcd3-ll_unwindbound5.yml new file mode 100644 index 00000000000..c1521aab7da --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_unwindbound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd3-ll_unwindbound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd3-ll_unwindbound50.c b/c/nla-digbench-scaling/egcd3-ll_unwindbound50.c new file mode 100644 index 00000000000..fd77b62b169 --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_unwindbound50.c @@ -0,0 +1,75 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd3-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int x, y; + long long a, b, p, q, r, s; + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + + while (counter++<50) { + if (!(b != 0)) + break; + long long c, k; + c = a; + k = 0; + + while (counter++<50) { + if (!(c >= b)) + break; + long long d, v; + d = 1; + v = b; + + while (counter++<50) { + __VERIFIER_assert(a == y * r + x * p); + __VERIFIER_assert(b == x * q + y * s); + __VERIFIER_assert(a == k * b + c); + __VERIFIER_assert(v == b * d); + + if (!(c >= 2 * v)) + break; + d = 2 * d; + v = 2 * v; + } + c = c - v; + k = k + d; + } + + a = b; + b = c; + long long temp; + temp = p; + p = q; + q = temp - q * k; + temp = r; + r = s; + s = temp - s * k; + } + __VERIFIER_assert(p*x - q*x + r*y - s*y == a); + return 0; +} diff --git a/c/nla-digbench-scaling/egcd3-ll_unwindbound50.yml b/c/nla-digbench-scaling/egcd3-ll_unwindbound50.yml new file mode 100644 index 00000000000..c5f603e1f71 --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_unwindbound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd3-ll_unwindbound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd3-ll_valuebound1.c b/c/nla-digbench-scaling/egcd3-ll_valuebound1.c new file mode 100644 index 00000000000..10911d6e8c5 --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_valuebound1.c @@ -0,0 +1,76 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd3-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int x, y; + long long a, b, p, q, r, s; + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=1); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=1); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + + while (1) { + if (!(b != 0)) + break; + long long c, k; + c = a; + k = 0; + + while (1) { + if (!(c >= b)) + break; + long long d, v; + d = 1; + v = b; + + while (1) { + __VERIFIER_assert(a == y * r + x * p); + __VERIFIER_assert(b == x * q + y * s); + __VERIFIER_assert(a == k * b + c); + __VERIFIER_assert(v == b * d); + + if (!(c >= 2 * v)) + break; + d = 2 * d; + v = 2 * v; + } + c = c - v; + k = k + d; + } + + a = b; + b = c; + long long temp; + temp = p; + p = q; + q = temp - q * k; + temp = r; + r = s; + s = temp - s * k; + } + __VERIFIER_assert(p*x - q*x + r*y - s*y == a); + return 0; +} diff --git a/c/nla-digbench-scaling/egcd3-ll_valuebound1.yml b/c/nla-digbench-scaling/egcd3-ll_valuebound1.yml new file mode 100644 index 00000000000..b199ee53a5a --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_valuebound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd3-ll_valuebound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd3-ll_valuebound10.c b/c/nla-digbench-scaling/egcd3-ll_valuebound10.c new file mode 100644 index 00000000000..4586dc53773 --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_valuebound10.c @@ -0,0 +1,76 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd3-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int x, y; + long long a, b, p, q, r, s; + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=10); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=10); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + + while (1) { + if (!(b != 0)) + break; + long long c, k; + c = a; + k = 0; + + while (1) { + if (!(c >= b)) + break; + long long d, v; + d = 1; + v = b; + + while (1) { + __VERIFIER_assert(a == y * r + x * p); + __VERIFIER_assert(b == x * q + y * s); + __VERIFIER_assert(a == k * b + c); + __VERIFIER_assert(v == b * d); + + if (!(c >= 2 * v)) + break; + d = 2 * d; + v = 2 * v; + } + c = c - v; + k = k + d; + } + + a = b; + b = c; + long long temp; + temp = p; + p = q; + q = temp - q * k; + temp = r; + r = s; + s = temp - s * k; + } + __VERIFIER_assert(p*x - q*x + r*y - s*y == a); + return 0; +} diff --git a/c/nla-digbench-scaling/egcd3-ll_valuebound10.yml b/c/nla-digbench-scaling/egcd3-ll_valuebound10.yml new file mode 100644 index 00000000000..efe9ebf4f96 --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_valuebound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd3-ll_valuebound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd3-ll_valuebound100.c b/c/nla-digbench-scaling/egcd3-ll_valuebound100.c new file mode 100644 index 00000000000..7f5c519efc1 --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_valuebound100.c @@ -0,0 +1,76 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd3-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int x, y; + long long a, b, p, q, r, s; + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=100); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=100); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + + while (1) { + if (!(b != 0)) + break; + long long c, k; + c = a; + k = 0; + + while (1) { + if (!(c >= b)) + break; + long long d, v; + d = 1; + v = b; + + while (1) { + __VERIFIER_assert(a == y * r + x * p); + __VERIFIER_assert(b == x * q + y * s); + __VERIFIER_assert(a == k * b + c); + __VERIFIER_assert(v == b * d); + + if (!(c >= 2 * v)) + break; + d = 2 * d; + v = 2 * v; + } + c = c - v; + k = k + d; + } + + a = b; + b = c; + long long temp; + temp = p; + p = q; + q = temp - q * k; + temp = r; + r = s; + s = temp - s * k; + } + __VERIFIER_assert(p*x - q*x + r*y - s*y == a); + return 0; +} diff --git a/c/nla-digbench-scaling/egcd3-ll_valuebound100.yml b/c/nla-digbench-scaling/egcd3-ll_valuebound100.yml new file mode 100644 index 00000000000..abee9fa94aa --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_valuebound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd3-ll_valuebound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd3-ll_valuebound2.c b/c/nla-digbench-scaling/egcd3-ll_valuebound2.c new file mode 100644 index 00000000000..bf0cba80be2 --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_valuebound2.c @@ -0,0 +1,76 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd3-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int x, y; + long long a, b, p, q, r, s; + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=2); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=2); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + + while (1) { + if (!(b != 0)) + break; + long long c, k; + c = a; + k = 0; + + while (1) { + if (!(c >= b)) + break; + long long d, v; + d = 1; + v = b; + + while (1) { + __VERIFIER_assert(a == y * r + x * p); + __VERIFIER_assert(b == x * q + y * s); + __VERIFIER_assert(a == k * b + c); + __VERIFIER_assert(v == b * d); + + if (!(c >= 2 * v)) + break; + d = 2 * d; + v = 2 * v; + } + c = c - v; + k = k + d; + } + + a = b; + b = c; + long long temp; + temp = p; + p = q; + q = temp - q * k; + temp = r; + r = s; + s = temp - s * k; + } + __VERIFIER_assert(p*x - q*x + r*y - s*y == a); + return 0; +} diff --git a/c/nla-digbench-scaling/egcd3-ll_valuebound2.yml b/c/nla-digbench-scaling/egcd3-ll_valuebound2.yml new file mode 100644 index 00000000000..b31a88316eb --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_valuebound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd3-ll_valuebound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd3-ll_valuebound20.c b/c/nla-digbench-scaling/egcd3-ll_valuebound20.c new file mode 100644 index 00000000000..96a53d91a79 --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_valuebound20.c @@ -0,0 +1,76 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd3-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int x, y; + long long a, b, p, q, r, s; + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=20); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=20); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + + while (1) { + if (!(b != 0)) + break; + long long c, k; + c = a; + k = 0; + + while (1) { + if (!(c >= b)) + break; + long long d, v; + d = 1; + v = b; + + while (1) { + __VERIFIER_assert(a == y * r + x * p); + __VERIFIER_assert(b == x * q + y * s); + __VERIFIER_assert(a == k * b + c); + __VERIFIER_assert(v == b * d); + + if (!(c >= 2 * v)) + break; + d = 2 * d; + v = 2 * v; + } + c = c - v; + k = k + d; + } + + a = b; + b = c; + long long temp; + temp = p; + p = q; + q = temp - q * k; + temp = r; + r = s; + s = temp - s * k; + } + __VERIFIER_assert(p*x - q*x + r*y - s*y == a); + return 0; +} diff --git a/c/nla-digbench-scaling/egcd3-ll_valuebound20.yml b/c/nla-digbench-scaling/egcd3-ll_valuebound20.yml new file mode 100644 index 00000000000..0f8337ed689 --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_valuebound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd3-ll_valuebound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd3-ll_valuebound5.c b/c/nla-digbench-scaling/egcd3-ll_valuebound5.c new file mode 100644 index 00000000000..d8d9d8a8096 --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_valuebound5.c @@ -0,0 +1,76 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd3-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int x, y; + long long a, b, p, q, r, s; + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=5); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=5); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + + while (1) { + if (!(b != 0)) + break; + long long c, k; + c = a; + k = 0; + + while (1) { + if (!(c >= b)) + break; + long long d, v; + d = 1; + v = b; + + while (1) { + __VERIFIER_assert(a == y * r + x * p); + __VERIFIER_assert(b == x * q + y * s); + __VERIFIER_assert(a == k * b + c); + __VERIFIER_assert(v == b * d); + + if (!(c >= 2 * v)) + break; + d = 2 * d; + v = 2 * v; + } + c = c - v; + k = k + d; + } + + a = b; + b = c; + long long temp; + temp = p; + p = q; + q = temp - q * k; + temp = r; + r = s; + s = temp - s * k; + } + __VERIFIER_assert(p*x - q*x + r*y - s*y == a); + return 0; +} diff --git a/c/nla-digbench-scaling/egcd3-ll_valuebound5.yml b/c/nla-digbench-scaling/egcd3-ll_valuebound5.yml new file mode 100644 index 00000000000..84aff304d55 --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_valuebound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd3-ll_valuebound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd3-ll_valuebound50.c b/c/nla-digbench-scaling/egcd3-ll_valuebound50.c new file mode 100644 index 00000000000..fbaa56f2cd0 --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_valuebound50.c @@ -0,0 +1,76 @@ +/* extended Euclid's algorithm */ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "egcd3-ll.c", 4, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int x, y; + long long a, b, p, q, r, s; + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=50); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=50); + assume_abort_if_not(x >= 1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + r = 0; + s = 1; + + while (1) { + if (!(b != 0)) + break; + long long c, k; + c = a; + k = 0; + + while (1) { + if (!(c >= b)) + break; + long long d, v; + d = 1; + v = b; + + while (1) { + __VERIFIER_assert(a == y * r + x * p); + __VERIFIER_assert(b == x * q + y * s); + __VERIFIER_assert(a == k * b + c); + __VERIFIER_assert(v == b * d); + + if (!(c >= 2 * v)) + break; + d = 2 * d; + v = 2 * v; + } + c = c - v; + k = k + d; + } + + a = b; + b = c; + long long temp; + temp = p; + p = q; + q = temp - q * k; + temp = r; + r = s; + s = temp - s * k; + } + __VERIFIER_assert(p*x - q*x + r*y - s*y == a); + return 0; +} diff --git a/c/nla-digbench-scaling/egcd3-ll_valuebound50.yml b/c/nla-digbench-scaling/egcd3-ll_valuebound50.yml new file mode 100644 index 00000000000..d19937d7ced --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_valuebound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'egcd3-ll_valuebound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd3_unwindbound1.c b/c/nla-digbench-scaling/egcd3_unwindbound1.c deleted file mode 100644 index d6fa12871a7..00000000000 --- a/c/nla-digbench-scaling/egcd3_unwindbound1.c +++ /dev/null @@ -1,74 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int x, y; - int a, b, p, q, r, s; - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - - while (counter++<1) { - if (!(b != 0)) - break; - int c, k; - c = a; - k = 0; - - while (counter++<1) { - if (!(c >= b)) - break; - int d, v; - d = 1; - v = b; - - while (counter++<1) { - __VERIFIER_assert(a == y * r + x * p); - __VERIFIER_assert(b == x * q + y * s); - __VERIFIER_assert(a == k * b + c); - __VERIFIER_assert(v == b * d); - - if (!(c >= 2 * v)) - break; - d = 2 * d; - v = 2 * v; - } - c = c - v; - k = k + d; - } - - a = b; - b = c; - int temp; - temp = p; - p = q; - q = temp - q * k; - temp = r; - r = s; - s = temp - s * k; - } - __VERIFIER_assert(p*x - q*x + r*y - s*y == a); - return 0; -} diff --git a/c/nla-digbench-scaling/egcd3_unwindbound1.yml b/c/nla-digbench-scaling/egcd3_unwindbound1.yml deleted file mode 100644 index b7d5656d71a..00000000000 --- a/c/nla-digbench-scaling/egcd3_unwindbound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd3_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd3_unwindbound10.c b/c/nla-digbench-scaling/egcd3_unwindbound10.c deleted file mode 100644 index 7aaf105c832..00000000000 --- a/c/nla-digbench-scaling/egcd3_unwindbound10.c +++ /dev/null @@ -1,74 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int x, y; - int a, b, p, q, r, s; - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - - while (counter++<10) { - if (!(b != 0)) - break; - int c, k; - c = a; - k = 0; - - while (counter++<10) { - if (!(c >= b)) - break; - int d, v; - d = 1; - v = b; - - while (counter++<10) { - __VERIFIER_assert(a == y * r + x * p); - __VERIFIER_assert(b == x * q + y * s); - __VERIFIER_assert(a == k * b + c); - __VERIFIER_assert(v == b * d); - - if (!(c >= 2 * v)) - break; - d = 2 * d; - v = 2 * v; - } - c = c - v; - k = k + d; - } - - a = b; - b = c; - int temp; - temp = p; - p = q; - q = temp - q * k; - temp = r; - r = s; - s = temp - s * k; - } - __VERIFIER_assert(p*x - q*x + r*y - s*y == a); - return 0; -} diff --git a/c/nla-digbench-scaling/egcd3_unwindbound10.yml b/c/nla-digbench-scaling/egcd3_unwindbound10.yml deleted file mode 100644 index 874e61b9093..00000000000 --- a/c/nla-digbench-scaling/egcd3_unwindbound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd3_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd3_unwindbound100.c b/c/nla-digbench-scaling/egcd3_unwindbound100.c deleted file mode 100644 index abdcd8c61e5..00000000000 --- a/c/nla-digbench-scaling/egcd3_unwindbound100.c +++ /dev/null @@ -1,74 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int x, y; - int a, b, p, q, r, s; - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - - while (counter++<100) { - if (!(b != 0)) - break; - int c, k; - c = a; - k = 0; - - while (counter++<100) { - if (!(c >= b)) - break; - int d, v; - d = 1; - v = b; - - while (counter++<100) { - __VERIFIER_assert(a == y * r + x * p); - __VERIFIER_assert(b == x * q + y * s); - __VERIFIER_assert(a == k * b + c); - __VERIFIER_assert(v == b * d); - - if (!(c >= 2 * v)) - break; - d = 2 * d; - v = 2 * v; - } - c = c - v; - k = k + d; - } - - a = b; - b = c; - int temp; - temp = p; - p = q; - q = temp - q * k; - temp = r; - r = s; - s = temp - s * k; - } - __VERIFIER_assert(p*x - q*x + r*y - s*y == a); - return 0; -} diff --git a/c/nla-digbench-scaling/egcd3_unwindbound100.yml b/c/nla-digbench-scaling/egcd3_unwindbound100.yml deleted file mode 100644 index 0576b05a4e8..00000000000 --- a/c/nla-digbench-scaling/egcd3_unwindbound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd3_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd3_unwindbound2.c b/c/nla-digbench-scaling/egcd3_unwindbound2.c deleted file mode 100644 index 2d0a3e0d02c..00000000000 --- a/c/nla-digbench-scaling/egcd3_unwindbound2.c +++ /dev/null @@ -1,74 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int x, y; - int a, b, p, q, r, s; - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - - while (counter++<2) { - if (!(b != 0)) - break; - int c, k; - c = a; - k = 0; - - while (counter++<2) { - if (!(c >= b)) - break; - int d, v; - d = 1; - v = b; - - while (counter++<2) { - __VERIFIER_assert(a == y * r + x * p); - __VERIFIER_assert(b == x * q + y * s); - __VERIFIER_assert(a == k * b + c); - __VERIFIER_assert(v == b * d); - - if (!(c >= 2 * v)) - break; - d = 2 * d; - v = 2 * v; - } - c = c - v; - k = k + d; - } - - a = b; - b = c; - int temp; - temp = p; - p = q; - q = temp - q * k; - temp = r; - r = s; - s = temp - s * k; - } - __VERIFIER_assert(p*x - q*x + r*y - s*y == a); - return 0; -} diff --git a/c/nla-digbench-scaling/egcd3_unwindbound2.yml b/c/nla-digbench-scaling/egcd3_unwindbound2.yml deleted file mode 100644 index f9a376b9cbe..00000000000 --- a/c/nla-digbench-scaling/egcd3_unwindbound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd3_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd3_unwindbound20.c b/c/nla-digbench-scaling/egcd3_unwindbound20.c deleted file mode 100644 index d07dd20c88f..00000000000 --- a/c/nla-digbench-scaling/egcd3_unwindbound20.c +++ /dev/null @@ -1,74 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int x, y; - int a, b, p, q, r, s; - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - - while (counter++<20) { - if (!(b != 0)) - break; - int c, k; - c = a; - k = 0; - - while (counter++<20) { - if (!(c >= b)) - break; - int d, v; - d = 1; - v = b; - - while (counter++<20) { - __VERIFIER_assert(a == y * r + x * p); - __VERIFIER_assert(b == x * q + y * s); - __VERIFIER_assert(a == k * b + c); - __VERIFIER_assert(v == b * d); - - if (!(c >= 2 * v)) - break; - d = 2 * d; - v = 2 * v; - } - c = c - v; - k = k + d; - } - - a = b; - b = c; - int temp; - temp = p; - p = q; - q = temp - q * k; - temp = r; - r = s; - s = temp - s * k; - } - __VERIFIER_assert(p*x - q*x + r*y - s*y == a); - return 0; -} diff --git a/c/nla-digbench-scaling/egcd3_unwindbound20.yml b/c/nla-digbench-scaling/egcd3_unwindbound20.yml deleted file mode 100644 index 36563cbd458..00000000000 --- a/c/nla-digbench-scaling/egcd3_unwindbound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd3_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd3_unwindbound5.c b/c/nla-digbench-scaling/egcd3_unwindbound5.c deleted file mode 100644 index 403af855779..00000000000 --- a/c/nla-digbench-scaling/egcd3_unwindbound5.c +++ /dev/null @@ -1,74 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int x, y; - int a, b, p, q, r, s; - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - - while (counter++<5) { - if (!(b != 0)) - break; - int c, k; - c = a; - k = 0; - - while (counter++<5) { - if (!(c >= b)) - break; - int d, v; - d = 1; - v = b; - - while (counter++<5) { - __VERIFIER_assert(a == y * r + x * p); - __VERIFIER_assert(b == x * q + y * s); - __VERIFIER_assert(a == k * b + c); - __VERIFIER_assert(v == b * d); - - if (!(c >= 2 * v)) - break; - d = 2 * d; - v = 2 * v; - } - c = c - v; - k = k + d; - } - - a = b; - b = c; - int temp; - temp = p; - p = q; - q = temp - q * k; - temp = r; - r = s; - s = temp - s * k; - } - __VERIFIER_assert(p*x - q*x + r*y - s*y == a); - return 0; -} diff --git a/c/nla-digbench-scaling/egcd3_unwindbound5.yml b/c/nla-digbench-scaling/egcd3_unwindbound5.yml deleted file mode 100644 index ba3ebdae077..00000000000 --- a/c/nla-digbench-scaling/egcd3_unwindbound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd3_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd3_unwindbound50.c b/c/nla-digbench-scaling/egcd3_unwindbound50.c deleted file mode 100644 index d5e63bb38b2..00000000000 --- a/c/nla-digbench-scaling/egcd3_unwindbound50.c +++ /dev/null @@ -1,74 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int x, y; - int a, b, p, q, r, s; - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - - while (counter++<50) { - if (!(b != 0)) - break; - int c, k; - c = a; - k = 0; - - while (counter++<50) { - if (!(c >= b)) - break; - int d, v; - d = 1; - v = b; - - while (counter++<50) { - __VERIFIER_assert(a == y * r + x * p); - __VERIFIER_assert(b == x * q + y * s); - __VERIFIER_assert(a == k * b + c); - __VERIFIER_assert(v == b * d); - - if (!(c >= 2 * v)) - break; - d = 2 * d; - v = 2 * v; - } - c = c - v; - k = k + d; - } - - a = b; - b = c; - int temp; - temp = p; - p = q; - q = temp - q * k; - temp = r; - r = s; - s = temp - s * k; - } - __VERIFIER_assert(p*x - q*x + r*y - s*y == a); - return 0; -} diff --git a/c/nla-digbench-scaling/egcd3_unwindbound50.yml b/c/nla-digbench-scaling/egcd3_unwindbound50.yml deleted file mode 100644 index bc72dc1336e..00000000000 --- a/c/nla-digbench-scaling/egcd3_unwindbound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd3_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd3_valuebound1.c b/c/nla-digbench-scaling/egcd3_valuebound1.c deleted file mode 100644 index 5a08530100c..00000000000 --- a/c/nla-digbench-scaling/egcd3_valuebound1.c +++ /dev/null @@ -1,75 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int x, y; - int a, b, p, q, r, s; - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=1); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=1); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - - while (1) { - if (!(b != 0)) - break; - int c, k; - c = a; - k = 0; - - while (1) { - if (!(c >= b)) - break; - int d, v; - d = 1; - v = b; - - while (1) { - __VERIFIER_assert(a == y * r + x * p); - __VERIFIER_assert(b == x * q + y * s); - __VERIFIER_assert(a == k * b + c); - __VERIFIER_assert(v == b * d); - - if (!(c >= 2 * v)) - break; - d = 2 * d; - v = 2 * v; - } - c = c - v; - k = k + d; - } - - a = b; - b = c; - int temp; - temp = p; - p = q; - q = temp - q * k; - temp = r; - r = s; - s = temp - s * k; - } - __VERIFIER_assert(p*x - q*x + r*y - s*y == a); - return 0; -} diff --git a/c/nla-digbench-scaling/egcd3_valuebound1.yml b/c/nla-digbench-scaling/egcd3_valuebound1.yml deleted file mode 100644 index da7a603f18d..00000000000 --- a/c/nla-digbench-scaling/egcd3_valuebound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd3_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd3_valuebound10.c b/c/nla-digbench-scaling/egcd3_valuebound10.c deleted file mode 100644 index 77bbc7d9094..00000000000 --- a/c/nla-digbench-scaling/egcd3_valuebound10.c +++ /dev/null @@ -1,75 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int x, y; - int a, b, p, q, r, s; - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=10); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=10); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - - while (1) { - if (!(b != 0)) - break; - int c, k; - c = a; - k = 0; - - while (1) { - if (!(c >= b)) - break; - int d, v; - d = 1; - v = b; - - while (1) { - __VERIFIER_assert(a == y * r + x * p); - __VERIFIER_assert(b == x * q + y * s); - __VERIFIER_assert(a == k * b + c); - __VERIFIER_assert(v == b * d); - - if (!(c >= 2 * v)) - break; - d = 2 * d; - v = 2 * v; - } - c = c - v; - k = k + d; - } - - a = b; - b = c; - int temp; - temp = p; - p = q; - q = temp - q * k; - temp = r; - r = s; - s = temp - s * k; - } - __VERIFIER_assert(p*x - q*x + r*y - s*y == a); - return 0; -} diff --git a/c/nla-digbench-scaling/egcd3_valuebound10.yml b/c/nla-digbench-scaling/egcd3_valuebound10.yml deleted file mode 100644 index be63b2d3781..00000000000 --- a/c/nla-digbench-scaling/egcd3_valuebound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd3_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd3_valuebound100.c b/c/nla-digbench-scaling/egcd3_valuebound100.c deleted file mode 100644 index f439725669a..00000000000 --- a/c/nla-digbench-scaling/egcd3_valuebound100.c +++ /dev/null @@ -1,75 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int x, y; - int a, b, p, q, r, s; - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=100); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=100); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - - while (1) { - if (!(b != 0)) - break; - int c, k; - c = a; - k = 0; - - while (1) { - if (!(c >= b)) - break; - int d, v; - d = 1; - v = b; - - while (1) { - __VERIFIER_assert(a == y * r + x * p); - __VERIFIER_assert(b == x * q + y * s); - __VERIFIER_assert(a == k * b + c); - __VERIFIER_assert(v == b * d); - - if (!(c >= 2 * v)) - break; - d = 2 * d; - v = 2 * v; - } - c = c - v; - k = k + d; - } - - a = b; - b = c; - int temp; - temp = p; - p = q; - q = temp - q * k; - temp = r; - r = s; - s = temp - s * k; - } - __VERIFIER_assert(p*x - q*x + r*y - s*y == a); - return 0; -} diff --git a/c/nla-digbench-scaling/egcd3_valuebound100.yml b/c/nla-digbench-scaling/egcd3_valuebound100.yml deleted file mode 100644 index b0e89e43d7a..00000000000 --- a/c/nla-digbench-scaling/egcd3_valuebound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd3_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd3_valuebound2.c b/c/nla-digbench-scaling/egcd3_valuebound2.c deleted file mode 100644 index a18676a986e..00000000000 --- a/c/nla-digbench-scaling/egcd3_valuebound2.c +++ /dev/null @@ -1,75 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int x, y; - int a, b, p, q, r, s; - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=2); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=2); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - - while (1) { - if (!(b != 0)) - break; - int c, k; - c = a; - k = 0; - - while (1) { - if (!(c >= b)) - break; - int d, v; - d = 1; - v = b; - - while (1) { - __VERIFIER_assert(a == y * r + x * p); - __VERIFIER_assert(b == x * q + y * s); - __VERIFIER_assert(a == k * b + c); - __VERIFIER_assert(v == b * d); - - if (!(c >= 2 * v)) - break; - d = 2 * d; - v = 2 * v; - } - c = c - v; - k = k + d; - } - - a = b; - b = c; - int temp; - temp = p; - p = q; - q = temp - q * k; - temp = r; - r = s; - s = temp - s * k; - } - __VERIFIER_assert(p*x - q*x + r*y - s*y == a); - return 0; -} diff --git a/c/nla-digbench-scaling/egcd3_valuebound2.yml b/c/nla-digbench-scaling/egcd3_valuebound2.yml deleted file mode 100644 index 61033ad8642..00000000000 --- a/c/nla-digbench-scaling/egcd3_valuebound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd3_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd3_valuebound20.c b/c/nla-digbench-scaling/egcd3_valuebound20.c deleted file mode 100644 index 732991a80fe..00000000000 --- a/c/nla-digbench-scaling/egcd3_valuebound20.c +++ /dev/null @@ -1,75 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int x, y; - int a, b, p, q, r, s; - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=20); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=20); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - - while (1) { - if (!(b != 0)) - break; - int c, k; - c = a; - k = 0; - - while (1) { - if (!(c >= b)) - break; - int d, v; - d = 1; - v = b; - - while (1) { - __VERIFIER_assert(a == y * r + x * p); - __VERIFIER_assert(b == x * q + y * s); - __VERIFIER_assert(a == k * b + c); - __VERIFIER_assert(v == b * d); - - if (!(c >= 2 * v)) - break; - d = 2 * d; - v = 2 * v; - } - c = c - v; - k = k + d; - } - - a = b; - b = c; - int temp; - temp = p; - p = q; - q = temp - q * k; - temp = r; - r = s; - s = temp - s * k; - } - __VERIFIER_assert(p*x - q*x + r*y - s*y == a); - return 0; -} diff --git a/c/nla-digbench-scaling/egcd3_valuebound20.yml b/c/nla-digbench-scaling/egcd3_valuebound20.yml deleted file mode 100644 index 916072190b7..00000000000 --- a/c/nla-digbench-scaling/egcd3_valuebound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd3_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd3_valuebound5.c b/c/nla-digbench-scaling/egcd3_valuebound5.c deleted file mode 100644 index 9750250b7a4..00000000000 --- a/c/nla-digbench-scaling/egcd3_valuebound5.c +++ /dev/null @@ -1,75 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int x, y; - int a, b, p, q, r, s; - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=5); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=5); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - - while (1) { - if (!(b != 0)) - break; - int c, k; - c = a; - k = 0; - - while (1) { - if (!(c >= b)) - break; - int d, v; - d = 1; - v = b; - - while (1) { - __VERIFIER_assert(a == y * r + x * p); - __VERIFIER_assert(b == x * q + y * s); - __VERIFIER_assert(a == k * b + c); - __VERIFIER_assert(v == b * d); - - if (!(c >= 2 * v)) - break; - d = 2 * d; - v = 2 * v; - } - c = c - v; - k = k + d; - } - - a = b; - b = c; - int temp; - temp = p; - p = q; - q = temp - q * k; - temp = r; - r = s; - s = temp - s * k; - } - __VERIFIER_assert(p*x - q*x + r*y - s*y == a); - return 0; -} diff --git a/c/nla-digbench-scaling/egcd3_valuebound5.yml b/c/nla-digbench-scaling/egcd3_valuebound5.yml deleted file mode 100644 index b0aca395a60..00000000000 --- a/c/nla-digbench-scaling/egcd3_valuebound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd3_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd3_valuebound50.c b/c/nla-digbench-scaling/egcd3_valuebound50.c deleted file mode 100644 index d93c3f1de11..00000000000 --- a/c/nla-digbench-scaling/egcd3_valuebound50.c +++ /dev/null @@ -1,75 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int x, y; - int a, b, p, q, r, s; - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=50); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=50); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - - while (1) { - if (!(b != 0)) - break; - int c, k; - c = a; - k = 0; - - while (1) { - if (!(c >= b)) - break; - int d, v; - d = 1; - v = b; - - while (1) { - __VERIFIER_assert(a == y * r + x * p); - __VERIFIER_assert(b == x * q + y * s); - __VERIFIER_assert(a == k * b + c); - __VERIFIER_assert(v == b * d); - - if (!(c >= 2 * v)) - break; - d = 2 * d; - v = 2 * v; - } - c = c - v; - k = k + d; - } - - a = b; - b = c; - int temp; - temp = p; - p = q; - q = temp - q * k; - temp = r; - r = s; - s = temp - s * k; - } - __VERIFIER_assert(p*x - q*x + r*y - s*y == a); - return 0; -} diff --git a/c/nla-digbench-scaling/egcd3_valuebound50.yml b/c/nla-digbench-scaling/egcd3_valuebound50.yml deleted file mode 100644 index f146f1aa022..00000000000 --- a/c/nla-digbench-scaling/egcd3_valuebound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd3_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd_unwindbound1.c b/c/nla-digbench-scaling/egcd_unwindbound1.c deleted file mode 100644 index 5d60e19d01e..00000000000 --- a/c/nla-digbench-scaling/egcd_unwindbound1.c +++ /dev/null @@ -1,57 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int a, b, p, q, r, s; - int x, y; - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - - while (counter++<1) { - __VERIFIER_assert(1 == p * s - r * q); - __VERIFIER_assert(a == y * r + x * p); - __VERIFIER_assert(b == x * q + y * s); - - if (!(a != b)) - break; - - if (a > b) { - a = a - b; - p = p - q; - r = r - s; - } else { - b = b - a; - q = q - p; - s = s - r; - } - } - - __VERIFIER_assert(a - b == 0); - __VERIFIER_assert(p*x + r*y - b == 0); - __VERIFIER_assert(q*r - p*s + 1 == 0); - __VERIFIER_assert(q*x + s*y - b == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/egcd_unwindbound1.yml b/c/nla-digbench-scaling/egcd_unwindbound1.yml deleted file mode 100644 index 1125a28e3af..00000000000 --- a/c/nla-digbench-scaling/egcd_unwindbound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd_unwindbound10.c b/c/nla-digbench-scaling/egcd_unwindbound10.c deleted file mode 100644 index baf146ae4b5..00000000000 --- a/c/nla-digbench-scaling/egcd_unwindbound10.c +++ /dev/null @@ -1,57 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int a, b, p, q, r, s; - int x, y; - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - - while (counter++<10) { - __VERIFIER_assert(1 == p * s - r * q); - __VERIFIER_assert(a == y * r + x * p); - __VERIFIER_assert(b == x * q + y * s); - - if (!(a != b)) - break; - - if (a > b) { - a = a - b; - p = p - q; - r = r - s; - } else { - b = b - a; - q = q - p; - s = s - r; - } - } - - __VERIFIER_assert(a - b == 0); - __VERIFIER_assert(p*x + r*y - b == 0); - __VERIFIER_assert(q*r - p*s + 1 == 0); - __VERIFIER_assert(q*x + s*y - b == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/egcd_unwindbound10.yml b/c/nla-digbench-scaling/egcd_unwindbound10.yml deleted file mode 100644 index 1c43d8a42b3..00000000000 --- a/c/nla-digbench-scaling/egcd_unwindbound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd_unwindbound100.c b/c/nla-digbench-scaling/egcd_unwindbound100.c deleted file mode 100644 index d46464db929..00000000000 --- a/c/nla-digbench-scaling/egcd_unwindbound100.c +++ /dev/null @@ -1,57 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int a, b, p, q, r, s; - int x, y; - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - - while (counter++<100) { - __VERIFIER_assert(1 == p * s - r * q); - __VERIFIER_assert(a == y * r + x * p); - __VERIFIER_assert(b == x * q + y * s); - - if (!(a != b)) - break; - - if (a > b) { - a = a - b; - p = p - q; - r = r - s; - } else { - b = b - a; - q = q - p; - s = s - r; - } - } - - __VERIFIER_assert(a - b == 0); - __VERIFIER_assert(p*x + r*y - b == 0); - __VERIFIER_assert(q*r - p*s + 1 == 0); - __VERIFIER_assert(q*x + s*y - b == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/egcd_unwindbound100.yml b/c/nla-digbench-scaling/egcd_unwindbound100.yml deleted file mode 100644 index 1ed61042898..00000000000 --- a/c/nla-digbench-scaling/egcd_unwindbound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd_unwindbound2.c b/c/nla-digbench-scaling/egcd_unwindbound2.c deleted file mode 100644 index f1b3105c4de..00000000000 --- a/c/nla-digbench-scaling/egcd_unwindbound2.c +++ /dev/null @@ -1,57 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int a, b, p, q, r, s; - int x, y; - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - - while (counter++<2) { - __VERIFIER_assert(1 == p * s - r * q); - __VERIFIER_assert(a == y * r + x * p); - __VERIFIER_assert(b == x * q + y * s); - - if (!(a != b)) - break; - - if (a > b) { - a = a - b; - p = p - q; - r = r - s; - } else { - b = b - a; - q = q - p; - s = s - r; - } - } - - __VERIFIER_assert(a - b == 0); - __VERIFIER_assert(p*x + r*y - b == 0); - __VERIFIER_assert(q*r - p*s + 1 == 0); - __VERIFIER_assert(q*x + s*y - b == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/egcd_unwindbound2.yml b/c/nla-digbench-scaling/egcd_unwindbound2.yml deleted file mode 100644 index e12d396b746..00000000000 --- a/c/nla-digbench-scaling/egcd_unwindbound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd_unwindbound20.c b/c/nla-digbench-scaling/egcd_unwindbound20.c deleted file mode 100644 index 7ab64cbb68b..00000000000 --- a/c/nla-digbench-scaling/egcd_unwindbound20.c +++ /dev/null @@ -1,57 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int a, b, p, q, r, s; - int x, y; - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - - while (counter++<20) { - __VERIFIER_assert(1 == p * s - r * q); - __VERIFIER_assert(a == y * r + x * p); - __VERIFIER_assert(b == x * q + y * s); - - if (!(a != b)) - break; - - if (a > b) { - a = a - b; - p = p - q; - r = r - s; - } else { - b = b - a; - q = q - p; - s = s - r; - } - } - - __VERIFIER_assert(a - b == 0); - __VERIFIER_assert(p*x + r*y - b == 0); - __VERIFIER_assert(q*r - p*s + 1 == 0); - __VERIFIER_assert(q*x + s*y - b == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/egcd_unwindbound20.yml b/c/nla-digbench-scaling/egcd_unwindbound20.yml deleted file mode 100644 index 493e9c89017..00000000000 --- a/c/nla-digbench-scaling/egcd_unwindbound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd_unwindbound5.c b/c/nla-digbench-scaling/egcd_unwindbound5.c deleted file mode 100644 index 7967a9ef8ba..00000000000 --- a/c/nla-digbench-scaling/egcd_unwindbound5.c +++ /dev/null @@ -1,57 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int a, b, p, q, r, s; - int x, y; - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - - while (counter++<5) { - __VERIFIER_assert(1 == p * s - r * q); - __VERIFIER_assert(a == y * r + x * p); - __VERIFIER_assert(b == x * q + y * s); - - if (!(a != b)) - break; - - if (a > b) { - a = a - b; - p = p - q; - r = r - s; - } else { - b = b - a; - q = q - p; - s = s - r; - } - } - - __VERIFIER_assert(a - b == 0); - __VERIFIER_assert(p*x + r*y - b == 0); - __VERIFIER_assert(q*r - p*s + 1 == 0); - __VERIFIER_assert(q*x + s*y - b == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/egcd_unwindbound5.yml b/c/nla-digbench-scaling/egcd_unwindbound5.yml deleted file mode 100644 index 5062ce2b5a2..00000000000 --- a/c/nla-digbench-scaling/egcd_unwindbound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd_unwindbound50.c b/c/nla-digbench-scaling/egcd_unwindbound50.c deleted file mode 100644 index 1e248a91b4f..00000000000 --- a/c/nla-digbench-scaling/egcd_unwindbound50.c +++ /dev/null @@ -1,57 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int a, b, p, q, r, s; - int x, y; - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - - while (counter++<50) { - __VERIFIER_assert(1 == p * s - r * q); - __VERIFIER_assert(a == y * r + x * p); - __VERIFIER_assert(b == x * q + y * s); - - if (!(a != b)) - break; - - if (a > b) { - a = a - b; - p = p - q; - r = r - s; - } else { - b = b - a; - q = q - p; - s = s - r; - } - } - - __VERIFIER_assert(a - b == 0); - __VERIFIER_assert(p*x + r*y - b == 0); - __VERIFIER_assert(q*r - p*s + 1 == 0); - __VERIFIER_assert(q*x + s*y - b == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/egcd_unwindbound50.yml b/c/nla-digbench-scaling/egcd_unwindbound50.yml deleted file mode 100644 index 0fa497384a1..00000000000 --- a/c/nla-digbench-scaling/egcd_unwindbound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd_valuebound1.c b/c/nla-digbench-scaling/egcd_valuebound1.c deleted file mode 100644 index f9cf628bdfc..00000000000 --- a/c/nla-digbench-scaling/egcd_valuebound1.c +++ /dev/null @@ -1,58 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int a, b, p, q, r, s; - int x, y; - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=1); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=1); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - - while (1) { - __VERIFIER_assert(1 == p * s - r * q); - __VERIFIER_assert(a == y * r + x * p); - __VERIFIER_assert(b == x * q + y * s); - - if (!(a != b)) - break; - - if (a > b) { - a = a - b; - p = p - q; - r = r - s; - } else { - b = b - a; - q = q - p; - s = s - r; - } - } - - __VERIFIER_assert(a - b == 0); - __VERIFIER_assert(p*x + r*y - b == 0); - __VERIFIER_assert(q*r - p*s + 1 == 0); - __VERIFIER_assert(q*x + s*y - b == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/egcd_valuebound1.yml b/c/nla-digbench-scaling/egcd_valuebound1.yml deleted file mode 100644 index d3adf454400..00000000000 --- a/c/nla-digbench-scaling/egcd_valuebound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd_valuebound10.c b/c/nla-digbench-scaling/egcd_valuebound10.c deleted file mode 100644 index 982ae3bfa97..00000000000 --- a/c/nla-digbench-scaling/egcd_valuebound10.c +++ /dev/null @@ -1,58 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int a, b, p, q, r, s; - int x, y; - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=10); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=10); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - - while (1) { - __VERIFIER_assert(1 == p * s - r * q); - __VERIFIER_assert(a == y * r + x * p); - __VERIFIER_assert(b == x * q + y * s); - - if (!(a != b)) - break; - - if (a > b) { - a = a - b; - p = p - q; - r = r - s; - } else { - b = b - a; - q = q - p; - s = s - r; - } - } - - __VERIFIER_assert(a - b == 0); - __VERIFIER_assert(p*x + r*y - b == 0); - __VERIFIER_assert(q*r - p*s + 1 == 0); - __VERIFIER_assert(q*x + s*y - b == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/egcd_valuebound10.yml b/c/nla-digbench-scaling/egcd_valuebound10.yml deleted file mode 100644 index 8902aa8e28e..00000000000 --- a/c/nla-digbench-scaling/egcd_valuebound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd_valuebound100.c b/c/nla-digbench-scaling/egcd_valuebound100.c deleted file mode 100644 index f4f1902bd8b..00000000000 --- a/c/nla-digbench-scaling/egcd_valuebound100.c +++ /dev/null @@ -1,58 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int a, b, p, q, r, s; - int x, y; - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=100); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=100); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - - while (1) { - __VERIFIER_assert(1 == p * s - r * q); - __VERIFIER_assert(a == y * r + x * p); - __VERIFIER_assert(b == x * q + y * s); - - if (!(a != b)) - break; - - if (a > b) { - a = a - b; - p = p - q; - r = r - s; - } else { - b = b - a; - q = q - p; - s = s - r; - } - } - - __VERIFIER_assert(a - b == 0); - __VERIFIER_assert(p*x + r*y - b == 0); - __VERIFIER_assert(q*r - p*s + 1 == 0); - __VERIFIER_assert(q*x + s*y - b == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/egcd_valuebound100.yml b/c/nla-digbench-scaling/egcd_valuebound100.yml deleted file mode 100644 index b75a4b366e3..00000000000 --- a/c/nla-digbench-scaling/egcd_valuebound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd_valuebound2.c b/c/nla-digbench-scaling/egcd_valuebound2.c deleted file mode 100644 index 925cc8b497a..00000000000 --- a/c/nla-digbench-scaling/egcd_valuebound2.c +++ /dev/null @@ -1,58 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int a, b, p, q, r, s; - int x, y; - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=2); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=2); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - - while (1) { - __VERIFIER_assert(1 == p * s - r * q); - __VERIFIER_assert(a == y * r + x * p); - __VERIFIER_assert(b == x * q + y * s); - - if (!(a != b)) - break; - - if (a > b) { - a = a - b; - p = p - q; - r = r - s; - } else { - b = b - a; - q = q - p; - s = s - r; - } - } - - __VERIFIER_assert(a - b == 0); - __VERIFIER_assert(p*x + r*y - b == 0); - __VERIFIER_assert(q*r - p*s + 1 == 0); - __VERIFIER_assert(q*x + s*y - b == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/egcd_valuebound2.yml b/c/nla-digbench-scaling/egcd_valuebound2.yml deleted file mode 100644 index d076aa7b61a..00000000000 --- a/c/nla-digbench-scaling/egcd_valuebound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd_valuebound20.c b/c/nla-digbench-scaling/egcd_valuebound20.c deleted file mode 100644 index 033532f6785..00000000000 --- a/c/nla-digbench-scaling/egcd_valuebound20.c +++ /dev/null @@ -1,58 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int a, b, p, q, r, s; - int x, y; - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=20); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=20); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - - while (1) { - __VERIFIER_assert(1 == p * s - r * q); - __VERIFIER_assert(a == y * r + x * p); - __VERIFIER_assert(b == x * q + y * s); - - if (!(a != b)) - break; - - if (a > b) { - a = a - b; - p = p - q; - r = r - s; - } else { - b = b - a; - q = q - p; - s = s - r; - } - } - - __VERIFIER_assert(a - b == 0); - __VERIFIER_assert(p*x + r*y - b == 0); - __VERIFIER_assert(q*r - p*s + 1 == 0); - __VERIFIER_assert(q*x + s*y - b == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/egcd_valuebound20.yml b/c/nla-digbench-scaling/egcd_valuebound20.yml deleted file mode 100644 index 0ea5ed40f2a..00000000000 --- a/c/nla-digbench-scaling/egcd_valuebound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd_valuebound5.c b/c/nla-digbench-scaling/egcd_valuebound5.c deleted file mode 100644 index d9cb309cf71..00000000000 --- a/c/nla-digbench-scaling/egcd_valuebound5.c +++ /dev/null @@ -1,58 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int a, b, p, q, r, s; - int x, y; - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=5); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=5); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - - while (1) { - __VERIFIER_assert(1 == p * s - r * q); - __VERIFIER_assert(a == y * r + x * p); - __VERIFIER_assert(b == x * q + y * s); - - if (!(a != b)) - break; - - if (a > b) { - a = a - b; - p = p - q; - r = r - s; - } else { - b = b - a; - q = q - p; - s = s - r; - } - } - - __VERIFIER_assert(a - b == 0); - __VERIFIER_assert(p*x + r*y - b == 0); - __VERIFIER_assert(q*r - p*s + 1 == 0); - __VERIFIER_assert(q*x + s*y - b == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/egcd_valuebound5.yml b/c/nla-digbench-scaling/egcd_valuebound5.yml deleted file mode 100644 index ec454adb0e8..00000000000 --- a/c/nla-digbench-scaling/egcd_valuebound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/egcd_valuebound50.c b/c/nla-digbench-scaling/egcd_valuebound50.c deleted file mode 100644 index c9a9b3a9049..00000000000 --- a/c/nla-digbench-scaling/egcd_valuebound50.c +++ /dev/null @@ -1,58 +0,0 @@ -/* extended Euclid's algorithm */ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int a, b, p, q, r, s; - int x, y; - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=50); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=50); - assume_abort_if_not(x >= 1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - r = 0; - s = 1; - - while (1) { - __VERIFIER_assert(1 == p * s - r * q); - __VERIFIER_assert(a == y * r + x * p); - __VERIFIER_assert(b == x * q + y * s); - - if (!(a != b)) - break; - - if (a > b) { - a = a - b; - p = p - q; - r = r - s; - } else { - b = b - a; - q = q - p; - s = s - r; - } - } - - __VERIFIER_assert(a - b == 0); - __VERIFIER_assert(p*x + r*y - b == 0); - __VERIFIER_assert(q*r - p*s + 1 == 0); - __VERIFIER_assert(q*x + s*y - b == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/egcd_valuebound50.yml b/c/nla-digbench-scaling/egcd_valuebound50.yml deleted file mode 100644 index 062f13d675f..00000000000 --- a/c/nla-digbench-scaling/egcd_valuebound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'egcd_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat1-ll_unwindbound1.c b/c/nla-digbench-scaling/fermat1-ll_unwindbound1.c new file mode 100644 index 00000000000..30c2a84ef59 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_unwindbound1.c @@ -0,0 +1,58 @@ +/* program computing a divisor for factorisation, by Knuth 4.5.4 Alg C ? */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "fermat1-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int A, R; + long long u, v, r; + A = __VERIFIER_nondet_int(); + R = __VERIFIER_nondet_int(); + assume_abort_if_not((((long long) R - 1) * ((long long) R - 1)) < A); + //assume_abort_if_not(A <= R * R); + assume_abort_if_not(A % 2 == 1); + + u = ((long long) 2 * R) + 1; + v = 1; + r = ((long long) R * R) - A; + + + while (counter++<1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r != 0)) + break; + + while (counter++<1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r > 0)) + break; + r = r - v; + v = v + 2; + } + + while (counter++<1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r < 0)) + break; + r = r + u; + u = u + 2; + } + } + + __VERIFIER_assert(((long long) 4*A) == u*u - v*v - 2*u + 2*v); + return 0; +} diff --git a/c/nla-digbench-scaling/fermat1-ll_unwindbound1.yml b/c/nla-digbench-scaling/fermat1-ll_unwindbound1.yml new file mode 100644 index 00000000000..89a24778093 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_unwindbound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'fermat1-ll_unwindbound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat1-ll_unwindbound10.c b/c/nla-digbench-scaling/fermat1-ll_unwindbound10.c new file mode 100644 index 00000000000..bf48eb8de32 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_unwindbound10.c @@ -0,0 +1,58 @@ +/* program computing a divisor for factorisation, by Knuth 4.5.4 Alg C ? */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "fermat1-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int A, R; + long long u, v, r; + A = __VERIFIER_nondet_int(); + R = __VERIFIER_nondet_int(); + assume_abort_if_not((((long long) R - 1) * ((long long) R - 1)) < A); + //assume_abort_if_not(A <= R * R); + assume_abort_if_not(A % 2 == 1); + + u = ((long long) 2 * R) + 1; + v = 1; + r = ((long long) R * R) - A; + + + while (counter++<10) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r != 0)) + break; + + while (counter++<10) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r > 0)) + break; + r = r - v; + v = v + 2; + } + + while (counter++<10) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r < 0)) + break; + r = r + u; + u = u + 2; + } + } + + __VERIFIER_assert(((long long) 4*A) == u*u - v*v - 2*u + 2*v); + return 0; +} diff --git a/c/nla-digbench-scaling/fermat1-ll_unwindbound10.yml b/c/nla-digbench-scaling/fermat1-ll_unwindbound10.yml new file mode 100644 index 00000000000..457530aad9e --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_unwindbound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'fermat1-ll_unwindbound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat1-ll_unwindbound100.c b/c/nla-digbench-scaling/fermat1-ll_unwindbound100.c new file mode 100644 index 00000000000..82f8a749171 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_unwindbound100.c @@ -0,0 +1,58 @@ +/* program computing a divisor for factorisation, by Knuth 4.5.4 Alg C ? */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "fermat1-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int A, R; + long long u, v, r; + A = __VERIFIER_nondet_int(); + R = __VERIFIER_nondet_int(); + assume_abort_if_not((((long long) R - 1) * ((long long) R - 1)) < A); + //assume_abort_if_not(A <= R * R); + assume_abort_if_not(A % 2 == 1); + + u = ((long long) 2 * R) + 1; + v = 1; + r = ((long long) R * R) - A; + + + while (counter++<100) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r != 0)) + break; + + while (counter++<100) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r > 0)) + break; + r = r - v; + v = v + 2; + } + + while (counter++<100) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r < 0)) + break; + r = r + u; + u = u + 2; + } + } + + __VERIFIER_assert(((long long) 4*A) == u*u - v*v - 2*u + 2*v); + return 0; +} diff --git a/c/nla-digbench-scaling/fermat1-ll_unwindbound100.yml b/c/nla-digbench-scaling/fermat1-ll_unwindbound100.yml new file mode 100644 index 00000000000..cb347179b33 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_unwindbound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'fermat1-ll_unwindbound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat1-ll_unwindbound2.c b/c/nla-digbench-scaling/fermat1-ll_unwindbound2.c new file mode 100644 index 00000000000..c7de4bbda91 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_unwindbound2.c @@ -0,0 +1,58 @@ +/* program computing a divisor for factorisation, by Knuth 4.5.4 Alg C ? */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "fermat1-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int A, R; + long long u, v, r; + A = __VERIFIER_nondet_int(); + R = __VERIFIER_nondet_int(); + assume_abort_if_not((((long long) R - 1) * ((long long) R - 1)) < A); + //assume_abort_if_not(A <= R * R); + assume_abort_if_not(A % 2 == 1); + + u = ((long long) 2 * R) + 1; + v = 1; + r = ((long long) R * R) - A; + + + while (counter++<2) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r != 0)) + break; + + while (counter++<2) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r > 0)) + break; + r = r - v; + v = v + 2; + } + + while (counter++<2) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r < 0)) + break; + r = r + u; + u = u + 2; + } + } + + __VERIFIER_assert(((long long) 4*A) == u*u - v*v - 2*u + 2*v); + return 0; +} diff --git a/c/nla-digbench-scaling/fermat1-ll_unwindbound2.yml b/c/nla-digbench-scaling/fermat1-ll_unwindbound2.yml new file mode 100644 index 00000000000..c83674bddc2 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_unwindbound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'fermat1-ll_unwindbound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat1-ll_unwindbound20.c b/c/nla-digbench-scaling/fermat1-ll_unwindbound20.c new file mode 100644 index 00000000000..b687582c203 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_unwindbound20.c @@ -0,0 +1,58 @@ +/* program computing a divisor for factorisation, by Knuth 4.5.4 Alg C ? */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "fermat1-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int A, R; + long long u, v, r; + A = __VERIFIER_nondet_int(); + R = __VERIFIER_nondet_int(); + assume_abort_if_not((((long long) R - 1) * ((long long) R - 1)) < A); + //assume_abort_if_not(A <= R * R); + assume_abort_if_not(A % 2 == 1); + + u = ((long long) 2 * R) + 1; + v = 1; + r = ((long long) R * R) - A; + + + while (counter++<20) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r != 0)) + break; + + while (counter++<20) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r > 0)) + break; + r = r - v; + v = v + 2; + } + + while (counter++<20) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r < 0)) + break; + r = r + u; + u = u + 2; + } + } + + __VERIFIER_assert(((long long) 4*A) == u*u - v*v - 2*u + 2*v); + return 0; +} diff --git a/c/nla-digbench-scaling/fermat1-ll_unwindbound20.yml b/c/nla-digbench-scaling/fermat1-ll_unwindbound20.yml new file mode 100644 index 00000000000..a513c73c346 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_unwindbound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'fermat1-ll_unwindbound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat1-ll_unwindbound5.c b/c/nla-digbench-scaling/fermat1-ll_unwindbound5.c new file mode 100644 index 00000000000..c5a03f867ee --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_unwindbound5.c @@ -0,0 +1,58 @@ +/* program computing a divisor for factorisation, by Knuth 4.5.4 Alg C ? */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "fermat1-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int A, R; + long long u, v, r; + A = __VERIFIER_nondet_int(); + R = __VERIFIER_nondet_int(); + assume_abort_if_not((((long long) R - 1) * ((long long) R - 1)) < A); + //assume_abort_if_not(A <= R * R); + assume_abort_if_not(A % 2 == 1); + + u = ((long long) 2 * R) + 1; + v = 1; + r = ((long long) R * R) - A; + + + while (counter++<5) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r != 0)) + break; + + while (counter++<5) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r > 0)) + break; + r = r - v; + v = v + 2; + } + + while (counter++<5) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r < 0)) + break; + r = r + u; + u = u + 2; + } + } + + __VERIFIER_assert(((long long) 4*A) == u*u - v*v - 2*u + 2*v); + return 0; +} diff --git a/c/nla-digbench-scaling/fermat1-ll_unwindbound5.yml b/c/nla-digbench-scaling/fermat1-ll_unwindbound5.yml new file mode 100644 index 00000000000..db7090c3d02 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_unwindbound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'fermat1-ll_unwindbound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat1-ll_unwindbound50.c b/c/nla-digbench-scaling/fermat1-ll_unwindbound50.c new file mode 100644 index 00000000000..a0f617f97b4 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_unwindbound50.c @@ -0,0 +1,58 @@ +/* program computing a divisor for factorisation, by Knuth 4.5.4 Alg C ? */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "fermat1-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int A, R; + long long u, v, r; + A = __VERIFIER_nondet_int(); + R = __VERIFIER_nondet_int(); + assume_abort_if_not((((long long) R - 1) * ((long long) R - 1)) < A); + //assume_abort_if_not(A <= R * R); + assume_abort_if_not(A % 2 == 1); + + u = ((long long) 2 * R) + 1; + v = 1; + r = ((long long) R * R) - A; + + + while (counter++<50) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r != 0)) + break; + + while (counter++<50) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r > 0)) + break; + r = r - v; + v = v + 2; + } + + while (counter++<50) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r < 0)) + break; + r = r + u; + u = u + 2; + } + } + + __VERIFIER_assert(((long long) 4*A) == u*u - v*v - 2*u + 2*v); + return 0; +} diff --git a/c/nla-digbench-scaling/fermat1-ll_unwindbound50.yml b/c/nla-digbench-scaling/fermat1-ll_unwindbound50.yml new file mode 100644 index 00000000000..62cfdb56ca7 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_unwindbound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'fermat1-ll_unwindbound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat1-ll_valuebound1.c b/c/nla-digbench-scaling/fermat1-ll_valuebound1.c new file mode 100644 index 00000000000..6a84cf2beb8 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_valuebound1.c @@ -0,0 +1,59 @@ +/* program computing a divisor for factorisation, by Knuth 4.5.4 Alg C ? */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "fermat1-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int A, R; + long long u, v, r; + A = __VERIFIER_nondet_int(); + assume_abort_if_not(A>=0 && A<=1); + R = __VERIFIER_nondet_int(); + assume_abort_if_not(R>=0 && R<=1); + assume_abort_if_not((((long long) R - 1) * ((long long) R - 1)) < A); + //assume_abort_if_not(A <= R * R); + assume_abort_if_not(A % 2 == 1); + + u = ((long long) 2 * R) + 1; + v = 1; + r = ((long long) R * R) - A; + + + while (1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r != 0)) + break; + + while (1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r > 0)) + break; + r = r - v; + v = v + 2; + } + + while (1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r < 0)) + break; + r = r + u; + u = u + 2; + } + } + + __VERIFIER_assert(((long long) 4*A) == u*u - v*v - 2*u + 2*v); + return 0; +} diff --git a/c/nla-digbench-scaling/fermat1-ll_valuebound1.yml b/c/nla-digbench-scaling/fermat1-ll_valuebound1.yml new file mode 100644 index 00000000000..963fcbcca63 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_valuebound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'fermat1-ll_valuebound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat1-ll_valuebound10.c b/c/nla-digbench-scaling/fermat1-ll_valuebound10.c new file mode 100644 index 00000000000..f11fd843e92 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_valuebound10.c @@ -0,0 +1,59 @@ +/* program computing a divisor for factorisation, by Knuth 4.5.4 Alg C ? */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "fermat1-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int A, R; + long long u, v, r; + A = __VERIFIER_nondet_int(); + assume_abort_if_not(A>=0 && A<=10); + R = __VERIFIER_nondet_int(); + assume_abort_if_not(R>=0 && R<=10); + assume_abort_if_not((((long long) R - 1) * ((long long) R - 1)) < A); + //assume_abort_if_not(A <= R * R); + assume_abort_if_not(A % 2 == 1); + + u = ((long long) 2 * R) + 1; + v = 1; + r = ((long long) R * R) - A; + + + while (1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r != 0)) + break; + + while (1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r > 0)) + break; + r = r - v; + v = v + 2; + } + + while (1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r < 0)) + break; + r = r + u; + u = u + 2; + } + } + + __VERIFIER_assert(((long long) 4*A) == u*u - v*v - 2*u + 2*v); + return 0; +} diff --git a/c/nla-digbench-scaling/fermat1-ll_valuebound10.yml b/c/nla-digbench-scaling/fermat1-ll_valuebound10.yml new file mode 100644 index 00000000000..3520722ff7b --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_valuebound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'fermat1-ll_valuebound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat1-ll_valuebound100.c b/c/nla-digbench-scaling/fermat1-ll_valuebound100.c new file mode 100644 index 00000000000..368372a575d --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_valuebound100.c @@ -0,0 +1,59 @@ +/* program computing a divisor for factorisation, by Knuth 4.5.4 Alg C ? */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "fermat1-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int A, R; + long long u, v, r; + A = __VERIFIER_nondet_int(); + assume_abort_if_not(A>=0 && A<=100); + R = __VERIFIER_nondet_int(); + assume_abort_if_not(R>=0 && R<=100); + assume_abort_if_not((((long long) R - 1) * ((long long) R - 1)) < A); + //assume_abort_if_not(A <= R * R); + assume_abort_if_not(A % 2 == 1); + + u = ((long long) 2 * R) + 1; + v = 1; + r = ((long long) R * R) - A; + + + while (1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r != 0)) + break; + + while (1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r > 0)) + break; + r = r - v; + v = v + 2; + } + + while (1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r < 0)) + break; + r = r + u; + u = u + 2; + } + } + + __VERIFIER_assert(((long long) 4*A) == u*u - v*v - 2*u + 2*v); + return 0; +} diff --git a/c/nla-digbench-scaling/fermat1-ll_valuebound100.yml b/c/nla-digbench-scaling/fermat1-ll_valuebound100.yml new file mode 100644 index 00000000000..408acb3ad63 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_valuebound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'fermat1-ll_valuebound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat1-ll_valuebound2.c b/c/nla-digbench-scaling/fermat1-ll_valuebound2.c new file mode 100644 index 00000000000..421c535a256 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_valuebound2.c @@ -0,0 +1,59 @@ +/* program computing a divisor for factorisation, by Knuth 4.5.4 Alg C ? */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "fermat1-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int A, R; + long long u, v, r; + A = __VERIFIER_nondet_int(); + assume_abort_if_not(A>=0 && A<=2); + R = __VERIFIER_nondet_int(); + assume_abort_if_not(R>=0 && R<=2); + assume_abort_if_not((((long long) R - 1) * ((long long) R - 1)) < A); + //assume_abort_if_not(A <= R * R); + assume_abort_if_not(A % 2 == 1); + + u = ((long long) 2 * R) + 1; + v = 1; + r = ((long long) R * R) - A; + + + while (1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r != 0)) + break; + + while (1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r > 0)) + break; + r = r - v; + v = v + 2; + } + + while (1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r < 0)) + break; + r = r + u; + u = u + 2; + } + } + + __VERIFIER_assert(((long long) 4*A) == u*u - v*v - 2*u + 2*v); + return 0; +} diff --git a/c/nla-digbench-scaling/fermat1-ll_valuebound2.yml b/c/nla-digbench-scaling/fermat1-ll_valuebound2.yml new file mode 100644 index 00000000000..e25e9e85079 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_valuebound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'fermat1-ll_valuebound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat1-ll_valuebound20.c b/c/nla-digbench-scaling/fermat1-ll_valuebound20.c new file mode 100644 index 00000000000..14991ce4eb0 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_valuebound20.c @@ -0,0 +1,59 @@ +/* program computing a divisor for factorisation, by Knuth 4.5.4 Alg C ? */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "fermat1-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int A, R; + long long u, v, r; + A = __VERIFIER_nondet_int(); + assume_abort_if_not(A>=0 && A<=20); + R = __VERIFIER_nondet_int(); + assume_abort_if_not(R>=0 && R<=20); + assume_abort_if_not((((long long) R - 1) * ((long long) R - 1)) < A); + //assume_abort_if_not(A <= R * R); + assume_abort_if_not(A % 2 == 1); + + u = ((long long) 2 * R) + 1; + v = 1; + r = ((long long) R * R) - A; + + + while (1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r != 0)) + break; + + while (1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r > 0)) + break; + r = r - v; + v = v + 2; + } + + while (1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r < 0)) + break; + r = r + u; + u = u + 2; + } + } + + __VERIFIER_assert(((long long) 4*A) == u*u - v*v - 2*u + 2*v); + return 0; +} diff --git a/c/nla-digbench-scaling/fermat1-ll_valuebound20.yml b/c/nla-digbench-scaling/fermat1-ll_valuebound20.yml new file mode 100644 index 00000000000..6acb4787f81 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_valuebound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'fermat1-ll_valuebound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat1-ll_valuebound5.c b/c/nla-digbench-scaling/fermat1-ll_valuebound5.c new file mode 100644 index 00000000000..cf5790ce7b2 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_valuebound5.c @@ -0,0 +1,59 @@ +/* program computing a divisor for factorisation, by Knuth 4.5.4 Alg C ? */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "fermat1-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int A, R; + long long u, v, r; + A = __VERIFIER_nondet_int(); + assume_abort_if_not(A>=0 && A<=5); + R = __VERIFIER_nondet_int(); + assume_abort_if_not(R>=0 && R<=5); + assume_abort_if_not((((long long) R - 1) * ((long long) R - 1)) < A); + //assume_abort_if_not(A <= R * R); + assume_abort_if_not(A % 2 == 1); + + u = ((long long) 2 * R) + 1; + v = 1; + r = ((long long) R * R) - A; + + + while (1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r != 0)) + break; + + while (1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r > 0)) + break; + r = r - v; + v = v + 2; + } + + while (1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r < 0)) + break; + r = r + u; + u = u + 2; + } + } + + __VERIFIER_assert(((long long) 4*A) == u*u - v*v - 2*u + 2*v); + return 0; +} diff --git a/c/nla-digbench-scaling/fermat1-ll_valuebound5.yml b/c/nla-digbench-scaling/fermat1-ll_valuebound5.yml new file mode 100644 index 00000000000..919e89fb97d --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_valuebound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'fermat1-ll_valuebound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat1-ll_valuebound50.c b/c/nla-digbench-scaling/fermat1-ll_valuebound50.c new file mode 100644 index 00000000000..944ac442952 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_valuebound50.c @@ -0,0 +1,59 @@ +/* program computing a divisor for factorisation, by Knuth 4.5.4 Alg C ? */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "fermat1-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int A, R; + long long u, v, r; + A = __VERIFIER_nondet_int(); + assume_abort_if_not(A>=0 && A<=50); + R = __VERIFIER_nondet_int(); + assume_abort_if_not(R>=0 && R<=50); + assume_abort_if_not((((long long) R - 1) * ((long long) R - 1)) < A); + //assume_abort_if_not(A <= R * R); + assume_abort_if_not(A % 2 == 1); + + u = ((long long) 2 * R) + 1; + v = 1; + r = ((long long) R * R) - A; + + + while (1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r != 0)) + break; + + while (1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r > 0)) + break; + r = r - v; + v = v + 2; + } + + while (1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r < 0)) + break; + r = r + u; + u = u + 2; + } + } + + __VERIFIER_assert(((long long) 4*A) == u*u - v*v - 2*u + 2*v); + return 0; +} diff --git a/c/nla-digbench-scaling/fermat1-ll_valuebound50.yml b/c/nla-digbench-scaling/fermat1-ll_valuebound50.yml new file mode 100644 index 00000000000..7a5371dd751 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_valuebound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'fermat1-ll_valuebound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat1_unwindbound1.c b/c/nla-digbench-scaling/fermat1_unwindbound1.c deleted file mode 100644 index 5e5d8599306..00000000000 --- a/c/nla-digbench-scaling/fermat1_unwindbound1.c +++ /dev/null @@ -1,57 +0,0 @@ -/* program computing a divisor for factorisation, by Knuth 4.5.4 Alg C ? */ - -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int A, R; - int u, v, r; - A = __VERIFIER_nondet_double(); - R = __VERIFIER_nondet_double(); - assume_abort_if_not((R - 1) * (R - 1) < A); - //assume_abort_if_not(A <= R * R); - assume_abort_if_not(A % 2 == 1); - - u = 2 * R + 1; - v = 1; - r = R * R - A; - - - while (counter++<1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r != 0)) - break; - - while (counter++<1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r > 0)) - break; - r = r - v; - v = v + 2; - } - - while (counter++<1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r < 0)) - break; - r = r + u; - u = u + 2; - } - } - - __VERIFIER_assert(4*A == u*u - v*v - 2*u + 2*v); - return 0; -} diff --git a/c/nla-digbench-scaling/fermat1_unwindbound1.yml b/c/nla-digbench-scaling/fermat1_unwindbound1.yml deleted file mode 100644 index 58591a06c42..00000000000 --- a/c/nla-digbench-scaling/fermat1_unwindbound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'fermat1_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat1_unwindbound10.c b/c/nla-digbench-scaling/fermat1_unwindbound10.c deleted file mode 100644 index f3ed6f4aca5..00000000000 --- a/c/nla-digbench-scaling/fermat1_unwindbound10.c +++ /dev/null @@ -1,57 +0,0 @@ -/* program computing a divisor for factorisation, by Knuth 4.5.4 Alg C ? */ - -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int A, R; - int u, v, r; - A = __VERIFIER_nondet_double(); - R = __VERIFIER_nondet_double(); - assume_abort_if_not((R - 1) * (R - 1) < A); - //assume_abort_if_not(A <= R * R); - assume_abort_if_not(A % 2 == 1); - - u = 2 * R + 1; - v = 1; - r = R * R - A; - - - while (counter++<10) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r != 0)) - break; - - while (counter++<10) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r > 0)) - break; - r = r - v; - v = v + 2; - } - - while (counter++<10) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r < 0)) - break; - r = r + u; - u = u + 2; - } - } - - __VERIFIER_assert(4*A == u*u - v*v - 2*u + 2*v); - return 0; -} diff --git a/c/nla-digbench-scaling/fermat1_unwindbound10.yml b/c/nla-digbench-scaling/fermat1_unwindbound10.yml deleted file mode 100644 index 9513dd5c2af..00000000000 --- a/c/nla-digbench-scaling/fermat1_unwindbound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'fermat1_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat1_unwindbound100.c b/c/nla-digbench-scaling/fermat1_unwindbound100.c deleted file mode 100644 index 40eebff41d8..00000000000 --- a/c/nla-digbench-scaling/fermat1_unwindbound100.c +++ /dev/null @@ -1,57 +0,0 @@ -/* program computing a divisor for factorisation, by Knuth 4.5.4 Alg C ? */ - -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int A, R; - int u, v, r; - A = __VERIFIER_nondet_double(); - R = __VERIFIER_nondet_double(); - assume_abort_if_not((R - 1) * (R - 1) < A); - //assume_abort_if_not(A <= R * R); - assume_abort_if_not(A % 2 == 1); - - u = 2 * R + 1; - v = 1; - r = R * R - A; - - - while (counter++<100) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r != 0)) - break; - - while (counter++<100) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r > 0)) - break; - r = r - v; - v = v + 2; - } - - while (counter++<100) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r < 0)) - break; - r = r + u; - u = u + 2; - } - } - - __VERIFIER_assert(4*A == u*u - v*v - 2*u + 2*v); - return 0; -} diff --git a/c/nla-digbench-scaling/fermat1_unwindbound100.yml b/c/nla-digbench-scaling/fermat1_unwindbound100.yml deleted file mode 100644 index 9a2aba00104..00000000000 --- a/c/nla-digbench-scaling/fermat1_unwindbound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'fermat1_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat1_unwindbound2.c b/c/nla-digbench-scaling/fermat1_unwindbound2.c deleted file mode 100644 index 68671058801..00000000000 --- a/c/nla-digbench-scaling/fermat1_unwindbound2.c +++ /dev/null @@ -1,57 +0,0 @@ -/* program computing a divisor for factorisation, by Knuth 4.5.4 Alg C ? */ - -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int A, R; - int u, v, r; - A = __VERIFIER_nondet_double(); - R = __VERIFIER_nondet_double(); - assume_abort_if_not((R - 1) * (R - 1) < A); - //assume_abort_if_not(A <= R * R); - assume_abort_if_not(A % 2 == 1); - - u = 2 * R + 1; - v = 1; - r = R * R - A; - - - while (counter++<2) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r != 0)) - break; - - while (counter++<2) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r > 0)) - break; - r = r - v; - v = v + 2; - } - - while (counter++<2) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r < 0)) - break; - r = r + u; - u = u + 2; - } - } - - __VERIFIER_assert(4*A == u*u - v*v - 2*u + 2*v); - return 0; -} diff --git a/c/nla-digbench-scaling/fermat1_unwindbound2.yml b/c/nla-digbench-scaling/fermat1_unwindbound2.yml deleted file mode 100644 index 29eb4629f03..00000000000 --- a/c/nla-digbench-scaling/fermat1_unwindbound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'fermat1_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat1_unwindbound20.c b/c/nla-digbench-scaling/fermat1_unwindbound20.c deleted file mode 100644 index fa3095e7334..00000000000 --- a/c/nla-digbench-scaling/fermat1_unwindbound20.c +++ /dev/null @@ -1,57 +0,0 @@ -/* program computing a divisor for factorisation, by Knuth 4.5.4 Alg C ? */ - -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int A, R; - int u, v, r; - A = __VERIFIER_nondet_double(); - R = __VERIFIER_nondet_double(); - assume_abort_if_not((R - 1) * (R - 1) < A); - //assume_abort_if_not(A <= R * R); - assume_abort_if_not(A % 2 == 1); - - u = 2 * R + 1; - v = 1; - r = R * R - A; - - - while (counter++<20) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r != 0)) - break; - - while (counter++<20) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r > 0)) - break; - r = r - v; - v = v + 2; - } - - while (counter++<20) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r < 0)) - break; - r = r + u; - u = u + 2; - } - } - - __VERIFIER_assert(4*A == u*u - v*v - 2*u + 2*v); - return 0; -} diff --git a/c/nla-digbench-scaling/fermat1_unwindbound20.yml b/c/nla-digbench-scaling/fermat1_unwindbound20.yml deleted file mode 100644 index c00fd236792..00000000000 --- a/c/nla-digbench-scaling/fermat1_unwindbound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'fermat1_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat1_unwindbound5.c b/c/nla-digbench-scaling/fermat1_unwindbound5.c deleted file mode 100644 index 5cabc3faa23..00000000000 --- a/c/nla-digbench-scaling/fermat1_unwindbound5.c +++ /dev/null @@ -1,57 +0,0 @@ -/* program computing a divisor for factorisation, by Knuth 4.5.4 Alg C ? */ - -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int A, R; - int u, v, r; - A = __VERIFIER_nondet_double(); - R = __VERIFIER_nondet_double(); - assume_abort_if_not((R - 1) * (R - 1) < A); - //assume_abort_if_not(A <= R * R); - assume_abort_if_not(A % 2 == 1); - - u = 2 * R + 1; - v = 1; - r = R * R - A; - - - while (counter++<5) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r != 0)) - break; - - while (counter++<5) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r > 0)) - break; - r = r - v; - v = v + 2; - } - - while (counter++<5) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r < 0)) - break; - r = r + u; - u = u + 2; - } - } - - __VERIFIER_assert(4*A == u*u - v*v - 2*u + 2*v); - return 0; -} diff --git a/c/nla-digbench-scaling/fermat1_unwindbound5.yml b/c/nla-digbench-scaling/fermat1_unwindbound5.yml deleted file mode 100644 index 1491b6e6f6b..00000000000 --- a/c/nla-digbench-scaling/fermat1_unwindbound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'fermat1_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat1_unwindbound50.c b/c/nla-digbench-scaling/fermat1_unwindbound50.c deleted file mode 100644 index f77743159f9..00000000000 --- a/c/nla-digbench-scaling/fermat1_unwindbound50.c +++ /dev/null @@ -1,57 +0,0 @@ -/* program computing a divisor for factorisation, by Knuth 4.5.4 Alg C ? */ - -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int A, R; - int u, v, r; - A = __VERIFIER_nondet_double(); - R = __VERIFIER_nondet_double(); - assume_abort_if_not((R - 1) * (R - 1) < A); - //assume_abort_if_not(A <= R * R); - assume_abort_if_not(A % 2 == 1); - - u = 2 * R + 1; - v = 1; - r = R * R - A; - - - while (counter++<50) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r != 0)) - break; - - while (counter++<50) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r > 0)) - break; - r = r - v; - v = v + 2; - } - - while (counter++<50) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r < 0)) - break; - r = r + u; - u = u + 2; - } - } - - __VERIFIER_assert(4*A == u*u - v*v - 2*u + 2*v); - return 0; -} diff --git a/c/nla-digbench-scaling/fermat1_unwindbound50.yml b/c/nla-digbench-scaling/fermat1_unwindbound50.yml deleted file mode 100644 index 5c7d4b6e5eb..00000000000 --- a/c/nla-digbench-scaling/fermat1_unwindbound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'fermat1_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat1_valuebound1.c b/c/nla-digbench-scaling/fermat1_valuebound1.c deleted file mode 100644 index 336de00ffc8..00000000000 --- a/c/nla-digbench-scaling/fermat1_valuebound1.c +++ /dev/null @@ -1,58 +0,0 @@ -/* program computing a divisor for factorisation, by Knuth 4.5.4 Alg C ? */ - -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int A, R; - int u, v, r; - A = __VERIFIER_nondet_double(); - assume_abort_if_not(A>0 && A<=1); - R = __VERIFIER_nondet_double(); - assume_abort_if_not(R>0 && R<=1); - assume_abort_if_not((R - 1) * (R - 1) < A); - //assume_abort_if_not(A <= R * R); - assume_abort_if_not(A % 2 == 1); - - u = 2 * R + 1; - v = 1; - r = R * R - A; - - - while (1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r != 0)) - break; - - while (1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r > 0)) - break; - r = r - v; - v = v + 2; - } - - while (1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r < 0)) - break; - r = r + u; - u = u + 2; - } - } - - __VERIFIER_assert(4*A == u*u - v*v - 2*u + 2*v); - return 0; -} diff --git a/c/nla-digbench-scaling/fermat1_valuebound1.yml b/c/nla-digbench-scaling/fermat1_valuebound1.yml deleted file mode 100644 index d9d5778cc5e..00000000000 --- a/c/nla-digbench-scaling/fermat1_valuebound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'fermat1_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat1_valuebound10.c b/c/nla-digbench-scaling/fermat1_valuebound10.c deleted file mode 100644 index 7e15360987a..00000000000 --- a/c/nla-digbench-scaling/fermat1_valuebound10.c +++ /dev/null @@ -1,58 +0,0 @@ -/* program computing a divisor for factorisation, by Knuth 4.5.4 Alg C ? */ - -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int A, R; - int u, v, r; - A = __VERIFIER_nondet_double(); - assume_abort_if_not(A>0 && A<=10); - R = __VERIFIER_nondet_double(); - assume_abort_if_not(R>0 && R<=10); - assume_abort_if_not((R - 1) * (R - 1) < A); - //assume_abort_if_not(A <= R * R); - assume_abort_if_not(A % 2 == 1); - - u = 2 * R + 1; - v = 1; - r = R * R - A; - - - while (1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r != 0)) - break; - - while (1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r > 0)) - break; - r = r - v; - v = v + 2; - } - - while (1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r < 0)) - break; - r = r + u; - u = u + 2; - } - } - - __VERIFIER_assert(4*A == u*u - v*v - 2*u + 2*v); - return 0; -} diff --git a/c/nla-digbench-scaling/fermat1_valuebound10.yml b/c/nla-digbench-scaling/fermat1_valuebound10.yml deleted file mode 100644 index 156deff4f6b..00000000000 --- a/c/nla-digbench-scaling/fermat1_valuebound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'fermat1_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat1_valuebound100.c b/c/nla-digbench-scaling/fermat1_valuebound100.c deleted file mode 100644 index 57cdd91ea8b..00000000000 --- a/c/nla-digbench-scaling/fermat1_valuebound100.c +++ /dev/null @@ -1,58 +0,0 @@ -/* program computing a divisor for factorisation, by Knuth 4.5.4 Alg C ? */ - -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int A, R; - int u, v, r; - A = __VERIFIER_nondet_double(); - assume_abort_if_not(A>0 && A<=100); - R = __VERIFIER_nondet_double(); - assume_abort_if_not(R>0 && R<=100); - assume_abort_if_not((R - 1) * (R - 1) < A); - //assume_abort_if_not(A <= R * R); - assume_abort_if_not(A % 2 == 1); - - u = 2 * R + 1; - v = 1; - r = R * R - A; - - - while (1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r != 0)) - break; - - while (1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r > 0)) - break; - r = r - v; - v = v + 2; - } - - while (1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r < 0)) - break; - r = r + u; - u = u + 2; - } - } - - __VERIFIER_assert(4*A == u*u - v*v - 2*u + 2*v); - return 0; -} diff --git a/c/nla-digbench-scaling/fermat1_valuebound100.yml b/c/nla-digbench-scaling/fermat1_valuebound100.yml deleted file mode 100644 index e20c2cd14ff..00000000000 --- a/c/nla-digbench-scaling/fermat1_valuebound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'fermat1_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat1_valuebound2.c b/c/nla-digbench-scaling/fermat1_valuebound2.c deleted file mode 100644 index 2a8d2701137..00000000000 --- a/c/nla-digbench-scaling/fermat1_valuebound2.c +++ /dev/null @@ -1,58 +0,0 @@ -/* program computing a divisor for factorisation, by Knuth 4.5.4 Alg C ? */ - -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int A, R; - int u, v, r; - A = __VERIFIER_nondet_double(); - assume_abort_if_not(A>0 && A<=2); - R = __VERIFIER_nondet_double(); - assume_abort_if_not(R>0 && R<=2); - assume_abort_if_not((R - 1) * (R - 1) < A); - //assume_abort_if_not(A <= R * R); - assume_abort_if_not(A % 2 == 1); - - u = 2 * R + 1; - v = 1; - r = R * R - A; - - - while (1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r != 0)) - break; - - while (1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r > 0)) - break; - r = r - v; - v = v + 2; - } - - while (1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r < 0)) - break; - r = r + u; - u = u + 2; - } - } - - __VERIFIER_assert(4*A == u*u - v*v - 2*u + 2*v); - return 0; -} diff --git a/c/nla-digbench-scaling/fermat1_valuebound2.yml b/c/nla-digbench-scaling/fermat1_valuebound2.yml deleted file mode 100644 index a9aa23af584..00000000000 --- a/c/nla-digbench-scaling/fermat1_valuebound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'fermat1_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat1_valuebound20.c b/c/nla-digbench-scaling/fermat1_valuebound20.c deleted file mode 100644 index e48be42f779..00000000000 --- a/c/nla-digbench-scaling/fermat1_valuebound20.c +++ /dev/null @@ -1,58 +0,0 @@ -/* program computing a divisor for factorisation, by Knuth 4.5.4 Alg C ? */ - -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int A, R; - int u, v, r; - A = __VERIFIER_nondet_double(); - assume_abort_if_not(A>0 && A<=20); - R = __VERIFIER_nondet_double(); - assume_abort_if_not(R>0 && R<=20); - assume_abort_if_not((R - 1) * (R - 1) < A); - //assume_abort_if_not(A <= R * R); - assume_abort_if_not(A % 2 == 1); - - u = 2 * R + 1; - v = 1; - r = R * R - A; - - - while (1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r != 0)) - break; - - while (1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r > 0)) - break; - r = r - v; - v = v + 2; - } - - while (1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r < 0)) - break; - r = r + u; - u = u + 2; - } - } - - __VERIFIER_assert(4*A == u*u - v*v - 2*u + 2*v); - return 0; -} diff --git a/c/nla-digbench-scaling/fermat1_valuebound20.yml b/c/nla-digbench-scaling/fermat1_valuebound20.yml deleted file mode 100644 index fc304c382e2..00000000000 --- a/c/nla-digbench-scaling/fermat1_valuebound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'fermat1_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat1_valuebound5.c b/c/nla-digbench-scaling/fermat1_valuebound5.c deleted file mode 100644 index 55aee5e0862..00000000000 --- a/c/nla-digbench-scaling/fermat1_valuebound5.c +++ /dev/null @@ -1,58 +0,0 @@ -/* program computing a divisor for factorisation, by Knuth 4.5.4 Alg C ? */ - -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int A, R; - int u, v, r; - A = __VERIFIER_nondet_double(); - assume_abort_if_not(A>0 && A<=5); - R = __VERIFIER_nondet_double(); - assume_abort_if_not(R>0 && R<=5); - assume_abort_if_not((R - 1) * (R - 1) < A); - //assume_abort_if_not(A <= R * R); - assume_abort_if_not(A % 2 == 1); - - u = 2 * R + 1; - v = 1; - r = R * R - A; - - - while (1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r != 0)) - break; - - while (1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r > 0)) - break; - r = r - v; - v = v + 2; - } - - while (1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r < 0)) - break; - r = r + u; - u = u + 2; - } - } - - __VERIFIER_assert(4*A == u*u - v*v - 2*u + 2*v); - return 0; -} diff --git a/c/nla-digbench-scaling/fermat1_valuebound5.yml b/c/nla-digbench-scaling/fermat1_valuebound5.yml deleted file mode 100644 index 5d8a5c5c0b8..00000000000 --- a/c/nla-digbench-scaling/fermat1_valuebound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'fermat1_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat1_valuebound50.c b/c/nla-digbench-scaling/fermat1_valuebound50.c deleted file mode 100644 index 396c6d4547a..00000000000 --- a/c/nla-digbench-scaling/fermat1_valuebound50.c +++ /dev/null @@ -1,58 +0,0 @@ -/* program computing a divisor for factorisation, by Knuth 4.5.4 Alg C ? */ - -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int A, R; - int u, v, r; - A = __VERIFIER_nondet_double(); - assume_abort_if_not(A>0 && A<=50); - R = __VERIFIER_nondet_double(); - assume_abort_if_not(R>0 && R<=50); - assume_abort_if_not((R - 1) * (R - 1) < A); - //assume_abort_if_not(A <= R * R); - assume_abort_if_not(A % 2 == 1); - - u = 2 * R + 1; - v = 1; - r = R * R - A; - - - while (1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r != 0)) - break; - - while (1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r > 0)) - break; - r = r - v; - v = v + 2; - } - - while (1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r < 0)) - break; - r = r + u; - u = u + 2; - } - } - - __VERIFIER_assert(4*A == u*u - v*v - 2*u + 2*v); - return 0; -} diff --git a/c/nla-digbench-scaling/fermat1_valuebound50.yml b/c/nla-digbench-scaling/fermat1_valuebound50.yml deleted file mode 100644 index c3407bfcd30..00000000000 --- a/c/nla-digbench-scaling/fermat1_valuebound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'fermat1_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat2-ll_unwindbound1.c b/c/nla-digbench-scaling/fermat2-ll_unwindbound1.c new file mode 100644 index 00000000000..18c740a109a --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_unwindbound1.c @@ -0,0 +1,50 @@ +/* program computing a divisor for factorisation, by Bressoud */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "fermat2-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int A, R; + long long u, v, r; + A = __VERIFIER_nondet_int(); + R = __VERIFIER_nondet_int(); + //assume_abort_if_not(A >= 1); + assume_abort_if_not(((long long) R - 1) * ((long long) R - 1) < A); + //assume_abort_if_not(A <= R * R); + assume_abort_if_not(A % 2 == 1); + + u = ((long long) 2 * R) + 1; + v = 1; + r = ((long long) R * R) - A; + + while (counter++<1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r != 0)) break; + + if (r > 0) { + r = r - v; + v = v + 2; + } else { + r = r + u; + u = u + 2; + } + } + + //return (u - v) / 2; + __VERIFIER_assert(((long long) 4*A) == u*u - v*v - 2*u + 2*v); + return 0; +} diff --git a/c/nla-digbench-scaling/fermat2-ll_unwindbound1.yml b/c/nla-digbench-scaling/fermat2-ll_unwindbound1.yml new file mode 100644 index 00000000000..5b3569b5d6d --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_unwindbound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'fermat2-ll_unwindbound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat2-ll_unwindbound10.c b/c/nla-digbench-scaling/fermat2-ll_unwindbound10.c new file mode 100644 index 00000000000..776df163f50 --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_unwindbound10.c @@ -0,0 +1,50 @@ +/* program computing a divisor for factorisation, by Bressoud */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "fermat2-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int A, R; + long long u, v, r; + A = __VERIFIER_nondet_int(); + R = __VERIFIER_nondet_int(); + //assume_abort_if_not(A >= 1); + assume_abort_if_not(((long long) R - 1) * ((long long) R - 1) < A); + //assume_abort_if_not(A <= R * R); + assume_abort_if_not(A % 2 == 1); + + u = ((long long) 2 * R) + 1; + v = 1; + r = ((long long) R * R) - A; + + while (counter++<10) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r != 0)) break; + + if (r > 0) { + r = r - v; + v = v + 2; + } else { + r = r + u; + u = u + 2; + } + } + + //return (u - v) / 2; + __VERIFIER_assert(((long long) 4*A) == u*u - v*v - 2*u + 2*v); + return 0; +} diff --git a/c/nla-digbench-scaling/fermat2-ll_unwindbound10.yml b/c/nla-digbench-scaling/fermat2-ll_unwindbound10.yml new file mode 100644 index 00000000000..b95aee2d6e6 --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_unwindbound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'fermat2-ll_unwindbound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat2-ll_unwindbound100.c b/c/nla-digbench-scaling/fermat2-ll_unwindbound100.c new file mode 100644 index 00000000000..f153a5c6b0e --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_unwindbound100.c @@ -0,0 +1,50 @@ +/* program computing a divisor for factorisation, by Bressoud */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "fermat2-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int A, R; + long long u, v, r; + A = __VERIFIER_nondet_int(); + R = __VERIFIER_nondet_int(); + //assume_abort_if_not(A >= 1); + assume_abort_if_not(((long long) R - 1) * ((long long) R - 1) < A); + //assume_abort_if_not(A <= R * R); + assume_abort_if_not(A % 2 == 1); + + u = ((long long) 2 * R) + 1; + v = 1; + r = ((long long) R * R) - A; + + while (counter++<100) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r != 0)) break; + + if (r > 0) { + r = r - v; + v = v + 2; + } else { + r = r + u; + u = u + 2; + } + } + + //return (u - v) / 2; + __VERIFIER_assert(((long long) 4*A) == u*u - v*v - 2*u + 2*v); + return 0; +} diff --git a/c/nla-digbench-scaling/fermat2-ll_unwindbound100.yml b/c/nla-digbench-scaling/fermat2-ll_unwindbound100.yml new file mode 100644 index 00000000000..a81ac881188 --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_unwindbound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'fermat2-ll_unwindbound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat2-ll_unwindbound2.c b/c/nla-digbench-scaling/fermat2-ll_unwindbound2.c new file mode 100644 index 00000000000..7eeae708978 --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_unwindbound2.c @@ -0,0 +1,50 @@ +/* program computing a divisor for factorisation, by Bressoud */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "fermat2-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int A, R; + long long u, v, r; + A = __VERIFIER_nondet_int(); + R = __VERIFIER_nondet_int(); + //assume_abort_if_not(A >= 1); + assume_abort_if_not(((long long) R - 1) * ((long long) R - 1) < A); + //assume_abort_if_not(A <= R * R); + assume_abort_if_not(A % 2 == 1); + + u = ((long long) 2 * R) + 1; + v = 1; + r = ((long long) R * R) - A; + + while (counter++<2) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r != 0)) break; + + if (r > 0) { + r = r - v; + v = v + 2; + } else { + r = r + u; + u = u + 2; + } + } + + //return (u - v) / 2; + __VERIFIER_assert(((long long) 4*A) == u*u - v*v - 2*u + 2*v); + return 0; +} diff --git a/c/nla-digbench-scaling/fermat2-ll_unwindbound2.yml b/c/nla-digbench-scaling/fermat2-ll_unwindbound2.yml new file mode 100644 index 00000000000..74a5098f32f --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_unwindbound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'fermat2-ll_unwindbound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat2-ll_unwindbound20.c b/c/nla-digbench-scaling/fermat2-ll_unwindbound20.c new file mode 100644 index 00000000000..8c64f88258d --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_unwindbound20.c @@ -0,0 +1,50 @@ +/* program computing a divisor for factorisation, by Bressoud */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "fermat2-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int A, R; + long long u, v, r; + A = __VERIFIER_nondet_int(); + R = __VERIFIER_nondet_int(); + //assume_abort_if_not(A >= 1); + assume_abort_if_not(((long long) R - 1) * ((long long) R - 1) < A); + //assume_abort_if_not(A <= R * R); + assume_abort_if_not(A % 2 == 1); + + u = ((long long) 2 * R) + 1; + v = 1; + r = ((long long) R * R) - A; + + while (counter++<20) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r != 0)) break; + + if (r > 0) { + r = r - v; + v = v + 2; + } else { + r = r + u; + u = u + 2; + } + } + + //return (u - v) / 2; + __VERIFIER_assert(((long long) 4*A) == u*u - v*v - 2*u + 2*v); + return 0; +} diff --git a/c/nla-digbench-scaling/fermat2-ll_unwindbound20.yml b/c/nla-digbench-scaling/fermat2-ll_unwindbound20.yml new file mode 100644 index 00000000000..8a97247d56e --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_unwindbound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'fermat2-ll_unwindbound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat2-ll_unwindbound5.c b/c/nla-digbench-scaling/fermat2-ll_unwindbound5.c new file mode 100644 index 00000000000..79174f17298 --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_unwindbound5.c @@ -0,0 +1,50 @@ +/* program computing a divisor for factorisation, by Bressoud */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "fermat2-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int A, R; + long long u, v, r; + A = __VERIFIER_nondet_int(); + R = __VERIFIER_nondet_int(); + //assume_abort_if_not(A >= 1); + assume_abort_if_not(((long long) R - 1) * ((long long) R - 1) < A); + //assume_abort_if_not(A <= R * R); + assume_abort_if_not(A % 2 == 1); + + u = ((long long) 2 * R) + 1; + v = 1; + r = ((long long) R * R) - A; + + while (counter++<5) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r != 0)) break; + + if (r > 0) { + r = r - v; + v = v + 2; + } else { + r = r + u; + u = u + 2; + } + } + + //return (u - v) / 2; + __VERIFIER_assert(((long long) 4*A) == u*u - v*v - 2*u + 2*v); + return 0; +} diff --git a/c/nla-digbench-scaling/fermat2-ll_unwindbound5.yml b/c/nla-digbench-scaling/fermat2-ll_unwindbound5.yml new file mode 100644 index 00000000000..80239d6eaae --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_unwindbound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'fermat2-ll_unwindbound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat2-ll_unwindbound50.c b/c/nla-digbench-scaling/fermat2-ll_unwindbound50.c new file mode 100644 index 00000000000..b185c11ee19 --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_unwindbound50.c @@ -0,0 +1,50 @@ +/* program computing a divisor for factorisation, by Bressoud */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "fermat2-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int A, R; + long long u, v, r; + A = __VERIFIER_nondet_int(); + R = __VERIFIER_nondet_int(); + //assume_abort_if_not(A >= 1); + assume_abort_if_not(((long long) R - 1) * ((long long) R - 1) < A); + //assume_abort_if_not(A <= R * R); + assume_abort_if_not(A % 2 == 1); + + u = ((long long) 2 * R) + 1; + v = 1; + r = ((long long) R * R) - A; + + while (counter++<50) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r != 0)) break; + + if (r > 0) { + r = r - v; + v = v + 2; + } else { + r = r + u; + u = u + 2; + } + } + + //return (u - v) / 2; + __VERIFIER_assert(((long long) 4*A) == u*u - v*v - 2*u + 2*v); + return 0; +} diff --git a/c/nla-digbench-scaling/fermat2-ll_unwindbound50.yml b/c/nla-digbench-scaling/fermat2-ll_unwindbound50.yml new file mode 100644 index 00000000000..d2c78639010 --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_unwindbound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'fermat2-ll_unwindbound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat2-ll_valuebound1.c b/c/nla-digbench-scaling/fermat2-ll_valuebound1.c new file mode 100644 index 00000000000..9715ce7dcb0 --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_valuebound1.c @@ -0,0 +1,51 @@ +/* program computing a divisor for factorisation, by Bressoud */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "fermat2-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int A, R; + long long u, v, r; + A = __VERIFIER_nondet_int(); + assume_abort_if_not(A>=0 && A<=1); + R = __VERIFIER_nondet_int(); + assume_abort_if_not(R>=0 && R<=1); + //assume_abort_if_not(A >= 1); + assume_abort_if_not(((long long) R - 1) * ((long long) R - 1) < A); + //assume_abort_if_not(A <= R * R); + assume_abort_if_not(A % 2 == 1); + + u = ((long long) 2 * R) + 1; + v = 1; + r = ((long long) R * R) - A; + + while (1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r != 0)) break; + + if (r > 0) { + r = r - v; + v = v + 2; + } else { + r = r + u; + u = u + 2; + } + } + + //return (u - v) / 2; + __VERIFIER_assert(((long long) 4*A) == u*u - v*v - 2*u + 2*v); + return 0; +} diff --git a/c/nla-digbench-scaling/fermat2-ll_valuebound1.yml b/c/nla-digbench-scaling/fermat2-ll_valuebound1.yml new file mode 100644 index 00000000000..95be87d615c --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_valuebound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'fermat2-ll_valuebound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat2-ll_valuebound10.c b/c/nla-digbench-scaling/fermat2-ll_valuebound10.c new file mode 100644 index 00000000000..c730cd10a10 --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_valuebound10.c @@ -0,0 +1,51 @@ +/* program computing a divisor for factorisation, by Bressoud */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "fermat2-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int A, R; + long long u, v, r; + A = __VERIFIER_nondet_int(); + assume_abort_if_not(A>=0 && A<=10); + R = __VERIFIER_nondet_int(); + assume_abort_if_not(R>=0 && R<=10); + //assume_abort_if_not(A >= 1); + assume_abort_if_not(((long long) R - 1) * ((long long) R - 1) < A); + //assume_abort_if_not(A <= R * R); + assume_abort_if_not(A % 2 == 1); + + u = ((long long) 2 * R) + 1; + v = 1; + r = ((long long) R * R) - A; + + while (1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r != 0)) break; + + if (r > 0) { + r = r - v; + v = v + 2; + } else { + r = r + u; + u = u + 2; + } + } + + //return (u - v) / 2; + __VERIFIER_assert(((long long) 4*A) == u*u - v*v - 2*u + 2*v); + return 0; +} diff --git a/c/nla-digbench-scaling/fermat2-ll_valuebound10.yml b/c/nla-digbench-scaling/fermat2-ll_valuebound10.yml new file mode 100644 index 00000000000..b270c8e6524 --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_valuebound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'fermat2-ll_valuebound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat2-ll_valuebound100.c b/c/nla-digbench-scaling/fermat2-ll_valuebound100.c new file mode 100644 index 00000000000..e3118b02d6b --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_valuebound100.c @@ -0,0 +1,51 @@ +/* program computing a divisor for factorisation, by Bressoud */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "fermat2-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int A, R; + long long u, v, r; + A = __VERIFIER_nondet_int(); + assume_abort_if_not(A>=0 && A<=100); + R = __VERIFIER_nondet_int(); + assume_abort_if_not(R>=0 && R<=100); + //assume_abort_if_not(A >= 1); + assume_abort_if_not(((long long) R - 1) * ((long long) R - 1) < A); + //assume_abort_if_not(A <= R * R); + assume_abort_if_not(A % 2 == 1); + + u = ((long long) 2 * R) + 1; + v = 1; + r = ((long long) R * R) - A; + + while (1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r != 0)) break; + + if (r > 0) { + r = r - v; + v = v + 2; + } else { + r = r + u; + u = u + 2; + } + } + + //return (u - v) / 2; + __VERIFIER_assert(((long long) 4*A) == u*u - v*v - 2*u + 2*v); + return 0; +} diff --git a/c/nla-digbench-scaling/fermat2-ll_valuebound100.yml b/c/nla-digbench-scaling/fermat2-ll_valuebound100.yml new file mode 100644 index 00000000000..edc0489a51b --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_valuebound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'fermat2-ll_valuebound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat2-ll_valuebound2.c b/c/nla-digbench-scaling/fermat2-ll_valuebound2.c new file mode 100644 index 00000000000..b6eb7fb6f3f --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_valuebound2.c @@ -0,0 +1,51 @@ +/* program computing a divisor for factorisation, by Bressoud */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "fermat2-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int A, R; + long long u, v, r; + A = __VERIFIER_nondet_int(); + assume_abort_if_not(A>=0 && A<=2); + R = __VERIFIER_nondet_int(); + assume_abort_if_not(R>=0 && R<=2); + //assume_abort_if_not(A >= 1); + assume_abort_if_not(((long long) R - 1) * ((long long) R - 1) < A); + //assume_abort_if_not(A <= R * R); + assume_abort_if_not(A % 2 == 1); + + u = ((long long) 2 * R) + 1; + v = 1; + r = ((long long) R * R) - A; + + while (1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r != 0)) break; + + if (r > 0) { + r = r - v; + v = v + 2; + } else { + r = r + u; + u = u + 2; + } + } + + //return (u - v) / 2; + __VERIFIER_assert(((long long) 4*A) == u*u - v*v - 2*u + 2*v); + return 0; +} diff --git a/c/nla-digbench-scaling/fermat2-ll_valuebound2.yml b/c/nla-digbench-scaling/fermat2-ll_valuebound2.yml new file mode 100644 index 00000000000..916ab291545 --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_valuebound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'fermat2-ll_valuebound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat2-ll_valuebound20.c b/c/nla-digbench-scaling/fermat2-ll_valuebound20.c new file mode 100644 index 00000000000..2bb0f3b7af4 --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_valuebound20.c @@ -0,0 +1,51 @@ +/* program computing a divisor for factorisation, by Bressoud */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "fermat2-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int A, R; + long long u, v, r; + A = __VERIFIER_nondet_int(); + assume_abort_if_not(A>=0 && A<=20); + R = __VERIFIER_nondet_int(); + assume_abort_if_not(R>=0 && R<=20); + //assume_abort_if_not(A >= 1); + assume_abort_if_not(((long long) R - 1) * ((long long) R - 1) < A); + //assume_abort_if_not(A <= R * R); + assume_abort_if_not(A % 2 == 1); + + u = ((long long) 2 * R) + 1; + v = 1; + r = ((long long) R * R) - A; + + while (1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r != 0)) break; + + if (r > 0) { + r = r - v; + v = v + 2; + } else { + r = r + u; + u = u + 2; + } + } + + //return (u - v) / 2; + __VERIFIER_assert(((long long) 4*A) == u*u - v*v - 2*u + 2*v); + return 0; +} diff --git a/c/nla-digbench-scaling/fermat2-ll_valuebound20.yml b/c/nla-digbench-scaling/fermat2-ll_valuebound20.yml new file mode 100644 index 00000000000..5e56c390ce9 --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_valuebound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'fermat2-ll_valuebound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat2-ll_valuebound5.c b/c/nla-digbench-scaling/fermat2-ll_valuebound5.c new file mode 100644 index 00000000000..263b55e926f --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_valuebound5.c @@ -0,0 +1,51 @@ +/* program computing a divisor for factorisation, by Bressoud */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "fermat2-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int A, R; + long long u, v, r; + A = __VERIFIER_nondet_int(); + assume_abort_if_not(A>=0 && A<=5); + R = __VERIFIER_nondet_int(); + assume_abort_if_not(R>=0 && R<=5); + //assume_abort_if_not(A >= 1); + assume_abort_if_not(((long long) R - 1) * ((long long) R - 1) < A); + //assume_abort_if_not(A <= R * R); + assume_abort_if_not(A % 2 == 1); + + u = ((long long) 2 * R) + 1; + v = 1; + r = ((long long) R * R) - A; + + while (1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r != 0)) break; + + if (r > 0) { + r = r - v; + v = v + 2; + } else { + r = r + u; + u = u + 2; + } + } + + //return (u - v) / 2; + __VERIFIER_assert(((long long) 4*A) == u*u - v*v - 2*u + 2*v); + return 0; +} diff --git a/c/nla-digbench-scaling/fermat2-ll_valuebound5.yml b/c/nla-digbench-scaling/fermat2-ll_valuebound5.yml new file mode 100644 index 00000000000..e2c8487899f --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_valuebound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'fermat2-ll_valuebound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat2-ll_valuebound50.c b/c/nla-digbench-scaling/fermat2-ll_valuebound50.c new file mode 100644 index 00000000000..cf51e34948a --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_valuebound50.c @@ -0,0 +1,51 @@ +/* program computing a divisor for factorisation, by Bressoud */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "fermat2-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int A, R; + long long u, v, r; + A = __VERIFIER_nondet_int(); + assume_abort_if_not(A>=0 && A<=50); + R = __VERIFIER_nondet_int(); + assume_abort_if_not(R>=0 && R<=50); + //assume_abort_if_not(A >= 1); + assume_abort_if_not(((long long) R - 1) * ((long long) R - 1) < A); + //assume_abort_if_not(A <= R * R); + assume_abort_if_not(A % 2 == 1); + + u = ((long long) 2 * R) + 1; + v = 1; + r = ((long long) R * R) - A; + + while (1) { + __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); + if (!(r != 0)) break; + + if (r > 0) { + r = r - v; + v = v + 2; + } else { + r = r + u; + u = u + 2; + } + } + + //return (u - v) / 2; + __VERIFIER_assert(((long long) 4*A) == u*u - v*v - 2*u + 2*v); + return 0; +} diff --git a/c/nla-digbench-scaling/fermat2-ll_valuebound50.yml b/c/nla-digbench-scaling/fermat2-ll_valuebound50.yml new file mode 100644 index 00000000000..063e5291c54 --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_valuebound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'fermat2-ll_valuebound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat2_unwindbound1.c b/c/nla-digbench-scaling/fermat2_unwindbound1.c deleted file mode 100644 index 772286d1650..00000000000 --- a/c/nla-digbench-scaling/fermat2_unwindbound1.c +++ /dev/null @@ -1,49 +0,0 @@ -/* program computing a divisor for factorisation, by Bressoud */ - -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int A, R; - int u, v, r; - A = __VERIFIER_nondet_double(); - R = __VERIFIER_nondet_double(); - //assume_abort_if_not(A >= 1); - assume_abort_if_not((R - 1) * (R - 1) < A); - //assume_abort_if_not(A <= R * R); - assume_abort_if_not(A % 2 == 1); - - u = 2 * R + 1; - v = 1; - r = R * R - A; - - while (counter++<1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r != 0)) break; - - if (r > 0) { - r = r - v; - v = v + 2; - } else { - r = r + u; - u = u + 2; - } - } - - //return (u - v) / 2; - __VERIFIER_assert(4*A == u*u - v*v - 2*u + 2*v); - return 0; -} diff --git a/c/nla-digbench-scaling/fermat2_unwindbound1.yml b/c/nla-digbench-scaling/fermat2_unwindbound1.yml deleted file mode 100644 index 38f981960c5..00000000000 --- a/c/nla-digbench-scaling/fermat2_unwindbound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'fermat2_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat2_unwindbound10.c b/c/nla-digbench-scaling/fermat2_unwindbound10.c deleted file mode 100644 index 414ccd6fc54..00000000000 --- a/c/nla-digbench-scaling/fermat2_unwindbound10.c +++ /dev/null @@ -1,49 +0,0 @@ -/* program computing a divisor for factorisation, by Bressoud */ - -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int A, R; - int u, v, r; - A = __VERIFIER_nondet_double(); - R = __VERIFIER_nondet_double(); - //assume_abort_if_not(A >= 1); - assume_abort_if_not((R - 1) * (R - 1) < A); - //assume_abort_if_not(A <= R * R); - assume_abort_if_not(A % 2 == 1); - - u = 2 * R + 1; - v = 1; - r = R * R - A; - - while (counter++<10) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r != 0)) break; - - if (r > 0) { - r = r - v; - v = v + 2; - } else { - r = r + u; - u = u + 2; - } - } - - //return (u - v) / 2; - __VERIFIER_assert(4*A == u*u - v*v - 2*u + 2*v); - return 0; -} diff --git a/c/nla-digbench-scaling/fermat2_unwindbound10.yml b/c/nla-digbench-scaling/fermat2_unwindbound10.yml deleted file mode 100644 index 44a6cd01890..00000000000 --- a/c/nla-digbench-scaling/fermat2_unwindbound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'fermat2_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat2_unwindbound100.c b/c/nla-digbench-scaling/fermat2_unwindbound100.c deleted file mode 100644 index 696dbea1b7c..00000000000 --- a/c/nla-digbench-scaling/fermat2_unwindbound100.c +++ /dev/null @@ -1,49 +0,0 @@ -/* program computing a divisor for factorisation, by Bressoud */ - -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int A, R; - int u, v, r; - A = __VERIFIER_nondet_double(); - R = __VERIFIER_nondet_double(); - //assume_abort_if_not(A >= 1); - assume_abort_if_not((R - 1) * (R - 1) < A); - //assume_abort_if_not(A <= R * R); - assume_abort_if_not(A % 2 == 1); - - u = 2 * R + 1; - v = 1; - r = R * R - A; - - while (counter++<100) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r != 0)) break; - - if (r > 0) { - r = r - v; - v = v + 2; - } else { - r = r + u; - u = u + 2; - } - } - - //return (u - v) / 2; - __VERIFIER_assert(4*A == u*u - v*v - 2*u + 2*v); - return 0; -} diff --git a/c/nla-digbench-scaling/fermat2_unwindbound100.yml b/c/nla-digbench-scaling/fermat2_unwindbound100.yml deleted file mode 100644 index 815b89d812d..00000000000 --- a/c/nla-digbench-scaling/fermat2_unwindbound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'fermat2_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat2_unwindbound2.c b/c/nla-digbench-scaling/fermat2_unwindbound2.c deleted file mode 100644 index d84dd17e916..00000000000 --- a/c/nla-digbench-scaling/fermat2_unwindbound2.c +++ /dev/null @@ -1,49 +0,0 @@ -/* program computing a divisor for factorisation, by Bressoud */ - -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int A, R; - int u, v, r; - A = __VERIFIER_nondet_double(); - R = __VERIFIER_nondet_double(); - //assume_abort_if_not(A >= 1); - assume_abort_if_not((R - 1) * (R - 1) < A); - //assume_abort_if_not(A <= R * R); - assume_abort_if_not(A % 2 == 1); - - u = 2 * R + 1; - v = 1; - r = R * R - A; - - while (counter++<2) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r != 0)) break; - - if (r > 0) { - r = r - v; - v = v + 2; - } else { - r = r + u; - u = u + 2; - } - } - - //return (u - v) / 2; - __VERIFIER_assert(4*A == u*u - v*v - 2*u + 2*v); - return 0; -} diff --git a/c/nla-digbench-scaling/fermat2_unwindbound2.yml b/c/nla-digbench-scaling/fermat2_unwindbound2.yml deleted file mode 100644 index a563180ea31..00000000000 --- a/c/nla-digbench-scaling/fermat2_unwindbound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'fermat2_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat2_unwindbound20.c b/c/nla-digbench-scaling/fermat2_unwindbound20.c deleted file mode 100644 index d1de90981ee..00000000000 --- a/c/nla-digbench-scaling/fermat2_unwindbound20.c +++ /dev/null @@ -1,49 +0,0 @@ -/* program computing a divisor for factorisation, by Bressoud */ - -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int A, R; - int u, v, r; - A = __VERIFIER_nondet_double(); - R = __VERIFIER_nondet_double(); - //assume_abort_if_not(A >= 1); - assume_abort_if_not((R - 1) * (R - 1) < A); - //assume_abort_if_not(A <= R * R); - assume_abort_if_not(A % 2 == 1); - - u = 2 * R + 1; - v = 1; - r = R * R - A; - - while (counter++<20) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r != 0)) break; - - if (r > 0) { - r = r - v; - v = v + 2; - } else { - r = r + u; - u = u + 2; - } - } - - //return (u - v) / 2; - __VERIFIER_assert(4*A == u*u - v*v - 2*u + 2*v); - return 0; -} diff --git a/c/nla-digbench-scaling/fermat2_unwindbound20.yml b/c/nla-digbench-scaling/fermat2_unwindbound20.yml deleted file mode 100644 index 199f31f4415..00000000000 --- a/c/nla-digbench-scaling/fermat2_unwindbound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'fermat2_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat2_unwindbound5.c b/c/nla-digbench-scaling/fermat2_unwindbound5.c deleted file mode 100644 index 9e73f5744b7..00000000000 --- a/c/nla-digbench-scaling/fermat2_unwindbound5.c +++ /dev/null @@ -1,49 +0,0 @@ -/* program computing a divisor for factorisation, by Bressoud */ - -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int A, R; - int u, v, r; - A = __VERIFIER_nondet_double(); - R = __VERIFIER_nondet_double(); - //assume_abort_if_not(A >= 1); - assume_abort_if_not((R - 1) * (R - 1) < A); - //assume_abort_if_not(A <= R * R); - assume_abort_if_not(A % 2 == 1); - - u = 2 * R + 1; - v = 1; - r = R * R - A; - - while (counter++<5) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r != 0)) break; - - if (r > 0) { - r = r - v; - v = v + 2; - } else { - r = r + u; - u = u + 2; - } - } - - //return (u - v) / 2; - __VERIFIER_assert(4*A == u*u - v*v - 2*u + 2*v); - return 0; -} diff --git a/c/nla-digbench-scaling/fermat2_unwindbound5.yml b/c/nla-digbench-scaling/fermat2_unwindbound5.yml deleted file mode 100644 index e723103a31a..00000000000 --- a/c/nla-digbench-scaling/fermat2_unwindbound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'fermat2_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat2_unwindbound50.c b/c/nla-digbench-scaling/fermat2_unwindbound50.c deleted file mode 100644 index d213c5eedce..00000000000 --- a/c/nla-digbench-scaling/fermat2_unwindbound50.c +++ /dev/null @@ -1,49 +0,0 @@ -/* program computing a divisor for factorisation, by Bressoud */ - -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int A, R; - int u, v, r; - A = __VERIFIER_nondet_double(); - R = __VERIFIER_nondet_double(); - //assume_abort_if_not(A >= 1); - assume_abort_if_not((R - 1) * (R - 1) < A); - //assume_abort_if_not(A <= R * R); - assume_abort_if_not(A % 2 == 1); - - u = 2 * R + 1; - v = 1; - r = R * R - A; - - while (counter++<50) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r != 0)) break; - - if (r > 0) { - r = r - v; - v = v + 2; - } else { - r = r + u; - u = u + 2; - } - } - - //return (u - v) / 2; - __VERIFIER_assert(4*A == u*u - v*v - 2*u + 2*v); - return 0; -} diff --git a/c/nla-digbench-scaling/fermat2_unwindbound50.yml b/c/nla-digbench-scaling/fermat2_unwindbound50.yml deleted file mode 100644 index 6a828aec824..00000000000 --- a/c/nla-digbench-scaling/fermat2_unwindbound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'fermat2_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat2_valuebound1.c b/c/nla-digbench-scaling/fermat2_valuebound1.c deleted file mode 100644 index 341c66e8b6d..00000000000 --- a/c/nla-digbench-scaling/fermat2_valuebound1.c +++ /dev/null @@ -1,50 +0,0 @@ -/* program computing a divisor for factorisation, by Bressoud */ - -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int A, R; - int u, v, r; - A = __VERIFIER_nondet_double(); - assume_abort_if_not(A>0 && A<=1); - R = __VERIFIER_nondet_double(); - assume_abort_if_not(R>0 && R<=1); - //assume_abort_if_not(A >= 1); - assume_abort_if_not((R - 1) * (R - 1) < A); - //assume_abort_if_not(A <= R * R); - assume_abort_if_not(A % 2 == 1); - - u = 2 * R + 1; - v = 1; - r = R * R - A; - - while (1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r != 0)) break; - - if (r > 0) { - r = r - v; - v = v + 2; - } else { - r = r + u; - u = u + 2; - } - } - - //return (u - v) / 2; - __VERIFIER_assert(4*A == u*u - v*v - 2*u + 2*v); - return 0; -} diff --git a/c/nla-digbench-scaling/fermat2_valuebound1.yml b/c/nla-digbench-scaling/fermat2_valuebound1.yml deleted file mode 100644 index b240252dd92..00000000000 --- a/c/nla-digbench-scaling/fermat2_valuebound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'fermat2_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat2_valuebound10.c b/c/nla-digbench-scaling/fermat2_valuebound10.c deleted file mode 100644 index decc5aa05ec..00000000000 --- a/c/nla-digbench-scaling/fermat2_valuebound10.c +++ /dev/null @@ -1,50 +0,0 @@ -/* program computing a divisor for factorisation, by Bressoud */ - -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int A, R; - int u, v, r; - A = __VERIFIER_nondet_double(); - assume_abort_if_not(A>0 && A<=10); - R = __VERIFIER_nondet_double(); - assume_abort_if_not(R>0 && R<=10); - //assume_abort_if_not(A >= 1); - assume_abort_if_not((R - 1) * (R - 1) < A); - //assume_abort_if_not(A <= R * R); - assume_abort_if_not(A % 2 == 1); - - u = 2 * R + 1; - v = 1; - r = R * R - A; - - while (1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r != 0)) break; - - if (r > 0) { - r = r - v; - v = v + 2; - } else { - r = r + u; - u = u + 2; - } - } - - //return (u - v) / 2; - __VERIFIER_assert(4*A == u*u - v*v - 2*u + 2*v); - return 0; -} diff --git a/c/nla-digbench-scaling/fermat2_valuebound10.yml b/c/nla-digbench-scaling/fermat2_valuebound10.yml deleted file mode 100644 index 31498021001..00000000000 --- a/c/nla-digbench-scaling/fermat2_valuebound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'fermat2_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat2_valuebound100.c b/c/nla-digbench-scaling/fermat2_valuebound100.c deleted file mode 100644 index 8d0eea6dc54..00000000000 --- a/c/nla-digbench-scaling/fermat2_valuebound100.c +++ /dev/null @@ -1,50 +0,0 @@ -/* program computing a divisor for factorisation, by Bressoud */ - -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int A, R; - int u, v, r; - A = __VERIFIER_nondet_double(); - assume_abort_if_not(A>0 && A<=100); - R = __VERIFIER_nondet_double(); - assume_abort_if_not(R>0 && R<=100); - //assume_abort_if_not(A >= 1); - assume_abort_if_not((R - 1) * (R - 1) < A); - //assume_abort_if_not(A <= R * R); - assume_abort_if_not(A % 2 == 1); - - u = 2 * R + 1; - v = 1; - r = R * R - A; - - while (1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r != 0)) break; - - if (r > 0) { - r = r - v; - v = v + 2; - } else { - r = r + u; - u = u + 2; - } - } - - //return (u - v) / 2; - __VERIFIER_assert(4*A == u*u - v*v - 2*u + 2*v); - return 0; -} diff --git a/c/nla-digbench-scaling/fermat2_valuebound100.yml b/c/nla-digbench-scaling/fermat2_valuebound100.yml deleted file mode 100644 index c718ca7fdca..00000000000 --- a/c/nla-digbench-scaling/fermat2_valuebound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'fermat2_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat2_valuebound2.c b/c/nla-digbench-scaling/fermat2_valuebound2.c deleted file mode 100644 index 14c2f67eca6..00000000000 --- a/c/nla-digbench-scaling/fermat2_valuebound2.c +++ /dev/null @@ -1,50 +0,0 @@ -/* program computing a divisor for factorisation, by Bressoud */ - -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int A, R; - int u, v, r; - A = __VERIFIER_nondet_double(); - assume_abort_if_not(A>0 && A<=2); - R = __VERIFIER_nondet_double(); - assume_abort_if_not(R>0 && R<=2); - //assume_abort_if_not(A >= 1); - assume_abort_if_not((R - 1) * (R - 1) < A); - //assume_abort_if_not(A <= R * R); - assume_abort_if_not(A % 2 == 1); - - u = 2 * R + 1; - v = 1; - r = R * R - A; - - while (1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r != 0)) break; - - if (r > 0) { - r = r - v; - v = v + 2; - } else { - r = r + u; - u = u + 2; - } - } - - //return (u - v) / 2; - __VERIFIER_assert(4*A == u*u - v*v - 2*u + 2*v); - return 0; -} diff --git a/c/nla-digbench-scaling/fermat2_valuebound2.yml b/c/nla-digbench-scaling/fermat2_valuebound2.yml deleted file mode 100644 index 76405eefdc0..00000000000 --- a/c/nla-digbench-scaling/fermat2_valuebound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'fermat2_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat2_valuebound20.c b/c/nla-digbench-scaling/fermat2_valuebound20.c deleted file mode 100644 index a845bc51983..00000000000 --- a/c/nla-digbench-scaling/fermat2_valuebound20.c +++ /dev/null @@ -1,50 +0,0 @@ -/* program computing a divisor for factorisation, by Bressoud */ - -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int A, R; - int u, v, r; - A = __VERIFIER_nondet_double(); - assume_abort_if_not(A>0 && A<=20); - R = __VERIFIER_nondet_double(); - assume_abort_if_not(R>0 && R<=20); - //assume_abort_if_not(A >= 1); - assume_abort_if_not((R - 1) * (R - 1) < A); - //assume_abort_if_not(A <= R * R); - assume_abort_if_not(A % 2 == 1); - - u = 2 * R + 1; - v = 1; - r = R * R - A; - - while (1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r != 0)) break; - - if (r > 0) { - r = r - v; - v = v + 2; - } else { - r = r + u; - u = u + 2; - } - } - - //return (u - v) / 2; - __VERIFIER_assert(4*A == u*u - v*v - 2*u + 2*v); - return 0; -} diff --git a/c/nla-digbench-scaling/fermat2_valuebound20.yml b/c/nla-digbench-scaling/fermat2_valuebound20.yml deleted file mode 100644 index 50f76ee0d50..00000000000 --- a/c/nla-digbench-scaling/fermat2_valuebound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'fermat2_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat2_valuebound5.c b/c/nla-digbench-scaling/fermat2_valuebound5.c deleted file mode 100644 index e4510c5d776..00000000000 --- a/c/nla-digbench-scaling/fermat2_valuebound5.c +++ /dev/null @@ -1,50 +0,0 @@ -/* program computing a divisor for factorisation, by Bressoud */ - -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int A, R; - int u, v, r; - A = __VERIFIER_nondet_double(); - assume_abort_if_not(A>0 && A<=5); - R = __VERIFIER_nondet_double(); - assume_abort_if_not(R>0 && R<=5); - //assume_abort_if_not(A >= 1); - assume_abort_if_not((R - 1) * (R - 1) < A); - //assume_abort_if_not(A <= R * R); - assume_abort_if_not(A % 2 == 1); - - u = 2 * R + 1; - v = 1; - r = R * R - A; - - while (1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r != 0)) break; - - if (r > 0) { - r = r - v; - v = v + 2; - } else { - r = r + u; - u = u + 2; - } - } - - //return (u - v) / 2; - __VERIFIER_assert(4*A == u*u - v*v - 2*u + 2*v); - return 0; -} diff --git a/c/nla-digbench-scaling/fermat2_valuebound5.yml b/c/nla-digbench-scaling/fermat2_valuebound5.yml deleted file mode 100644 index 0c4857e2d4d..00000000000 --- a/c/nla-digbench-scaling/fermat2_valuebound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'fermat2_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/fermat2_valuebound50.c b/c/nla-digbench-scaling/fermat2_valuebound50.c deleted file mode 100644 index 631911bbe52..00000000000 --- a/c/nla-digbench-scaling/fermat2_valuebound50.c +++ /dev/null @@ -1,50 +0,0 @@ -/* program computing a divisor for factorisation, by Bressoud */ - -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int A, R; - int u, v, r; - A = __VERIFIER_nondet_double(); - assume_abort_if_not(A>0 && A<=50); - R = __VERIFIER_nondet_double(); - assume_abort_if_not(R>0 && R<=50); - //assume_abort_if_not(A >= 1); - assume_abort_if_not((R - 1) * (R - 1) < A); - //assume_abort_if_not(A <= R * R); - assume_abort_if_not(A % 2 == 1); - - u = 2 * R + 1; - v = 1; - r = R * R - A; - - while (1) { - __VERIFIER_assert(4*(A+r) == u*u - v*v - 2*u + 2*v); - if (!(r != 0)) break; - - if (r > 0) { - r = r - v; - v = v + 2; - } else { - r = r + u; - u = u + 2; - } - } - - //return (u - v) / 2; - __VERIFIER_assert(4*A == u*u - v*v - 2*u + 2*v); - return 0; -} diff --git a/c/nla-digbench-scaling/fermat2_valuebound50.yml b/c/nla-digbench-scaling/fermat2_valuebound50.yml deleted file mode 100644 index 9a092f3aae2..00000000000 --- a/c/nla-digbench-scaling/fermat2_valuebound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'fermat2_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/freire1_unwindbound1.c b/c/nla-digbench-scaling/freire1_unwindbound1.c index 86652563c07..0ff48285b33 100644 --- a/c/nla-digbench-scaling/freire1_unwindbound1.c +++ b/c/nla-digbench-scaling/freire1_unwindbound1.c @@ -6,7 +6,8 @@ cpa.sh -kInduction -setprop solver.solver=z3 freire1.c */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "freire1.c", 10, "reach_error"); } extern double __VERIFIER_nondet_double(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/freire1_unwindbound1.yml b/c/nla-digbench-scaling/freire1_unwindbound1.yml index b966d90f572..be0bc2ad660 100644 --- a/c/nla-digbench-scaling/freire1_unwindbound1.yml +++ b/c/nla-digbench-scaling/freire1_unwindbound1.yml @@ -3,6 +3,8 @@ input_files: 'freire1_unwindbound1.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/freire1_unwindbound10.c b/c/nla-digbench-scaling/freire1_unwindbound10.c index cc8fd215ce5..e6aab6fa835 100644 --- a/c/nla-digbench-scaling/freire1_unwindbound10.c +++ b/c/nla-digbench-scaling/freire1_unwindbound10.c @@ -6,7 +6,8 @@ cpa.sh -kInduction -setprop solver.solver=z3 freire1.c */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "freire1.c", 10, "reach_error"); } extern double __VERIFIER_nondet_double(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/freire1_unwindbound10.yml b/c/nla-digbench-scaling/freire1_unwindbound10.yml index e21d2214234..2af9b872951 100644 --- a/c/nla-digbench-scaling/freire1_unwindbound10.yml +++ b/c/nla-digbench-scaling/freire1_unwindbound10.yml @@ -3,6 +3,8 @@ input_files: 'freire1_unwindbound10.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/freire1_unwindbound100.c b/c/nla-digbench-scaling/freire1_unwindbound100.c index 296b2b7ec1e..956921efa6c 100644 --- a/c/nla-digbench-scaling/freire1_unwindbound100.c +++ b/c/nla-digbench-scaling/freire1_unwindbound100.c @@ -6,7 +6,8 @@ cpa.sh -kInduction -setprop solver.solver=z3 freire1.c */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "freire1.c", 10, "reach_error"); } extern double __VERIFIER_nondet_double(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/freire1_unwindbound100.yml b/c/nla-digbench-scaling/freire1_unwindbound100.yml index d094b85d102..eca09d6f3b9 100644 --- a/c/nla-digbench-scaling/freire1_unwindbound100.yml +++ b/c/nla-digbench-scaling/freire1_unwindbound100.yml @@ -3,6 +3,8 @@ input_files: 'freire1_unwindbound100.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/freire1_unwindbound2.c b/c/nla-digbench-scaling/freire1_unwindbound2.c index 026f4f0d4ef..21c2490324d 100644 --- a/c/nla-digbench-scaling/freire1_unwindbound2.c +++ b/c/nla-digbench-scaling/freire1_unwindbound2.c @@ -6,7 +6,8 @@ cpa.sh -kInduction -setprop solver.solver=z3 freire1.c */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "freire1.c", 10, "reach_error"); } extern double __VERIFIER_nondet_double(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/freire1_unwindbound2.yml b/c/nla-digbench-scaling/freire1_unwindbound2.yml index b845b3a1bcb..e12f43dce03 100644 --- a/c/nla-digbench-scaling/freire1_unwindbound2.yml +++ b/c/nla-digbench-scaling/freire1_unwindbound2.yml @@ -3,6 +3,8 @@ input_files: 'freire1_unwindbound2.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/freire1_unwindbound20.c b/c/nla-digbench-scaling/freire1_unwindbound20.c index b9ea15874ac..b0e335ac4f7 100644 --- a/c/nla-digbench-scaling/freire1_unwindbound20.c +++ b/c/nla-digbench-scaling/freire1_unwindbound20.c @@ -6,7 +6,8 @@ cpa.sh -kInduction -setprop solver.solver=z3 freire1.c */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "freire1.c", 10, "reach_error"); } extern double __VERIFIER_nondet_double(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/freire1_unwindbound20.yml b/c/nla-digbench-scaling/freire1_unwindbound20.yml index 8b5923de2d3..599f4a5727e 100644 --- a/c/nla-digbench-scaling/freire1_unwindbound20.yml +++ b/c/nla-digbench-scaling/freire1_unwindbound20.yml @@ -3,6 +3,8 @@ input_files: 'freire1_unwindbound20.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/freire1_unwindbound5.c b/c/nla-digbench-scaling/freire1_unwindbound5.c index 07eb60afe55..e4cbf69cb9c 100644 --- a/c/nla-digbench-scaling/freire1_unwindbound5.c +++ b/c/nla-digbench-scaling/freire1_unwindbound5.c @@ -6,7 +6,8 @@ cpa.sh -kInduction -setprop solver.solver=z3 freire1.c */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "freire1.c", 10, "reach_error"); } extern double __VERIFIER_nondet_double(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/freire1_unwindbound5.yml b/c/nla-digbench-scaling/freire1_unwindbound5.yml index e4dabfeebac..e1f0a0d56e6 100644 --- a/c/nla-digbench-scaling/freire1_unwindbound5.yml +++ b/c/nla-digbench-scaling/freire1_unwindbound5.yml @@ -3,6 +3,8 @@ input_files: 'freire1_unwindbound5.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/freire1_unwindbound50.c b/c/nla-digbench-scaling/freire1_unwindbound50.c index cc51dadfec8..fcbe31f9582 100644 --- a/c/nla-digbench-scaling/freire1_unwindbound50.c +++ b/c/nla-digbench-scaling/freire1_unwindbound50.c @@ -6,7 +6,8 @@ cpa.sh -kInduction -setprop solver.solver=z3 freire1.c */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "freire1.c", 10, "reach_error"); } extern double __VERIFIER_nondet_double(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/freire1_unwindbound50.yml b/c/nla-digbench-scaling/freire1_unwindbound50.yml index bb0db687606..adc7686d78d 100644 --- a/c/nla-digbench-scaling/freire1_unwindbound50.yml +++ b/c/nla-digbench-scaling/freire1_unwindbound50.yml @@ -3,6 +3,8 @@ input_files: 'freire1_unwindbound50.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/freire1_valuebound1.c b/c/nla-digbench-scaling/freire1_valuebound1.c index 455a703e9f0..8a354f34309 100644 --- a/c/nla-digbench-scaling/freire1_valuebound1.c +++ b/c/nla-digbench-scaling/freire1_valuebound1.c @@ -6,7 +6,8 @@ cpa.sh -kInduction -setprop solver.solver=z3 freire1.c */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "freire1.c", 10, "reach_error"); } extern double __VERIFIER_nondet_double(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -24,7 +25,7 @@ int main() { int r; double a, x; a = __VERIFIER_nondet_double(); - assume_abort_if_not(a>0 && a<=1); + assume_abort_if_not(a>=0 && a<=1); x = a / 2.0; r = 0; diff --git a/c/nla-digbench-scaling/freire1_valuebound1.yml b/c/nla-digbench-scaling/freire1_valuebound1.yml index a7385edddb9..aedb5d1bc39 100644 --- a/c/nla-digbench-scaling/freire1_valuebound1.yml +++ b/c/nla-digbench-scaling/freire1_valuebound1.yml @@ -3,6 +3,8 @@ input_files: 'freire1_valuebound1.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/freire1_valuebound10.c b/c/nla-digbench-scaling/freire1_valuebound10.c index 9a50b999c23..d2fa619b77c 100644 --- a/c/nla-digbench-scaling/freire1_valuebound10.c +++ b/c/nla-digbench-scaling/freire1_valuebound10.c @@ -6,7 +6,8 @@ cpa.sh -kInduction -setprop solver.solver=z3 freire1.c */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "freire1.c", 10, "reach_error"); } extern double __VERIFIER_nondet_double(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -24,7 +25,7 @@ int main() { int r; double a, x; a = __VERIFIER_nondet_double(); - assume_abort_if_not(a>0 && a<=10); + assume_abort_if_not(a>=0 && a<=10); x = a / 2.0; r = 0; diff --git a/c/nla-digbench-scaling/freire1_valuebound10.yml b/c/nla-digbench-scaling/freire1_valuebound10.yml index 928e5f5fffd..7d7c6c61193 100644 --- a/c/nla-digbench-scaling/freire1_valuebound10.yml +++ b/c/nla-digbench-scaling/freire1_valuebound10.yml @@ -3,6 +3,8 @@ input_files: 'freire1_valuebound10.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/freire1_valuebound100.c b/c/nla-digbench-scaling/freire1_valuebound100.c index 07050141ca1..e0a540906e0 100644 --- a/c/nla-digbench-scaling/freire1_valuebound100.c +++ b/c/nla-digbench-scaling/freire1_valuebound100.c @@ -6,7 +6,8 @@ cpa.sh -kInduction -setprop solver.solver=z3 freire1.c */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "freire1.c", 10, "reach_error"); } extern double __VERIFIER_nondet_double(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -24,7 +25,7 @@ int main() { int r; double a, x; a = __VERIFIER_nondet_double(); - assume_abort_if_not(a>0 && a<=100); + assume_abort_if_not(a>=0 && a<=100); x = a / 2.0; r = 0; diff --git a/c/nla-digbench-scaling/freire1_valuebound100.yml b/c/nla-digbench-scaling/freire1_valuebound100.yml index 9c5b0eb72c0..f560a366ceb 100644 --- a/c/nla-digbench-scaling/freire1_valuebound100.yml +++ b/c/nla-digbench-scaling/freire1_valuebound100.yml @@ -3,6 +3,8 @@ input_files: 'freire1_valuebound100.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/freire1_valuebound2.c b/c/nla-digbench-scaling/freire1_valuebound2.c index 0a2465a65f1..bf6e9ff1907 100644 --- a/c/nla-digbench-scaling/freire1_valuebound2.c +++ b/c/nla-digbench-scaling/freire1_valuebound2.c @@ -6,7 +6,8 @@ cpa.sh -kInduction -setprop solver.solver=z3 freire1.c */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "freire1.c", 10, "reach_error"); } extern double __VERIFIER_nondet_double(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -24,7 +25,7 @@ int main() { int r; double a, x; a = __VERIFIER_nondet_double(); - assume_abort_if_not(a>0 && a<=2); + assume_abort_if_not(a>=0 && a<=2); x = a / 2.0; r = 0; diff --git a/c/nla-digbench-scaling/freire1_valuebound2.yml b/c/nla-digbench-scaling/freire1_valuebound2.yml index 8e28fc28f5a..bff3b4742ed 100644 --- a/c/nla-digbench-scaling/freire1_valuebound2.yml +++ b/c/nla-digbench-scaling/freire1_valuebound2.yml @@ -3,6 +3,8 @@ input_files: 'freire1_valuebound2.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/freire1_valuebound20.c b/c/nla-digbench-scaling/freire1_valuebound20.c index 123d8099145..855917134ed 100644 --- a/c/nla-digbench-scaling/freire1_valuebound20.c +++ b/c/nla-digbench-scaling/freire1_valuebound20.c @@ -6,7 +6,8 @@ cpa.sh -kInduction -setprop solver.solver=z3 freire1.c */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "freire1.c", 10, "reach_error"); } extern double __VERIFIER_nondet_double(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -24,7 +25,7 @@ int main() { int r; double a, x; a = __VERIFIER_nondet_double(); - assume_abort_if_not(a>0 && a<=20); + assume_abort_if_not(a>=0 && a<=20); x = a / 2.0; r = 0; diff --git a/c/nla-digbench-scaling/freire1_valuebound20.yml b/c/nla-digbench-scaling/freire1_valuebound20.yml index 99d8f0eb9dc..f4754efbd5f 100644 --- a/c/nla-digbench-scaling/freire1_valuebound20.yml +++ b/c/nla-digbench-scaling/freire1_valuebound20.yml @@ -3,6 +3,8 @@ input_files: 'freire1_valuebound20.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/freire1_valuebound5.c b/c/nla-digbench-scaling/freire1_valuebound5.c index 91af883e5d0..27e59976cae 100644 --- a/c/nla-digbench-scaling/freire1_valuebound5.c +++ b/c/nla-digbench-scaling/freire1_valuebound5.c @@ -6,7 +6,8 @@ cpa.sh -kInduction -setprop solver.solver=z3 freire1.c */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "freire1.c", 10, "reach_error"); } extern double __VERIFIER_nondet_double(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -24,7 +25,7 @@ int main() { int r; double a, x; a = __VERIFIER_nondet_double(); - assume_abort_if_not(a>0 && a<=5); + assume_abort_if_not(a>=0 && a<=5); x = a / 2.0; r = 0; diff --git a/c/nla-digbench-scaling/freire1_valuebound5.yml b/c/nla-digbench-scaling/freire1_valuebound5.yml index 39081ecb11e..fd726e2ccbb 100644 --- a/c/nla-digbench-scaling/freire1_valuebound5.yml +++ b/c/nla-digbench-scaling/freire1_valuebound5.yml @@ -3,6 +3,8 @@ input_files: 'freire1_valuebound5.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/freire1_valuebound50.c b/c/nla-digbench-scaling/freire1_valuebound50.c index 0957ed9254c..380c6533559 100644 --- a/c/nla-digbench-scaling/freire1_valuebound50.c +++ b/c/nla-digbench-scaling/freire1_valuebound50.c @@ -6,7 +6,8 @@ cpa.sh -kInduction -setprop solver.solver=z3 freire1.c */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "freire1.c", 10, "reach_error"); } extern double __VERIFIER_nondet_double(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -24,7 +25,7 @@ int main() { int r; double a, x; a = __VERIFIER_nondet_double(); - assume_abort_if_not(a>0 && a<=50); + assume_abort_if_not(a>=0 && a<=50); x = a / 2.0; r = 0; diff --git a/c/nla-digbench-scaling/freire1_valuebound50.yml b/c/nla-digbench-scaling/freire1_valuebound50.yml index b27b4613802..7efbf9456f9 100644 --- a/c/nla-digbench-scaling/freire1_valuebound50.yml +++ b/c/nla-digbench-scaling/freire1_valuebound50.yml @@ -3,6 +3,8 @@ input_files: 'freire1_valuebound50.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/freire2_unwindbound1.c b/c/nla-digbench-scaling/freire2_unwindbound1.c index 88c93a14e3c..b9fb61960af 100644 --- a/c/nla-digbench-scaling/freire2_unwindbound1.c +++ b/c/nla-digbench-scaling/freire2_unwindbound1.c @@ -6,7 +6,8 @@ cpa.sh -kInduction -setprop solver.solver=z3 freire2.c */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "freire2.c", 10, "reach_error"); } extern double __VERIFIER_nondet_double(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/freire2_unwindbound1.yml b/c/nla-digbench-scaling/freire2_unwindbound1.yml index eab5b821929..13a21a806db 100644 --- a/c/nla-digbench-scaling/freire2_unwindbound1.yml +++ b/c/nla-digbench-scaling/freire2_unwindbound1.yml @@ -3,6 +3,8 @@ input_files: 'freire2_unwindbound1.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/freire2_unwindbound10.c b/c/nla-digbench-scaling/freire2_unwindbound10.c index 8d7c3526b69..6c94d3a5991 100644 --- a/c/nla-digbench-scaling/freire2_unwindbound10.c +++ b/c/nla-digbench-scaling/freire2_unwindbound10.c @@ -6,7 +6,8 @@ cpa.sh -kInduction -setprop solver.solver=z3 freire2.c */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "freire2.c", 10, "reach_error"); } extern double __VERIFIER_nondet_double(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/freire2_unwindbound10.yml b/c/nla-digbench-scaling/freire2_unwindbound10.yml index 7fdc2a8e3d0..811e8f8f01d 100644 --- a/c/nla-digbench-scaling/freire2_unwindbound10.yml +++ b/c/nla-digbench-scaling/freire2_unwindbound10.yml @@ -3,6 +3,8 @@ input_files: 'freire2_unwindbound10.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/freire2_unwindbound100.c b/c/nla-digbench-scaling/freire2_unwindbound100.c index 501c25cfbad..c8e16b498b0 100644 --- a/c/nla-digbench-scaling/freire2_unwindbound100.c +++ b/c/nla-digbench-scaling/freire2_unwindbound100.c @@ -6,7 +6,8 @@ cpa.sh -kInduction -setprop solver.solver=z3 freire2.c */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "freire2.c", 10, "reach_error"); } extern double __VERIFIER_nondet_double(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/freire2_unwindbound100.yml b/c/nla-digbench-scaling/freire2_unwindbound100.yml index 02b4bc03bf5..040910ff797 100644 --- a/c/nla-digbench-scaling/freire2_unwindbound100.yml +++ b/c/nla-digbench-scaling/freire2_unwindbound100.yml @@ -3,6 +3,8 @@ input_files: 'freire2_unwindbound100.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/freire2_unwindbound2.c b/c/nla-digbench-scaling/freire2_unwindbound2.c index 7d2efd3140a..a3ace06c246 100644 --- a/c/nla-digbench-scaling/freire2_unwindbound2.c +++ b/c/nla-digbench-scaling/freire2_unwindbound2.c @@ -6,7 +6,8 @@ cpa.sh -kInduction -setprop solver.solver=z3 freire2.c */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "freire2.c", 10, "reach_error"); } extern double __VERIFIER_nondet_double(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/freire2_unwindbound2.yml b/c/nla-digbench-scaling/freire2_unwindbound2.yml index 25bc17e29d9..377364fe567 100644 --- a/c/nla-digbench-scaling/freire2_unwindbound2.yml +++ b/c/nla-digbench-scaling/freire2_unwindbound2.yml @@ -3,6 +3,8 @@ input_files: 'freire2_unwindbound2.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/freire2_unwindbound20.c b/c/nla-digbench-scaling/freire2_unwindbound20.c index 33145b67f78..6f8a79135cd 100644 --- a/c/nla-digbench-scaling/freire2_unwindbound20.c +++ b/c/nla-digbench-scaling/freire2_unwindbound20.c @@ -6,7 +6,8 @@ cpa.sh -kInduction -setprop solver.solver=z3 freire2.c */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "freire2.c", 10, "reach_error"); } extern double __VERIFIER_nondet_double(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/freire2_unwindbound20.yml b/c/nla-digbench-scaling/freire2_unwindbound20.yml index ae84fee8b3e..fcf9939f557 100644 --- a/c/nla-digbench-scaling/freire2_unwindbound20.yml +++ b/c/nla-digbench-scaling/freire2_unwindbound20.yml @@ -3,6 +3,8 @@ input_files: 'freire2_unwindbound20.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/freire2_unwindbound5.c b/c/nla-digbench-scaling/freire2_unwindbound5.c index 104554c4e95..8947cdb734d 100644 --- a/c/nla-digbench-scaling/freire2_unwindbound5.c +++ b/c/nla-digbench-scaling/freire2_unwindbound5.c @@ -6,7 +6,8 @@ cpa.sh -kInduction -setprop solver.solver=z3 freire2.c */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "freire2.c", 10, "reach_error"); } extern double __VERIFIER_nondet_double(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/freire2_unwindbound5.yml b/c/nla-digbench-scaling/freire2_unwindbound5.yml index f057baf96ce..591568911e8 100644 --- a/c/nla-digbench-scaling/freire2_unwindbound5.yml +++ b/c/nla-digbench-scaling/freire2_unwindbound5.yml @@ -3,6 +3,8 @@ input_files: 'freire2_unwindbound5.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/freire2_unwindbound50.c b/c/nla-digbench-scaling/freire2_unwindbound50.c index 6eb18125bc1..87a8cde52b9 100644 --- a/c/nla-digbench-scaling/freire2_unwindbound50.c +++ b/c/nla-digbench-scaling/freire2_unwindbound50.c @@ -6,7 +6,8 @@ cpa.sh -kInduction -setprop solver.solver=z3 freire2.c */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "freire2.c", 10, "reach_error"); } extern double __VERIFIER_nondet_double(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/freire2_unwindbound50.yml b/c/nla-digbench-scaling/freire2_unwindbound50.yml index e91d60db2be..12a62f5aad6 100644 --- a/c/nla-digbench-scaling/freire2_unwindbound50.yml +++ b/c/nla-digbench-scaling/freire2_unwindbound50.yml @@ -3,6 +3,8 @@ input_files: 'freire2_unwindbound50.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/freire2_valuebound1.c b/c/nla-digbench-scaling/freire2_valuebound1.c index 7037d688501..32f088926f0 100644 --- a/c/nla-digbench-scaling/freire2_valuebound1.c +++ b/c/nla-digbench-scaling/freire2_valuebound1.c @@ -6,7 +6,8 @@ cpa.sh -kInduction -setprop solver.solver=z3 freire2.c */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "freire2.c", 10, "reach_error"); } extern double __VERIFIER_nondet_double(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -24,7 +25,7 @@ int main() { int r; double a, x, s; a = __VERIFIER_nondet_double(); - assume_abort_if_not(a>0 && a<=1); + assume_abort_if_not(a>=0 && a<=1); x = a; s = 3.25; r = 1; diff --git a/c/nla-digbench-scaling/freire2_valuebound1.yml b/c/nla-digbench-scaling/freire2_valuebound1.yml index f8c43ce1ae3..17a397e6847 100644 --- a/c/nla-digbench-scaling/freire2_valuebound1.yml +++ b/c/nla-digbench-scaling/freire2_valuebound1.yml @@ -3,6 +3,8 @@ input_files: 'freire2_valuebound1.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/freire2_valuebound10.c b/c/nla-digbench-scaling/freire2_valuebound10.c index cfc24855bfc..f890a49b6a3 100644 --- a/c/nla-digbench-scaling/freire2_valuebound10.c +++ b/c/nla-digbench-scaling/freire2_valuebound10.c @@ -6,7 +6,8 @@ cpa.sh -kInduction -setprop solver.solver=z3 freire2.c */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "freire2.c", 10, "reach_error"); } extern double __VERIFIER_nondet_double(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -24,7 +25,7 @@ int main() { int r; double a, x, s; a = __VERIFIER_nondet_double(); - assume_abort_if_not(a>0 && a<=10); + assume_abort_if_not(a>=0 && a<=10); x = a; s = 3.25; r = 1; diff --git a/c/nla-digbench-scaling/freire2_valuebound10.yml b/c/nla-digbench-scaling/freire2_valuebound10.yml index d8b137db6e6..9bc702e74d3 100644 --- a/c/nla-digbench-scaling/freire2_valuebound10.yml +++ b/c/nla-digbench-scaling/freire2_valuebound10.yml @@ -3,6 +3,8 @@ input_files: 'freire2_valuebound10.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/freire2_valuebound100.c b/c/nla-digbench-scaling/freire2_valuebound100.c index df46d3c4593..547a79630f1 100644 --- a/c/nla-digbench-scaling/freire2_valuebound100.c +++ b/c/nla-digbench-scaling/freire2_valuebound100.c @@ -6,7 +6,8 @@ cpa.sh -kInduction -setprop solver.solver=z3 freire2.c */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "freire2.c", 10, "reach_error"); } extern double __VERIFIER_nondet_double(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -24,7 +25,7 @@ int main() { int r; double a, x, s; a = __VERIFIER_nondet_double(); - assume_abort_if_not(a>0 && a<=100); + assume_abort_if_not(a>=0 && a<=100); x = a; s = 3.25; r = 1; diff --git a/c/nla-digbench-scaling/freire2_valuebound100.yml b/c/nla-digbench-scaling/freire2_valuebound100.yml index 029930355c2..119d39650c8 100644 --- a/c/nla-digbench-scaling/freire2_valuebound100.yml +++ b/c/nla-digbench-scaling/freire2_valuebound100.yml @@ -3,6 +3,8 @@ input_files: 'freire2_valuebound100.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/freire2_valuebound2.c b/c/nla-digbench-scaling/freire2_valuebound2.c index 3e0f06842d4..35dfd758a11 100644 --- a/c/nla-digbench-scaling/freire2_valuebound2.c +++ b/c/nla-digbench-scaling/freire2_valuebound2.c @@ -6,7 +6,8 @@ cpa.sh -kInduction -setprop solver.solver=z3 freire2.c */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "freire2.c", 10, "reach_error"); } extern double __VERIFIER_nondet_double(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -24,7 +25,7 @@ int main() { int r; double a, x, s; a = __VERIFIER_nondet_double(); - assume_abort_if_not(a>0 && a<=2); + assume_abort_if_not(a>=0 && a<=2); x = a; s = 3.25; r = 1; diff --git a/c/nla-digbench-scaling/freire2_valuebound2.yml b/c/nla-digbench-scaling/freire2_valuebound2.yml index 9078c9b9e33..82b582b0b33 100644 --- a/c/nla-digbench-scaling/freire2_valuebound2.yml +++ b/c/nla-digbench-scaling/freire2_valuebound2.yml @@ -3,6 +3,8 @@ input_files: 'freire2_valuebound2.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/freire2_valuebound20.c b/c/nla-digbench-scaling/freire2_valuebound20.c index 60df45ce091..7fc5284005b 100644 --- a/c/nla-digbench-scaling/freire2_valuebound20.c +++ b/c/nla-digbench-scaling/freire2_valuebound20.c @@ -6,7 +6,8 @@ cpa.sh -kInduction -setprop solver.solver=z3 freire2.c */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "freire2.c", 10, "reach_error"); } extern double __VERIFIER_nondet_double(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -24,7 +25,7 @@ int main() { int r; double a, x, s; a = __VERIFIER_nondet_double(); - assume_abort_if_not(a>0 && a<=20); + assume_abort_if_not(a>=0 && a<=20); x = a; s = 3.25; r = 1; diff --git a/c/nla-digbench-scaling/freire2_valuebound20.yml b/c/nla-digbench-scaling/freire2_valuebound20.yml index c702fd1cf5a..dffa4ea5750 100644 --- a/c/nla-digbench-scaling/freire2_valuebound20.yml +++ b/c/nla-digbench-scaling/freire2_valuebound20.yml @@ -3,6 +3,8 @@ input_files: 'freire2_valuebound20.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/freire2_valuebound5.c b/c/nla-digbench-scaling/freire2_valuebound5.c index b93b49dd90e..2033bdf4ce5 100644 --- a/c/nla-digbench-scaling/freire2_valuebound5.c +++ b/c/nla-digbench-scaling/freire2_valuebound5.c @@ -6,7 +6,8 @@ cpa.sh -kInduction -setprop solver.solver=z3 freire2.c */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "freire2.c", 10, "reach_error"); } extern double __VERIFIER_nondet_double(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -24,7 +25,7 @@ int main() { int r; double a, x, s; a = __VERIFIER_nondet_double(); - assume_abort_if_not(a>0 && a<=5); + assume_abort_if_not(a>=0 && a<=5); x = a; s = 3.25; r = 1; diff --git a/c/nla-digbench-scaling/freire2_valuebound5.yml b/c/nla-digbench-scaling/freire2_valuebound5.yml index 487eebbde9b..dcf1686e559 100644 --- a/c/nla-digbench-scaling/freire2_valuebound5.yml +++ b/c/nla-digbench-scaling/freire2_valuebound5.yml @@ -3,6 +3,8 @@ input_files: 'freire2_valuebound5.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/freire2_valuebound50.c b/c/nla-digbench-scaling/freire2_valuebound50.c index 15f5ee75b8f..37fe7ced7fc 100644 --- a/c/nla-digbench-scaling/freire2_valuebound50.c +++ b/c/nla-digbench-scaling/freire2_valuebound50.c @@ -6,7 +6,8 @@ cpa.sh -kInduction -setprop solver.solver=z3 freire2.c */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "freire2.c", 10, "reach_error"); } extern double __VERIFIER_nondet_double(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -24,7 +25,7 @@ int main() { int r; double a, x, s; a = __VERIFIER_nondet_double(); - assume_abort_if_not(a>0 && a<=50); + assume_abort_if_not(a>=0 && a<=50); x = a; s = 3.25; r = 1; diff --git a/c/nla-digbench-scaling/freire2_valuebound50.yml b/c/nla-digbench-scaling/freire2_valuebound50.yml index 81163bebd0c..7f12685d1af 100644 --- a/c/nla-digbench-scaling/freire2_valuebound50.yml +++ b/c/nla-digbench-scaling/freire2_valuebound50.yml @@ -3,6 +3,8 @@ input_files: 'freire2_valuebound50.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/generate.py b/c/nla-digbench-scaling/generate.py index b0f264aaea3..cb745f3d4eb 100644 --- a/c/nla-digbench-scaling/generate.py +++ b/c/nla-digbench-scaling/generate.py @@ -1,4 +1,10 @@ #!/usr/bin/env python3 +# This file is part of the SV-Benchmarks collection of verification tasks: +# https://github.com/sosy-lab/sv-benchmarks +# +# SPDX-FileCopyrightText: 2011-2020 The SV-Benchmarks Community +# +# SPDX-License-Identifier: Apache-2.0 """ Script to generate variants of the nla-digbench tasks @@ -7,6 +13,7 @@ from os import listdir from os.path import isfile, join import re +import itertools def looptemplate(f): @@ -31,37 +38,66 @@ def valuetemplate(f): indent = m.group(1) varname = m.group(2) template.append( - "%sassume_abort_if_not(%s>0 && %s<=__BOUND);\n" + "%sassume_abort_if_not(%s>=0 && %s<=__BOUND);\n" % (indent, varname, varname) ) return "".join(template) -nladir = "../nla-digbench" +NLADIR = "../nla-digbench" -# task where the expected result should become true if the values are restricted: -healed_by_valuebound = ["divbin.c", "hard.c"] -# tasks where the expected result should become true if the number of iterations is restricted: -healed_by_unwindbound = ["divbin.c"] -# tasks where the expected result should become false if the number of iterations is restricted: + +def p(s: str) -> str: + return "^%s[^a-zA-Z0-9]" % s + + +# some inline tests: +assert re.search(p("hard"), "hard.c") +assert re.search(p("hard-ll"), "hard-ll.c") +assert re.search(p("hard"), "hard-ll.c") +assert not re.search(p("hard"), "hard2.c") +assert not re.search(p("hard2"), "hard.c") +assert not re.search(p("hard2"), "hard-ll.c") +assert not re.search(p("hard\."), "hard-u.c") + +# task patterns where the expected result should become true if the values are restricted: +healed_by_valuebound = [p(x) for x in ["divbin", "hard-ll", "hard\.", "hard-u"]] +# task patterns where the expected result should become true if the number of iterations is restricted: +healed_by_unwindbound = [p("divbin")] +# task patterns where the expected result should become false if the number of iterations is restricted: broken_by_unwindbound = [ - "hard2.c", - "bresenham.c", - "cohencu.c", - "egcd1.c", - "egcd2.c", - "egcd3.c", - "hard2.c", - "mannadiv.c", - "ps4.c", - "ps5.c", - "ps6.c", + p(x) + for x in [ + "hard2", + "hard-ll", + "bresenham", + "cohencu", + "egcd1", + "egcd2", + "egcd-ll", + "egcd3", + "hard2", + "mannadiv", + "ps4", + "ps5", + "ps6", + "dijkstra-u", # only with bound >=5 + "fermat1-ll", # CEX e.g. with A=11; R=4; + "fermat2-ll", # CEX e.g. with A=11; R=4; + "lcm1", # CEX e.g. with a=3; b=1; + "prod4br-ll", # CEX e.g. with x=42; y=7; + "prodbin-ll", # CEX e.g. with a=42; b=7; + ] ] +broken_by_unwindbound_ge = {} +broken_by_unwindbound_ge[p("dijkstra-u")] = 5 + +REACH = "../properties/unreach-call.prp\n expected_verdict: " -cfiles = [f for f in listdir(nladir) if isfile(join(nladir, f)) and ".c" in f] -for file in cfiles: - fullpath = join(nladir, file) +cfiles = [f for f in listdir(NLADIR) if isfile(join(NLADIR, f)) and ".c" in f] +for file, bound in itertools.product(cfiles, [1, 2, 5, 10, 20, 50, 100]): + fullpath = join(NLADIR, file) fullpathToPreprocessed = fullpath[:-2] + ".i" iFileExists = isfile(fullpathToPreprocessed) for (templatefun, name) in [ @@ -70,42 +106,60 @@ def valuetemplate(f): ]: template = templatefun(fullpath) abort = False - ymlcontent = open(join(nladir, file[:-2] + ".yml"), "r").read() + ymlcontent = open(join(NLADIR, file[:-2] + ".yml"), "r").read() - if (file in healed_by_valuebound and name == "_valuebound") or ( - file in healed_by_unwindbound and name == "_unwindbound" + if ( + any(re.search(entry, file) for entry in healed_by_valuebound) + and name == "_valuebound" + ) or ( + any(re.search(entry, file) for entry in healed_by_unwindbound) + and name == "_unwindbound" ): - ymlcontent = re.sub( - "expected_verdict: false", "expected_verdict: true", ymlcontent - ) - if file in broken_by_unwindbound and name == "_unwindbound": - ymlcontent = re.sub( - "expected_verdict: true", "expected_verdict: false", ymlcontent + ymlcontent = re.sub(REACH + "false", REACH + "true", ymlcontent) + if ( + any( + re.search(entry, file) + and ( + entry not in broken_by_unwindbound_ge + or bound >= broken_by_unwindbound_ge[entry] + ) + for entry in broken_by_unwindbound ) - for m in re.findall("property_file: (.*)", ymlcontent): - if not "unreach-call" in m: + and name == "_unwindbound" + ): + ymlcontent = re.sub(REACH + "true", REACH + "false", ymlcontent) + properties = re.findall("property_file: (.*)", ymlcontent) + has_overflow_property = False + for m in properties: + if not ("unreach-call" in m or "no-overflow" in m): print("WARNING, additional property found in %s: %s" % (file, m)) abort = True + if "no-overflow" in m: + has_overflow_property = True + if ( + len(properties) == 1 and has_overflow_property + ): # overflow is only property -> verdict false + abort = True if abort: break - for i in [1, 2, 5, 10, 20, 50, 100]: - content = re.sub("__BOUND", str(i), template) - filename_in_yml = file if not iFileExists else file[:-2] + ".i" - new_filename_in_yml = file[:-2] + name + str(i) + filename_in_yml[-2:] - ymlname = new_filename_in_yml[:-2] + ".yml" - if iFileExists: - iFileContent = re.sub( - "__BOUND", str(i), templatefun(fullpathToPreprocessed) - ) - new_c_filename = file[:-2] + name + str(i) + ".c" - print("Writing file: %s" % new_c_filename) - open(new_c_filename, "w").write(content) - print("Writing file: %s" % new_filename_in_yml) - open(new_filename_in_yml, "w").write(iFileContent) - else: - print("Writing file: %s" % new_filename_in_yml) - open(new_filename_in_yml, "w").write(content) - print("Writing file: %s" % ymlname) - open(ymlname, "w").write( - re.sub(filename_in_yml, new_filename_in_yml, ymlcontent) + i = bound + content = re.sub("__BOUND", str(i), template) + filename_in_yml = file if not iFileExists else file[:-2] + ".i" + new_filename_in_yml = file[:-2] + name + str(i) + filename_in_yml[-2:] + ymlname = new_filename_in_yml[:-2] + ".yml" + if iFileExists: + iFileContent = re.sub( + "__BOUND", str(i), templatefun(fullpathToPreprocessed) ) + new_c_filename = file[:-2] + name + str(i) + ".c" + print("Writing file: %s" % new_c_filename) + open(new_c_filename, "w").write(content) + print("Writing file: %s" % new_filename_in_yml) + open(new_filename_in_yml, "w").write(iFileContent) + else: + print("Writing file: %s" % new_filename_in_yml) + open(new_filename_in_yml, "w").write(content) + print("Writing file: %s" % ymlname) + open(ymlname, "w").write( + re.sub(filename_in_yml, new_filename_in_yml, ymlcontent) + ) diff --git a/c/nla-digbench-scaling/geo1-ll_unwindbound1.c b/c/nla-digbench-scaling/geo1-ll_unwindbound1.c new file mode 100644 index 00000000000..64c8373d1ac --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_unwindbound1.c @@ -0,0 +1,51 @@ +/* +Geometric Series +computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k +returns 1+x-y == 0 +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo1-ll.c", 9, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int counter = 0; +int main() { + int z, k; + long long x, y, c; + z = __VERIFIER_nondet_int(); + k = __VERIFIER_nondet_int(); + assume_abort_if_not(z >= 1); + assume_abort_if_not(k >= 1); + + x = 1; + y = z; + c = 1; + + while (counter++<1) { + __VERIFIER_assert(x*z - x - y + 1 == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + + } //geo1 + + x = x * (z - 1); + + __VERIFIER_assert(1 + x - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo1-ll_unwindbound1.yml b/c/nla-digbench-scaling/geo1-ll_unwindbound1.yml new file mode 100644 index 00000000000..c9ab94aa02f --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_unwindbound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo1-ll_unwindbound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1-ll_unwindbound10.c b/c/nla-digbench-scaling/geo1-ll_unwindbound10.c new file mode 100644 index 00000000000..2f2eab3bd78 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_unwindbound10.c @@ -0,0 +1,51 @@ +/* +Geometric Series +computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k +returns 1+x-y == 0 +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo1-ll.c", 9, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int counter = 0; +int main() { + int z, k; + long long x, y, c; + z = __VERIFIER_nondet_int(); + k = __VERIFIER_nondet_int(); + assume_abort_if_not(z >= 1); + assume_abort_if_not(k >= 1); + + x = 1; + y = z; + c = 1; + + while (counter++<10) { + __VERIFIER_assert(x*z - x - y + 1 == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + + } //geo1 + + x = x * (z - 1); + + __VERIFIER_assert(1 + x - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo1-ll_unwindbound10.yml b/c/nla-digbench-scaling/geo1-ll_unwindbound10.yml new file mode 100644 index 00000000000..31eaaaedece --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_unwindbound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo1-ll_unwindbound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1-ll_unwindbound100.c b/c/nla-digbench-scaling/geo1-ll_unwindbound100.c new file mode 100644 index 00000000000..d4c4dfe066a --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_unwindbound100.c @@ -0,0 +1,51 @@ +/* +Geometric Series +computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k +returns 1+x-y == 0 +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo1-ll.c", 9, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int counter = 0; +int main() { + int z, k; + long long x, y, c; + z = __VERIFIER_nondet_int(); + k = __VERIFIER_nondet_int(); + assume_abort_if_not(z >= 1); + assume_abort_if_not(k >= 1); + + x = 1; + y = z; + c = 1; + + while (counter++<100) { + __VERIFIER_assert(x*z - x - y + 1 == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + + } //geo1 + + x = x * (z - 1); + + __VERIFIER_assert(1 + x - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo1-ll_unwindbound100.yml b/c/nla-digbench-scaling/geo1-ll_unwindbound100.yml new file mode 100644 index 00000000000..e380d8c696b --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_unwindbound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo1-ll_unwindbound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1-ll_unwindbound2.c b/c/nla-digbench-scaling/geo1-ll_unwindbound2.c new file mode 100644 index 00000000000..93e78af05f2 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_unwindbound2.c @@ -0,0 +1,51 @@ +/* +Geometric Series +computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k +returns 1+x-y == 0 +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo1-ll.c", 9, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int counter = 0; +int main() { + int z, k; + long long x, y, c; + z = __VERIFIER_nondet_int(); + k = __VERIFIER_nondet_int(); + assume_abort_if_not(z >= 1); + assume_abort_if_not(k >= 1); + + x = 1; + y = z; + c = 1; + + while (counter++<2) { + __VERIFIER_assert(x*z - x - y + 1 == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + + } //geo1 + + x = x * (z - 1); + + __VERIFIER_assert(1 + x - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo1-ll_unwindbound2.yml b/c/nla-digbench-scaling/geo1-ll_unwindbound2.yml new file mode 100644 index 00000000000..e1e76267558 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_unwindbound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo1-ll_unwindbound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1-ll_unwindbound20.c b/c/nla-digbench-scaling/geo1-ll_unwindbound20.c new file mode 100644 index 00000000000..8d6727db352 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_unwindbound20.c @@ -0,0 +1,51 @@ +/* +Geometric Series +computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k +returns 1+x-y == 0 +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo1-ll.c", 9, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int counter = 0; +int main() { + int z, k; + long long x, y, c; + z = __VERIFIER_nondet_int(); + k = __VERIFIER_nondet_int(); + assume_abort_if_not(z >= 1); + assume_abort_if_not(k >= 1); + + x = 1; + y = z; + c = 1; + + while (counter++<20) { + __VERIFIER_assert(x*z - x - y + 1 == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + + } //geo1 + + x = x * (z - 1); + + __VERIFIER_assert(1 + x - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo1-ll_unwindbound20.yml b/c/nla-digbench-scaling/geo1-ll_unwindbound20.yml new file mode 100644 index 00000000000..455723d0ad3 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_unwindbound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo1-ll_unwindbound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1-ll_unwindbound5.c b/c/nla-digbench-scaling/geo1-ll_unwindbound5.c new file mode 100644 index 00000000000..f91074894f1 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_unwindbound5.c @@ -0,0 +1,51 @@ +/* +Geometric Series +computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k +returns 1+x-y == 0 +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo1-ll.c", 9, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int counter = 0; +int main() { + int z, k; + long long x, y, c; + z = __VERIFIER_nondet_int(); + k = __VERIFIER_nondet_int(); + assume_abort_if_not(z >= 1); + assume_abort_if_not(k >= 1); + + x = 1; + y = z; + c = 1; + + while (counter++<5) { + __VERIFIER_assert(x*z - x - y + 1 == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + + } //geo1 + + x = x * (z - 1); + + __VERIFIER_assert(1 + x - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo1-ll_unwindbound5.yml b/c/nla-digbench-scaling/geo1-ll_unwindbound5.yml new file mode 100644 index 00000000000..646afd788a0 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_unwindbound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo1-ll_unwindbound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1-ll_unwindbound50.c b/c/nla-digbench-scaling/geo1-ll_unwindbound50.c new file mode 100644 index 00000000000..91c1105bada --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_unwindbound50.c @@ -0,0 +1,51 @@ +/* +Geometric Series +computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k +returns 1+x-y == 0 +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo1-ll.c", 9, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int counter = 0; +int main() { + int z, k; + long long x, y, c; + z = __VERIFIER_nondet_int(); + k = __VERIFIER_nondet_int(); + assume_abort_if_not(z >= 1); + assume_abort_if_not(k >= 1); + + x = 1; + y = z; + c = 1; + + while (counter++<50) { + __VERIFIER_assert(x*z - x - y + 1 == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + + } //geo1 + + x = x * (z - 1); + + __VERIFIER_assert(1 + x - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo1-ll_unwindbound50.yml b/c/nla-digbench-scaling/geo1-ll_unwindbound50.yml new file mode 100644 index 00000000000..29416855de5 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_unwindbound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo1-ll_unwindbound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1-ll_valuebound1.c b/c/nla-digbench-scaling/geo1-ll_valuebound1.c new file mode 100644 index 00000000000..a9b28dee524 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_valuebound1.c @@ -0,0 +1,52 @@ +/* +Geometric Series +computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k +returns 1+x-y == 0 +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo1-ll.c", 9, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int main() { + int z, k; + long long x, y, c; + z = __VERIFIER_nondet_int(); + assume_abort_if_not(z>=0 && z<=1); + k = __VERIFIER_nondet_int(); + assume_abort_if_not(k>=0 && k<=1); + assume_abort_if_not(z >= 1); + assume_abort_if_not(k >= 1); + + x = 1; + y = z; + c = 1; + + while (1) { + __VERIFIER_assert(x*z - x - y + 1 == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + + } //geo1 + + x = x * (z - 1); + + __VERIFIER_assert(1 + x - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo1-ll_valuebound1.yml b/c/nla-digbench-scaling/geo1-ll_valuebound1.yml new file mode 100644 index 00000000000..233de79f6ce --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_valuebound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo1-ll_valuebound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1-ll_valuebound10.c b/c/nla-digbench-scaling/geo1-ll_valuebound10.c new file mode 100644 index 00000000000..a4119380ff0 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_valuebound10.c @@ -0,0 +1,52 @@ +/* +Geometric Series +computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k +returns 1+x-y == 0 +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo1-ll.c", 9, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int main() { + int z, k; + long long x, y, c; + z = __VERIFIER_nondet_int(); + assume_abort_if_not(z>=0 && z<=10); + k = __VERIFIER_nondet_int(); + assume_abort_if_not(k>=0 && k<=10); + assume_abort_if_not(z >= 1); + assume_abort_if_not(k >= 1); + + x = 1; + y = z; + c = 1; + + while (1) { + __VERIFIER_assert(x*z - x - y + 1 == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + + } //geo1 + + x = x * (z - 1); + + __VERIFIER_assert(1 + x - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo1-ll_valuebound10.yml b/c/nla-digbench-scaling/geo1-ll_valuebound10.yml new file mode 100644 index 00000000000..8057a43829e --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_valuebound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo1-ll_valuebound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1-ll_valuebound100.c b/c/nla-digbench-scaling/geo1-ll_valuebound100.c new file mode 100644 index 00000000000..b5aa3509460 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_valuebound100.c @@ -0,0 +1,52 @@ +/* +Geometric Series +computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k +returns 1+x-y == 0 +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo1-ll.c", 9, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int main() { + int z, k; + long long x, y, c; + z = __VERIFIER_nondet_int(); + assume_abort_if_not(z>=0 && z<=100); + k = __VERIFIER_nondet_int(); + assume_abort_if_not(k>=0 && k<=100); + assume_abort_if_not(z >= 1); + assume_abort_if_not(k >= 1); + + x = 1; + y = z; + c = 1; + + while (1) { + __VERIFIER_assert(x*z - x - y + 1 == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + + } //geo1 + + x = x * (z - 1); + + __VERIFIER_assert(1 + x - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo1-ll_valuebound100.yml b/c/nla-digbench-scaling/geo1-ll_valuebound100.yml new file mode 100644 index 00000000000..f6b5550a012 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_valuebound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo1-ll_valuebound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1-ll_valuebound2.c b/c/nla-digbench-scaling/geo1-ll_valuebound2.c new file mode 100644 index 00000000000..1de7dfc0b6d --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_valuebound2.c @@ -0,0 +1,52 @@ +/* +Geometric Series +computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k +returns 1+x-y == 0 +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo1-ll.c", 9, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int main() { + int z, k; + long long x, y, c; + z = __VERIFIER_nondet_int(); + assume_abort_if_not(z>=0 && z<=2); + k = __VERIFIER_nondet_int(); + assume_abort_if_not(k>=0 && k<=2); + assume_abort_if_not(z >= 1); + assume_abort_if_not(k >= 1); + + x = 1; + y = z; + c = 1; + + while (1) { + __VERIFIER_assert(x*z - x - y + 1 == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + + } //geo1 + + x = x * (z - 1); + + __VERIFIER_assert(1 + x - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo1-ll_valuebound2.yml b/c/nla-digbench-scaling/geo1-ll_valuebound2.yml new file mode 100644 index 00000000000..7f5a5e5068c --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_valuebound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo1-ll_valuebound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1-ll_valuebound20.c b/c/nla-digbench-scaling/geo1-ll_valuebound20.c new file mode 100644 index 00000000000..aa78a83ff89 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_valuebound20.c @@ -0,0 +1,52 @@ +/* +Geometric Series +computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k +returns 1+x-y == 0 +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo1-ll.c", 9, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int main() { + int z, k; + long long x, y, c; + z = __VERIFIER_nondet_int(); + assume_abort_if_not(z>=0 && z<=20); + k = __VERIFIER_nondet_int(); + assume_abort_if_not(k>=0 && k<=20); + assume_abort_if_not(z >= 1); + assume_abort_if_not(k >= 1); + + x = 1; + y = z; + c = 1; + + while (1) { + __VERIFIER_assert(x*z - x - y + 1 == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + + } //geo1 + + x = x * (z - 1); + + __VERIFIER_assert(1 + x - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo1-ll_valuebound20.yml b/c/nla-digbench-scaling/geo1-ll_valuebound20.yml new file mode 100644 index 00000000000..29647a36f85 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_valuebound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo1-ll_valuebound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1-ll_valuebound5.c b/c/nla-digbench-scaling/geo1-ll_valuebound5.c new file mode 100644 index 00000000000..ed45730f184 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_valuebound5.c @@ -0,0 +1,52 @@ +/* +Geometric Series +computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k +returns 1+x-y == 0 +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo1-ll.c", 9, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int main() { + int z, k; + long long x, y, c; + z = __VERIFIER_nondet_int(); + assume_abort_if_not(z>=0 && z<=5); + k = __VERIFIER_nondet_int(); + assume_abort_if_not(k>=0 && k<=5); + assume_abort_if_not(z >= 1); + assume_abort_if_not(k >= 1); + + x = 1; + y = z; + c = 1; + + while (1) { + __VERIFIER_assert(x*z - x - y + 1 == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + + } //geo1 + + x = x * (z - 1); + + __VERIFIER_assert(1 + x - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo1-ll_valuebound5.yml b/c/nla-digbench-scaling/geo1-ll_valuebound5.yml new file mode 100644 index 00000000000..ac535aea914 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_valuebound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo1-ll_valuebound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1-ll_valuebound50.c b/c/nla-digbench-scaling/geo1-ll_valuebound50.c new file mode 100644 index 00000000000..07c5800c8bb --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_valuebound50.c @@ -0,0 +1,52 @@ +/* +Geometric Series +computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k +returns 1+x-y == 0 +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo1-ll.c", 9, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int main() { + int z, k; + long long x, y, c; + z = __VERIFIER_nondet_int(); + assume_abort_if_not(z>=0 && z<=50); + k = __VERIFIER_nondet_int(); + assume_abort_if_not(k>=0 && k<=50); + assume_abort_if_not(z >= 1); + assume_abort_if_not(k >= 1); + + x = 1; + y = z; + c = 1; + + while (1) { + __VERIFIER_assert(x*z - x - y + 1 == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + + } //geo1 + + x = x * (z - 1); + + __VERIFIER_assert(1 + x - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo1-ll_valuebound50.yml b/c/nla-digbench-scaling/geo1-ll_valuebound50.yml new file mode 100644 index 00000000000..33e75f10f20 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_valuebound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo1-ll_valuebound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1-u_unwindbound1.c b/c/nla-digbench-scaling/geo1-u_unwindbound1.c new file mode 100644 index 00000000000..f8b6afbf18f --- /dev/null +++ b/c/nla-digbench-scaling/geo1-u_unwindbound1.c @@ -0,0 +1,49 @@ +/* +Geometric Series +computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k +returns 1+x-y == 0 +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo1-u.c", 9, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int counter = 0; +int main() { + unsigned int z, k; + long long x, y, c; + z = __VERIFIER_nondet_unsigned_int(); + k = __VERIFIER_nondet_unsigned_int(); + + x = 1; + y = z; + c = 1; + + while (counter++<1) { + __VERIFIER_assert(x*z - x - y + 1 == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + + } //geo1 + + x = x * (z - 1); + + __VERIFIER_assert(1 + x - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo1-u_unwindbound1.yml b/c/nla-digbench-scaling/geo1-u_unwindbound1.yml new file mode 100644 index 00000000000..1f08d69664f --- /dev/null +++ b/c/nla-digbench-scaling/geo1-u_unwindbound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo1-u_unwindbound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1-u_unwindbound10.c b/c/nla-digbench-scaling/geo1-u_unwindbound10.c new file mode 100644 index 00000000000..560355cfae2 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-u_unwindbound10.c @@ -0,0 +1,49 @@ +/* +Geometric Series +computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k +returns 1+x-y == 0 +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo1-u.c", 9, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int counter = 0; +int main() { + unsigned int z, k; + long long x, y, c; + z = __VERIFIER_nondet_unsigned_int(); + k = __VERIFIER_nondet_unsigned_int(); + + x = 1; + y = z; + c = 1; + + while (counter++<10) { + __VERIFIER_assert(x*z - x - y + 1 == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + + } //geo1 + + x = x * (z - 1); + + __VERIFIER_assert(1 + x - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo1-u_unwindbound10.yml b/c/nla-digbench-scaling/geo1-u_unwindbound10.yml new file mode 100644 index 00000000000..5c9dddd48f3 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-u_unwindbound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo1-u_unwindbound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1-u_unwindbound100.c b/c/nla-digbench-scaling/geo1-u_unwindbound100.c new file mode 100644 index 00000000000..611a20c64af --- /dev/null +++ b/c/nla-digbench-scaling/geo1-u_unwindbound100.c @@ -0,0 +1,49 @@ +/* +Geometric Series +computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k +returns 1+x-y == 0 +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo1-u.c", 9, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int counter = 0; +int main() { + unsigned int z, k; + long long x, y, c; + z = __VERIFIER_nondet_unsigned_int(); + k = __VERIFIER_nondet_unsigned_int(); + + x = 1; + y = z; + c = 1; + + while (counter++<100) { + __VERIFIER_assert(x*z - x - y + 1 == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + + } //geo1 + + x = x * (z - 1); + + __VERIFIER_assert(1 + x - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo1-u_unwindbound100.yml b/c/nla-digbench-scaling/geo1-u_unwindbound100.yml new file mode 100644 index 00000000000..dadc079ba0d --- /dev/null +++ b/c/nla-digbench-scaling/geo1-u_unwindbound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo1-u_unwindbound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1-u_unwindbound2.c b/c/nla-digbench-scaling/geo1-u_unwindbound2.c new file mode 100644 index 00000000000..a6c6923e66f --- /dev/null +++ b/c/nla-digbench-scaling/geo1-u_unwindbound2.c @@ -0,0 +1,49 @@ +/* +Geometric Series +computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k +returns 1+x-y == 0 +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo1-u.c", 9, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int counter = 0; +int main() { + unsigned int z, k; + long long x, y, c; + z = __VERIFIER_nondet_unsigned_int(); + k = __VERIFIER_nondet_unsigned_int(); + + x = 1; + y = z; + c = 1; + + while (counter++<2) { + __VERIFIER_assert(x*z - x - y + 1 == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + + } //geo1 + + x = x * (z - 1); + + __VERIFIER_assert(1 + x - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo1-u_unwindbound2.yml b/c/nla-digbench-scaling/geo1-u_unwindbound2.yml new file mode 100644 index 00000000000..5ac88fe75de --- /dev/null +++ b/c/nla-digbench-scaling/geo1-u_unwindbound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo1-u_unwindbound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1-u_unwindbound20.c b/c/nla-digbench-scaling/geo1-u_unwindbound20.c new file mode 100644 index 00000000000..b770dea941e --- /dev/null +++ b/c/nla-digbench-scaling/geo1-u_unwindbound20.c @@ -0,0 +1,49 @@ +/* +Geometric Series +computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k +returns 1+x-y == 0 +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo1-u.c", 9, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int counter = 0; +int main() { + unsigned int z, k; + long long x, y, c; + z = __VERIFIER_nondet_unsigned_int(); + k = __VERIFIER_nondet_unsigned_int(); + + x = 1; + y = z; + c = 1; + + while (counter++<20) { + __VERIFIER_assert(x*z - x - y + 1 == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + + } //geo1 + + x = x * (z - 1); + + __VERIFIER_assert(1 + x - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo1-u_unwindbound20.yml b/c/nla-digbench-scaling/geo1-u_unwindbound20.yml new file mode 100644 index 00000000000..6bce5141a3c --- /dev/null +++ b/c/nla-digbench-scaling/geo1-u_unwindbound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo1-u_unwindbound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1-u_unwindbound5.c b/c/nla-digbench-scaling/geo1-u_unwindbound5.c new file mode 100644 index 00000000000..8a5c6b6025d --- /dev/null +++ b/c/nla-digbench-scaling/geo1-u_unwindbound5.c @@ -0,0 +1,49 @@ +/* +Geometric Series +computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k +returns 1+x-y == 0 +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo1-u.c", 9, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int counter = 0; +int main() { + unsigned int z, k; + long long x, y, c; + z = __VERIFIER_nondet_unsigned_int(); + k = __VERIFIER_nondet_unsigned_int(); + + x = 1; + y = z; + c = 1; + + while (counter++<5) { + __VERIFIER_assert(x*z - x - y + 1 == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + + } //geo1 + + x = x * (z - 1); + + __VERIFIER_assert(1 + x - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo1-u_unwindbound5.yml b/c/nla-digbench-scaling/geo1-u_unwindbound5.yml new file mode 100644 index 00000000000..f0dadb935d8 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-u_unwindbound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo1-u_unwindbound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1-u_unwindbound50.c b/c/nla-digbench-scaling/geo1-u_unwindbound50.c new file mode 100644 index 00000000000..63723ad6e89 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-u_unwindbound50.c @@ -0,0 +1,49 @@ +/* +Geometric Series +computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k +returns 1+x-y == 0 +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo1-u.c", 9, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int counter = 0; +int main() { + unsigned int z, k; + long long x, y, c; + z = __VERIFIER_nondet_unsigned_int(); + k = __VERIFIER_nondet_unsigned_int(); + + x = 1; + y = z; + c = 1; + + while (counter++<50) { + __VERIFIER_assert(x*z - x - y + 1 == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + + } //geo1 + + x = x * (z - 1); + + __VERIFIER_assert(1 + x - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo1-u_unwindbound50.yml b/c/nla-digbench-scaling/geo1-u_unwindbound50.yml new file mode 100644 index 00000000000..3aa2bb9bb2c --- /dev/null +++ b/c/nla-digbench-scaling/geo1-u_unwindbound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo1-u_unwindbound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1-u_valuebound1.c b/c/nla-digbench-scaling/geo1-u_valuebound1.c new file mode 100644 index 00000000000..a266f01c563 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-u_valuebound1.c @@ -0,0 +1,50 @@ +/* +Geometric Series +computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k +returns 1+x-y == 0 +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo1-u.c", 9, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int main() { + unsigned int z, k; + long long x, y, c; + z = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(z>=0 && z<=1); + k = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(k>=0 && k<=1); + + x = 1; + y = z; + c = 1; + + while (1) { + __VERIFIER_assert(x*z - x - y + 1 == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + + } //geo1 + + x = x * (z - 1); + + __VERIFIER_assert(1 + x - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo1-u_valuebound1.yml b/c/nla-digbench-scaling/geo1-u_valuebound1.yml new file mode 100644 index 00000000000..fd4bc94eff4 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-u_valuebound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo1-u_valuebound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1-u_valuebound10.c b/c/nla-digbench-scaling/geo1-u_valuebound10.c new file mode 100644 index 00000000000..9ecd8e4e3ab --- /dev/null +++ b/c/nla-digbench-scaling/geo1-u_valuebound10.c @@ -0,0 +1,50 @@ +/* +Geometric Series +computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k +returns 1+x-y == 0 +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo1-u.c", 9, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int main() { + unsigned int z, k; + long long x, y, c; + z = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(z>=0 && z<=10); + k = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(k>=0 && k<=10); + + x = 1; + y = z; + c = 1; + + while (1) { + __VERIFIER_assert(x*z - x - y + 1 == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + + } //geo1 + + x = x * (z - 1); + + __VERIFIER_assert(1 + x - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo1-u_valuebound10.yml b/c/nla-digbench-scaling/geo1-u_valuebound10.yml new file mode 100644 index 00000000000..36ede90e7cb --- /dev/null +++ b/c/nla-digbench-scaling/geo1-u_valuebound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo1-u_valuebound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1-u_valuebound100.c b/c/nla-digbench-scaling/geo1-u_valuebound100.c new file mode 100644 index 00000000000..a0ed0cde50d --- /dev/null +++ b/c/nla-digbench-scaling/geo1-u_valuebound100.c @@ -0,0 +1,50 @@ +/* +Geometric Series +computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k +returns 1+x-y == 0 +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo1-u.c", 9, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int main() { + unsigned int z, k; + long long x, y, c; + z = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(z>=0 && z<=100); + k = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(k>=0 && k<=100); + + x = 1; + y = z; + c = 1; + + while (1) { + __VERIFIER_assert(x*z - x - y + 1 == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + + } //geo1 + + x = x * (z - 1); + + __VERIFIER_assert(1 + x - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo1-u_valuebound100.yml b/c/nla-digbench-scaling/geo1-u_valuebound100.yml new file mode 100644 index 00000000000..509dc2ada4c --- /dev/null +++ b/c/nla-digbench-scaling/geo1-u_valuebound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo1-u_valuebound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1-u_valuebound2.c b/c/nla-digbench-scaling/geo1-u_valuebound2.c new file mode 100644 index 00000000000..1245bbabf56 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-u_valuebound2.c @@ -0,0 +1,50 @@ +/* +Geometric Series +computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k +returns 1+x-y == 0 +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo1-u.c", 9, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int main() { + unsigned int z, k; + long long x, y, c; + z = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(z>=0 && z<=2); + k = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(k>=0 && k<=2); + + x = 1; + y = z; + c = 1; + + while (1) { + __VERIFIER_assert(x*z - x - y + 1 == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + + } //geo1 + + x = x * (z - 1); + + __VERIFIER_assert(1 + x - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo1-u_valuebound2.yml b/c/nla-digbench-scaling/geo1-u_valuebound2.yml new file mode 100644 index 00000000000..89ad4aaa581 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-u_valuebound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo1-u_valuebound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1-u_valuebound20.c b/c/nla-digbench-scaling/geo1-u_valuebound20.c new file mode 100644 index 00000000000..d3ab171e2d3 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-u_valuebound20.c @@ -0,0 +1,50 @@ +/* +Geometric Series +computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k +returns 1+x-y == 0 +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo1-u.c", 9, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int main() { + unsigned int z, k; + long long x, y, c; + z = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(z>=0 && z<=20); + k = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(k>=0 && k<=20); + + x = 1; + y = z; + c = 1; + + while (1) { + __VERIFIER_assert(x*z - x - y + 1 == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + + } //geo1 + + x = x * (z - 1); + + __VERIFIER_assert(1 + x - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo1-u_valuebound20.yml b/c/nla-digbench-scaling/geo1-u_valuebound20.yml new file mode 100644 index 00000000000..e2f0f9ca330 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-u_valuebound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo1-u_valuebound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1-u_valuebound5.c b/c/nla-digbench-scaling/geo1-u_valuebound5.c new file mode 100644 index 00000000000..fd167bbd11f --- /dev/null +++ b/c/nla-digbench-scaling/geo1-u_valuebound5.c @@ -0,0 +1,50 @@ +/* +Geometric Series +computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k +returns 1+x-y == 0 +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo1-u.c", 9, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int main() { + unsigned int z, k; + long long x, y, c; + z = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(z>=0 && z<=5); + k = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(k>=0 && k<=5); + + x = 1; + y = z; + c = 1; + + while (1) { + __VERIFIER_assert(x*z - x - y + 1 == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + + } //geo1 + + x = x * (z - 1); + + __VERIFIER_assert(1 + x - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo1-u_valuebound5.yml b/c/nla-digbench-scaling/geo1-u_valuebound5.yml new file mode 100644 index 00000000000..61f7d0f71d5 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-u_valuebound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo1-u_valuebound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1-u_valuebound50.c b/c/nla-digbench-scaling/geo1-u_valuebound50.c new file mode 100644 index 00000000000..930d8832ee9 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-u_valuebound50.c @@ -0,0 +1,50 @@ +/* +Geometric Series +computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k +returns 1+x-y == 0 +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo1-u.c", 9, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int main() { + unsigned int z, k; + long long x, y, c; + z = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(z>=0 && z<=50); + k = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(k>=0 && k<=50); + + x = 1; + y = z; + c = 1; + + while (1) { + __VERIFIER_assert(x*z - x - y + 1 == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + + } //geo1 + + x = x * (z - 1); + + __VERIFIER_assert(1 + x - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo1-u_valuebound50.yml b/c/nla-digbench-scaling/geo1-u_valuebound50.yml new file mode 100644 index 00000000000..f1ea46ae450 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-u_valuebound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo1-u_valuebound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1_unwindbound1.c b/c/nla-digbench-scaling/geo1_unwindbound1.c deleted file mode 100644 index 014865199ab..00000000000 --- a/c/nla-digbench-scaling/geo1_unwindbound1.c +++ /dev/null @@ -1,48 +0,0 @@ -/* -Geometric Series -computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k -returns 1+x-y == 0 -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} -int counter = 0; -int main() { - int z, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - k = __VERIFIER_nondet_int(); - - x = 1; - y = z; - c = 1; - - while (counter++<1) { - __VERIFIER_assert(x*z - x - y + 1 == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + 1; - y = y * z; - - } //geo1 - - x = x * (z - 1); - - __VERIFIER_assert(1 + x - y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/geo1_unwindbound1.yml b/c/nla-digbench-scaling/geo1_unwindbound1.yml deleted file mode 100644 index 538d20d5212..00000000000 --- a/c/nla-digbench-scaling/geo1_unwindbound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo1_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1_unwindbound10.c b/c/nla-digbench-scaling/geo1_unwindbound10.c deleted file mode 100644 index 63e74ef6f69..00000000000 --- a/c/nla-digbench-scaling/geo1_unwindbound10.c +++ /dev/null @@ -1,48 +0,0 @@ -/* -Geometric Series -computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k -returns 1+x-y == 0 -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} -int counter = 0; -int main() { - int z, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - k = __VERIFIER_nondet_int(); - - x = 1; - y = z; - c = 1; - - while (counter++<10) { - __VERIFIER_assert(x*z - x - y + 1 == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + 1; - y = y * z; - - } //geo1 - - x = x * (z - 1); - - __VERIFIER_assert(1 + x - y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/geo1_unwindbound10.yml b/c/nla-digbench-scaling/geo1_unwindbound10.yml deleted file mode 100644 index d8270207a01..00000000000 --- a/c/nla-digbench-scaling/geo1_unwindbound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo1_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1_unwindbound100.c b/c/nla-digbench-scaling/geo1_unwindbound100.c deleted file mode 100644 index 0567fd40469..00000000000 --- a/c/nla-digbench-scaling/geo1_unwindbound100.c +++ /dev/null @@ -1,48 +0,0 @@ -/* -Geometric Series -computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k -returns 1+x-y == 0 -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} -int counter = 0; -int main() { - int z, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - k = __VERIFIER_nondet_int(); - - x = 1; - y = z; - c = 1; - - while (counter++<100) { - __VERIFIER_assert(x*z - x - y + 1 == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + 1; - y = y * z; - - } //geo1 - - x = x * (z - 1); - - __VERIFIER_assert(1 + x - y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/geo1_unwindbound100.yml b/c/nla-digbench-scaling/geo1_unwindbound100.yml deleted file mode 100644 index c1fb59c7837..00000000000 --- a/c/nla-digbench-scaling/geo1_unwindbound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo1_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1_unwindbound2.c b/c/nla-digbench-scaling/geo1_unwindbound2.c deleted file mode 100644 index cfd456d65dc..00000000000 --- a/c/nla-digbench-scaling/geo1_unwindbound2.c +++ /dev/null @@ -1,48 +0,0 @@ -/* -Geometric Series -computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k -returns 1+x-y == 0 -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} -int counter = 0; -int main() { - int z, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - k = __VERIFIER_nondet_int(); - - x = 1; - y = z; - c = 1; - - while (counter++<2) { - __VERIFIER_assert(x*z - x - y + 1 == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + 1; - y = y * z; - - } //geo1 - - x = x * (z - 1); - - __VERIFIER_assert(1 + x - y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/geo1_unwindbound2.yml b/c/nla-digbench-scaling/geo1_unwindbound2.yml deleted file mode 100644 index db2d27cdf73..00000000000 --- a/c/nla-digbench-scaling/geo1_unwindbound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo1_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1_unwindbound20.c b/c/nla-digbench-scaling/geo1_unwindbound20.c deleted file mode 100644 index b21106eab09..00000000000 --- a/c/nla-digbench-scaling/geo1_unwindbound20.c +++ /dev/null @@ -1,48 +0,0 @@ -/* -Geometric Series -computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k -returns 1+x-y == 0 -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} -int counter = 0; -int main() { - int z, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - k = __VERIFIER_nondet_int(); - - x = 1; - y = z; - c = 1; - - while (counter++<20) { - __VERIFIER_assert(x*z - x - y + 1 == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + 1; - y = y * z; - - } //geo1 - - x = x * (z - 1); - - __VERIFIER_assert(1 + x - y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/geo1_unwindbound20.yml b/c/nla-digbench-scaling/geo1_unwindbound20.yml deleted file mode 100644 index a3b17ecdfd6..00000000000 --- a/c/nla-digbench-scaling/geo1_unwindbound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo1_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1_unwindbound5.c b/c/nla-digbench-scaling/geo1_unwindbound5.c deleted file mode 100644 index bab551f2d05..00000000000 --- a/c/nla-digbench-scaling/geo1_unwindbound5.c +++ /dev/null @@ -1,48 +0,0 @@ -/* -Geometric Series -computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k -returns 1+x-y == 0 -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} -int counter = 0; -int main() { - int z, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - k = __VERIFIER_nondet_int(); - - x = 1; - y = z; - c = 1; - - while (counter++<5) { - __VERIFIER_assert(x*z - x - y + 1 == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + 1; - y = y * z; - - } //geo1 - - x = x * (z - 1); - - __VERIFIER_assert(1 + x - y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/geo1_unwindbound5.yml b/c/nla-digbench-scaling/geo1_unwindbound5.yml deleted file mode 100644 index abda497e76e..00000000000 --- a/c/nla-digbench-scaling/geo1_unwindbound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo1_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1_unwindbound50.c b/c/nla-digbench-scaling/geo1_unwindbound50.c deleted file mode 100644 index 8cbd94eb319..00000000000 --- a/c/nla-digbench-scaling/geo1_unwindbound50.c +++ /dev/null @@ -1,48 +0,0 @@ -/* -Geometric Series -computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k -returns 1+x-y == 0 -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} -int counter = 0; -int main() { - int z, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - k = __VERIFIER_nondet_int(); - - x = 1; - y = z; - c = 1; - - while (counter++<50) { - __VERIFIER_assert(x*z - x - y + 1 == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + 1; - y = y * z; - - } //geo1 - - x = x * (z - 1); - - __VERIFIER_assert(1 + x - y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/geo1_unwindbound50.yml b/c/nla-digbench-scaling/geo1_unwindbound50.yml deleted file mode 100644 index 874030f4745..00000000000 --- a/c/nla-digbench-scaling/geo1_unwindbound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo1_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1_valuebound1.c b/c/nla-digbench-scaling/geo1_valuebound1.c deleted file mode 100644 index de44dd86b53..00000000000 --- a/c/nla-digbench-scaling/geo1_valuebound1.c +++ /dev/null @@ -1,49 +0,0 @@ -/* -Geometric Series -computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k -returns 1+x-y == 0 -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} -int main() { - int z, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - assume_abort_if_not(z>0 && z<=1); - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=1); - - x = 1; - y = z; - c = 1; - - while (1) { - __VERIFIER_assert(x*z - x - y + 1 == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + 1; - y = y * z; - - } //geo1 - - x = x * (z - 1); - - __VERIFIER_assert(1 + x - y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/geo1_valuebound1.yml b/c/nla-digbench-scaling/geo1_valuebound1.yml deleted file mode 100644 index 599ec196424..00000000000 --- a/c/nla-digbench-scaling/geo1_valuebound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo1_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1_valuebound10.c b/c/nla-digbench-scaling/geo1_valuebound10.c deleted file mode 100644 index 93f1c0c653a..00000000000 --- a/c/nla-digbench-scaling/geo1_valuebound10.c +++ /dev/null @@ -1,49 +0,0 @@ -/* -Geometric Series -computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k -returns 1+x-y == 0 -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} -int main() { - int z, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - assume_abort_if_not(z>0 && z<=10); - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=10); - - x = 1; - y = z; - c = 1; - - while (1) { - __VERIFIER_assert(x*z - x - y + 1 == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + 1; - y = y * z; - - } //geo1 - - x = x * (z - 1); - - __VERIFIER_assert(1 + x - y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/geo1_valuebound10.yml b/c/nla-digbench-scaling/geo1_valuebound10.yml deleted file mode 100644 index f5fe29afdfb..00000000000 --- a/c/nla-digbench-scaling/geo1_valuebound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo1_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1_valuebound100.c b/c/nla-digbench-scaling/geo1_valuebound100.c deleted file mode 100644 index af4a9454ba6..00000000000 --- a/c/nla-digbench-scaling/geo1_valuebound100.c +++ /dev/null @@ -1,49 +0,0 @@ -/* -Geometric Series -computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k -returns 1+x-y == 0 -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} -int main() { - int z, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - assume_abort_if_not(z>0 && z<=100); - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=100); - - x = 1; - y = z; - c = 1; - - while (1) { - __VERIFIER_assert(x*z - x - y + 1 == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + 1; - y = y * z; - - } //geo1 - - x = x * (z - 1); - - __VERIFIER_assert(1 + x - y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/geo1_valuebound100.yml b/c/nla-digbench-scaling/geo1_valuebound100.yml deleted file mode 100644 index 625ea858aee..00000000000 --- a/c/nla-digbench-scaling/geo1_valuebound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo1_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1_valuebound2.c b/c/nla-digbench-scaling/geo1_valuebound2.c deleted file mode 100644 index b4d7522442b..00000000000 --- a/c/nla-digbench-scaling/geo1_valuebound2.c +++ /dev/null @@ -1,49 +0,0 @@ -/* -Geometric Series -computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k -returns 1+x-y == 0 -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} -int main() { - int z, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - assume_abort_if_not(z>0 && z<=2); - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=2); - - x = 1; - y = z; - c = 1; - - while (1) { - __VERIFIER_assert(x*z - x - y + 1 == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + 1; - y = y * z; - - } //geo1 - - x = x * (z - 1); - - __VERIFIER_assert(1 + x - y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/geo1_valuebound2.yml b/c/nla-digbench-scaling/geo1_valuebound2.yml deleted file mode 100644 index 10be712497d..00000000000 --- a/c/nla-digbench-scaling/geo1_valuebound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo1_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1_valuebound20.c b/c/nla-digbench-scaling/geo1_valuebound20.c deleted file mode 100644 index 3e874ccd701..00000000000 --- a/c/nla-digbench-scaling/geo1_valuebound20.c +++ /dev/null @@ -1,49 +0,0 @@ -/* -Geometric Series -computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k -returns 1+x-y == 0 -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} -int main() { - int z, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - assume_abort_if_not(z>0 && z<=20); - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=20); - - x = 1; - y = z; - c = 1; - - while (1) { - __VERIFIER_assert(x*z - x - y + 1 == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + 1; - y = y * z; - - } //geo1 - - x = x * (z - 1); - - __VERIFIER_assert(1 + x - y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/geo1_valuebound20.yml b/c/nla-digbench-scaling/geo1_valuebound20.yml deleted file mode 100644 index 429776c2ee4..00000000000 --- a/c/nla-digbench-scaling/geo1_valuebound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo1_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1_valuebound5.c b/c/nla-digbench-scaling/geo1_valuebound5.c deleted file mode 100644 index d2536e7754c..00000000000 --- a/c/nla-digbench-scaling/geo1_valuebound5.c +++ /dev/null @@ -1,49 +0,0 @@ -/* -Geometric Series -computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k -returns 1+x-y == 0 -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} -int main() { - int z, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - assume_abort_if_not(z>0 && z<=5); - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=5); - - x = 1; - y = z; - c = 1; - - while (1) { - __VERIFIER_assert(x*z - x - y + 1 == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + 1; - y = y * z; - - } //geo1 - - x = x * (z - 1); - - __VERIFIER_assert(1 + x - y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/geo1_valuebound5.yml b/c/nla-digbench-scaling/geo1_valuebound5.yml deleted file mode 100644 index ea897bc5692..00000000000 --- a/c/nla-digbench-scaling/geo1_valuebound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo1_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo1_valuebound50.c b/c/nla-digbench-scaling/geo1_valuebound50.c deleted file mode 100644 index b1617232311..00000000000 --- a/c/nla-digbench-scaling/geo1_valuebound50.c +++ /dev/null @@ -1,49 +0,0 @@ -/* -Geometric Series -computes x=(z-1)* sum(z^k)[k=0..k-1] , y = z^k -returns 1+x-y == 0 -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} -int main() { - int z, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - assume_abort_if_not(z>0 && z<=50); - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=50); - - x = 1; - y = z; - c = 1; - - while (1) { - __VERIFIER_assert(x*z - x - y + 1 == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + 1; - y = y * z; - - } //geo1 - - x = x * (z - 1); - - __VERIFIER_assert(1 + x - y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/geo1_valuebound50.yml b/c/nla-digbench-scaling/geo1_valuebound50.yml deleted file mode 100644 index d2915b0cfbb..00000000000 --- a/c/nla-digbench-scaling/geo1_valuebound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo1_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo2-ll_unwindbound1.c b/c/nla-digbench-scaling/geo2-ll_unwindbound1.c new file mode 100644 index 00000000000..b52c57ea8f8 --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_unwindbound1.c @@ -0,0 +1,46 @@ +/* +Geometric Series +computes x = sum(z^k)[k=0..k-1], y = z^(k-1) +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo2-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + + +int counter = 0; +int main() { + int z, k; + long long x, y, c; + z = __VERIFIER_nondet_int(); + k = __VERIFIER_nondet_int(); + + x = 1; + y = 1; + c = 1; + + while (counter++<1) { + __VERIFIER_assert(1 + x*z - x - z*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + } + __VERIFIER_assert(1 + x*z - x - z*y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo2-ll_unwindbound1.yml b/c/nla-digbench-scaling/geo2-ll_unwindbound1.yml new file mode 100644 index 00000000000..c4614cc8d11 --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_unwindbound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo2-ll_unwindbound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo2-ll_unwindbound10.c b/c/nla-digbench-scaling/geo2-ll_unwindbound10.c new file mode 100644 index 00000000000..979db670dca --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_unwindbound10.c @@ -0,0 +1,46 @@ +/* +Geometric Series +computes x = sum(z^k)[k=0..k-1], y = z^(k-1) +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo2-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + + +int counter = 0; +int main() { + int z, k; + long long x, y, c; + z = __VERIFIER_nondet_int(); + k = __VERIFIER_nondet_int(); + + x = 1; + y = 1; + c = 1; + + while (counter++<10) { + __VERIFIER_assert(1 + x*z - x - z*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + } + __VERIFIER_assert(1 + x*z - x - z*y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo2-ll_unwindbound10.yml b/c/nla-digbench-scaling/geo2-ll_unwindbound10.yml new file mode 100644 index 00000000000..21d18e3445a --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_unwindbound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo2-ll_unwindbound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo2-ll_unwindbound100.c b/c/nla-digbench-scaling/geo2-ll_unwindbound100.c new file mode 100644 index 00000000000..f775b6a192b --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_unwindbound100.c @@ -0,0 +1,46 @@ +/* +Geometric Series +computes x = sum(z^k)[k=0..k-1], y = z^(k-1) +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo2-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + + +int counter = 0; +int main() { + int z, k; + long long x, y, c; + z = __VERIFIER_nondet_int(); + k = __VERIFIER_nondet_int(); + + x = 1; + y = 1; + c = 1; + + while (counter++<100) { + __VERIFIER_assert(1 + x*z - x - z*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + } + __VERIFIER_assert(1 + x*z - x - z*y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo2-ll_unwindbound100.yml b/c/nla-digbench-scaling/geo2-ll_unwindbound100.yml new file mode 100644 index 00000000000..b633b8456cb --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_unwindbound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo2-ll_unwindbound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo2-ll_unwindbound2.c b/c/nla-digbench-scaling/geo2-ll_unwindbound2.c new file mode 100644 index 00000000000..9e505016f48 --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_unwindbound2.c @@ -0,0 +1,46 @@ +/* +Geometric Series +computes x = sum(z^k)[k=0..k-1], y = z^(k-1) +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo2-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + + +int counter = 0; +int main() { + int z, k; + long long x, y, c; + z = __VERIFIER_nondet_int(); + k = __VERIFIER_nondet_int(); + + x = 1; + y = 1; + c = 1; + + while (counter++<2) { + __VERIFIER_assert(1 + x*z - x - z*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + } + __VERIFIER_assert(1 + x*z - x - z*y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo2-ll_unwindbound2.yml b/c/nla-digbench-scaling/geo2-ll_unwindbound2.yml new file mode 100644 index 00000000000..a04171ae2e7 --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_unwindbound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo2-ll_unwindbound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo2-ll_unwindbound20.c b/c/nla-digbench-scaling/geo2-ll_unwindbound20.c new file mode 100644 index 00000000000..9606a0c365e --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_unwindbound20.c @@ -0,0 +1,46 @@ +/* +Geometric Series +computes x = sum(z^k)[k=0..k-1], y = z^(k-1) +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo2-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + + +int counter = 0; +int main() { + int z, k; + long long x, y, c; + z = __VERIFIER_nondet_int(); + k = __VERIFIER_nondet_int(); + + x = 1; + y = 1; + c = 1; + + while (counter++<20) { + __VERIFIER_assert(1 + x*z - x - z*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + } + __VERIFIER_assert(1 + x*z - x - z*y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo2-ll_unwindbound20.yml b/c/nla-digbench-scaling/geo2-ll_unwindbound20.yml new file mode 100644 index 00000000000..434ece52120 --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_unwindbound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo2-ll_unwindbound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo2-ll_unwindbound5.c b/c/nla-digbench-scaling/geo2-ll_unwindbound5.c new file mode 100644 index 00000000000..7dfcc516ef8 --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_unwindbound5.c @@ -0,0 +1,46 @@ +/* +Geometric Series +computes x = sum(z^k)[k=0..k-1], y = z^(k-1) +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo2-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + + +int counter = 0; +int main() { + int z, k; + long long x, y, c; + z = __VERIFIER_nondet_int(); + k = __VERIFIER_nondet_int(); + + x = 1; + y = 1; + c = 1; + + while (counter++<5) { + __VERIFIER_assert(1 + x*z - x - z*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + } + __VERIFIER_assert(1 + x*z - x - z*y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo2-ll_unwindbound5.yml b/c/nla-digbench-scaling/geo2-ll_unwindbound5.yml new file mode 100644 index 00000000000..06e69460b84 --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_unwindbound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo2-ll_unwindbound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo2-ll_unwindbound50.c b/c/nla-digbench-scaling/geo2-ll_unwindbound50.c new file mode 100644 index 00000000000..4f639d5e97b --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_unwindbound50.c @@ -0,0 +1,46 @@ +/* +Geometric Series +computes x = sum(z^k)[k=0..k-1], y = z^(k-1) +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo2-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + + +int counter = 0; +int main() { + int z, k; + long long x, y, c; + z = __VERIFIER_nondet_int(); + k = __VERIFIER_nondet_int(); + + x = 1; + y = 1; + c = 1; + + while (counter++<50) { + __VERIFIER_assert(1 + x*z - x - z*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + } + __VERIFIER_assert(1 + x*z - x - z*y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo2-ll_unwindbound50.yml b/c/nla-digbench-scaling/geo2-ll_unwindbound50.yml new file mode 100644 index 00000000000..bb035b18e47 --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_unwindbound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo2-ll_unwindbound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo2-ll_valuebound1.c b/c/nla-digbench-scaling/geo2-ll_valuebound1.c new file mode 100644 index 00000000000..a98d8a115c1 --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_valuebound1.c @@ -0,0 +1,47 @@ +/* +Geometric Series +computes x = sum(z^k)[k=0..k-1], y = z^(k-1) +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo2-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + + +int main() { + int z, k; + long long x, y, c; + z = __VERIFIER_nondet_int(); + assume_abort_if_not(z>=0 && z<=1); + k = __VERIFIER_nondet_int(); + assume_abort_if_not(k>=0 && k<=1); + + x = 1; + y = 1; + c = 1; + + while (1) { + __VERIFIER_assert(1 + x*z - x - z*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + } + __VERIFIER_assert(1 + x*z - x - z*y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo2-ll_valuebound1.yml b/c/nla-digbench-scaling/geo2-ll_valuebound1.yml new file mode 100644 index 00000000000..dc2379756f8 --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_valuebound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo2-ll_valuebound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo2-ll_valuebound10.c b/c/nla-digbench-scaling/geo2-ll_valuebound10.c new file mode 100644 index 00000000000..c6f4b0a858f --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_valuebound10.c @@ -0,0 +1,47 @@ +/* +Geometric Series +computes x = sum(z^k)[k=0..k-1], y = z^(k-1) +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo2-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + + +int main() { + int z, k; + long long x, y, c; + z = __VERIFIER_nondet_int(); + assume_abort_if_not(z>=0 && z<=10); + k = __VERIFIER_nondet_int(); + assume_abort_if_not(k>=0 && k<=10); + + x = 1; + y = 1; + c = 1; + + while (1) { + __VERIFIER_assert(1 + x*z - x - z*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + } + __VERIFIER_assert(1 + x*z - x - z*y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo2-ll_valuebound10.yml b/c/nla-digbench-scaling/geo2-ll_valuebound10.yml new file mode 100644 index 00000000000..7e004894fa5 --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_valuebound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo2-ll_valuebound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo2-ll_valuebound100.c b/c/nla-digbench-scaling/geo2-ll_valuebound100.c new file mode 100644 index 00000000000..4e170219d52 --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_valuebound100.c @@ -0,0 +1,47 @@ +/* +Geometric Series +computes x = sum(z^k)[k=0..k-1], y = z^(k-1) +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo2-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + + +int main() { + int z, k; + long long x, y, c; + z = __VERIFIER_nondet_int(); + assume_abort_if_not(z>=0 && z<=100); + k = __VERIFIER_nondet_int(); + assume_abort_if_not(k>=0 && k<=100); + + x = 1; + y = 1; + c = 1; + + while (1) { + __VERIFIER_assert(1 + x*z - x - z*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + } + __VERIFIER_assert(1 + x*z - x - z*y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo2-ll_valuebound100.yml b/c/nla-digbench-scaling/geo2-ll_valuebound100.yml new file mode 100644 index 00000000000..5418f7a5427 --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_valuebound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo2-ll_valuebound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo2-ll_valuebound2.c b/c/nla-digbench-scaling/geo2-ll_valuebound2.c new file mode 100644 index 00000000000..f861bc5dd28 --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_valuebound2.c @@ -0,0 +1,47 @@ +/* +Geometric Series +computes x = sum(z^k)[k=0..k-1], y = z^(k-1) +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo2-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + + +int main() { + int z, k; + long long x, y, c; + z = __VERIFIER_nondet_int(); + assume_abort_if_not(z>=0 && z<=2); + k = __VERIFIER_nondet_int(); + assume_abort_if_not(k>=0 && k<=2); + + x = 1; + y = 1; + c = 1; + + while (1) { + __VERIFIER_assert(1 + x*z - x - z*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + } + __VERIFIER_assert(1 + x*z - x - z*y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo2-ll_valuebound2.yml b/c/nla-digbench-scaling/geo2-ll_valuebound2.yml new file mode 100644 index 00000000000..ab5112577a8 --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_valuebound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo2-ll_valuebound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo2-ll_valuebound20.c b/c/nla-digbench-scaling/geo2-ll_valuebound20.c new file mode 100644 index 00000000000..657e72015fe --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_valuebound20.c @@ -0,0 +1,47 @@ +/* +Geometric Series +computes x = sum(z^k)[k=0..k-1], y = z^(k-1) +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo2-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + + +int main() { + int z, k; + long long x, y, c; + z = __VERIFIER_nondet_int(); + assume_abort_if_not(z>=0 && z<=20); + k = __VERIFIER_nondet_int(); + assume_abort_if_not(k>=0 && k<=20); + + x = 1; + y = 1; + c = 1; + + while (1) { + __VERIFIER_assert(1 + x*z - x - z*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + } + __VERIFIER_assert(1 + x*z - x - z*y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo2-ll_valuebound20.yml b/c/nla-digbench-scaling/geo2-ll_valuebound20.yml new file mode 100644 index 00000000000..5623d2c7219 --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_valuebound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo2-ll_valuebound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo2-ll_valuebound5.c b/c/nla-digbench-scaling/geo2-ll_valuebound5.c new file mode 100644 index 00000000000..e4fbdd0fc78 --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_valuebound5.c @@ -0,0 +1,47 @@ +/* +Geometric Series +computes x = sum(z^k)[k=0..k-1], y = z^(k-1) +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo2-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + + +int main() { + int z, k; + long long x, y, c; + z = __VERIFIER_nondet_int(); + assume_abort_if_not(z>=0 && z<=5); + k = __VERIFIER_nondet_int(); + assume_abort_if_not(k>=0 && k<=5); + + x = 1; + y = 1; + c = 1; + + while (1) { + __VERIFIER_assert(1 + x*z - x - z*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + } + __VERIFIER_assert(1 + x*z - x - z*y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo2-ll_valuebound5.yml b/c/nla-digbench-scaling/geo2-ll_valuebound5.yml new file mode 100644 index 00000000000..5eeabf8020b --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_valuebound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo2-ll_valuebound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo2-ll_valuebound50.c b/c/nla-digbench-scaling/geo2-ll_valuebound50.c new file mode 100644 index 00000000000..4540803b669 --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_valuebound50.c @@ -0,0 +1,47 @@ +/* +Geometric Series +computes x = sum(z^k)[k=0..k-1], y = z^(k-1) +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo2-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + + +int main() { + int z, k; + long long x, y, c; + z = __VERIFIER_nondet_int(); + assume_abort_if_not(z>=0 && z<=50); + k = __VERIFIER_nondet_int(); + assume_abort_if_not(k>=0 && k<=50); + + x = 1; + y = 1; + c = 1; + + while (1) { + __VERIFIER_assert(1 + x*z - x - z*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + 1; + y = y * z; + } + __VERIFIER_assert(1 + x*z - x - z*y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/geo2-ll_valuebound50.yml b/c/nla-digbench-scaling/geo2-ll_valuebound50.yml new file mode 100644 index 00000000000..a39b1089062 --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_valuebound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo2-ll_valuebound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo2_unwindbound1.c b/c/nla-digbench-scaling/geo2_unwindbound1.c deleted file mode 100644 index ffb1463fb92..00000000000 --- a/c/nla-digbench-scaling/geo2_unwindbound1.c +++ /dev/null @@ -1,45 +0,0 @@ -/* -Geometric Series -computes x = sum(z^k)[k=0..k-1], y = z^(k-1) -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - - -int counter = 0; -int main() { - int z, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - k = __VERIFIER_nondet_int(); - - x = 1; - y = 1; - c = 1; - - while (counter++<1) { - __VERIFIER_assert(1 + x*z - x - z*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + 1; - y = y * z; - } - __VERIFIER_assert(1 + x*z - x - z*y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/geo2_unwindbound1.yml b/c/nla-digbench-scaling/geo2_unwindbound1.yml deleted file mode 100644 index deef20ef97d..00000000000 --- a/c/nla-digbench-scaling/geo2_unwindbound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo2_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo2_unwindbound10.c b/c/nla-digbench-scaling/geo2_unwindbound10.c deleted file mode 100644 index c5cd821d11a..00000000000 --- a/c/nla-digbench-scaling/geo2_unwindbound10.c +++ /dev/null @@ -1,45 +0,0 @@ -/* -Geometric Series -computes x = sum(z^k)[k=0..k-1], y = z^(k-1) -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - - -int counter = 0; -int main() { - int z, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - k = __VERIFIER_nondet_int(); - - x = 1; - y = 1; - c = 1; - - while (counter++<10) { - __VERIFIER_assert(1 + x*z - x - z*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + 1; - y = y * z; - } - __VERIFIER_assert(1 + x*z - x - z*y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/geo2_unwindbound10.yml b/c/nla-digbench-scaling/geo2_unwindbound10.yml deleted file mode 100644 index fcfb03609b9..00000000000 --- a/c/nla-digbench-scaling/geo2_unwindbound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo2_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo2_unwindbound100.c b/c/nla-digbench-scaling/geo2_unwindbound100.c deleted file mode 100644 index b7df103d73f..00000000000 --- a/c/nla-digbench-scaling/geo2_unwindbound100.c +++ /dev/null @@ -1,45 +0,0 @@ -/* -Geometric Series -computes x = sum(z^k)[k=0..k-1], y = z^(k-1) -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - - -int counter = 0; -int main() { - int z, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - k = __VERIFIER_nondet_int(); - - x = 1; - y = 1; - c = 1; - - while (counter++<100) { - __VERIFIER_assert(1 + x*z - x - z*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + 1; - y = y * z; - } - __VERIFIER_assert(1 + x*z - x - z*y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/geo2_unwindbound100.yml b/c/nla-digbench-scaling/geo2_unwindbound100.yml deleted file mode 100644 index 9c91978834e..00000000000 --- a/c/nla-digbench-scaling/geo2_unwindbound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo2_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo2_unwindbound2.c b/c/nla-digbench-scaling/geo2_unwindbound2.c deleted file mode 100644 index 1944041b235..00000000000 --- a/c/nla-digbench-scaling/geo2_unwindbound2.c +++ /dev/null @@ -1,45 +0,0 @@ -/* -Geometric Series -computes x = sum(z^k)[k=0..k-1], y = z^(k-1) -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - - -int counter = 0; -int main() { - int z, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - k = __VERIFIER_nondet_int(); - - x = 1; - y = 1; - c = 1; - - while (counter++<2) { - __VERIFIER_assert(1 + x*z - x - z*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + 1; - y = y * z; - } - __VERIFIER_assert(1 + x*z - x - z*y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/geo2_unwindbound2.yml b/c/nla-digbench-scaling/geo2_unwindbound2.yml deleted file mode 100644 index 87e78114dc9..00000000000 --- a/c/nla-digbench-scaling/geo2_unwindbound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo2_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo2_unwindbound20.c b/c/nla-digbench-scaling/geo2_unwindbound20.c deleted file mode 100644 index cd252de69de..00000000000 --- a/c/nla-digbench-scaling/geo2_unwindbound20.c +++ /dev/null @@ -1,45 +0,0 @@ -/* -Geometric Series -computes x = sum(z^k)[k=0..k-1], y = z^(k-1) -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - - -int counter = 0; -int main() { - int z, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - k = __VERIFIER_nondet_int(); - - x = 1; - y = 1; - c = 1; - - while (counter++<20) { - __VERIFIER_assert(1 + x*z - x - z*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + 1; - y = y * z; - } - __VERIFIER_assert(1 + x*z - x - z*y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/geo2_unwindbound20.yml b/c/nla-digbench-scaling/geo2_unwindbound20.yml deleted file mode 100644 index 7bdf2679e72..00000000000 --- a/c/nla-digbench-scaling/geo2_unwindbound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo2_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo2_unwindbound5.c b/c/nla-digbench-scaling/geo2_unwindbound5.c deleted file mode 100644 index 755d687258b..00000000000 --- a/c/nla-digbench-scaling/geo2_unwindbound5.c +++ /dev/null @@ -1,45 +0,0 @@ -/* -Geometric Series -computes x = sum(z^k)[k=0..k-1], y = z^(k-1) -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - - -int counter = 0; -int main() { - int z, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - k = __VERIFIER_nondet_int(); - - x = 1; - y = 1; - c = 1; - - while (counter++<5) { - __VERIFIER_assert(1 + x*z - x - z*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + 1; - y = y * z; - } - __VERIFIER_assert(1 + x*z - x - z*y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/geo2_unwindbound5.yml b/c/nla-digbench-scaling/geo2_unwindbound5.yml deleted file mode 100644 index c5ff518a59d..00000000000 --- a/c/nla-digbench-scaling/geo2_unwindbound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo2_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo2_unwindbound50.c b/c/nla-digbench-scaling/geo2_unwindbound50.c deleted file mode 100644 index 7566301ee9c..00000000000 --- a/c/nla-digbench-scaling/geo2_unwindbound50.c +++ /dev/null @@ -1,45 +0,0 @@ -/* -Geometric Series -computes x = sum(z^k)[k=0..k-1], y = z^(k-1) -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - - -int counter = 0; -int main() { - int z, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - k = __VERIFIER_nondet_int(); - - x = 1; - y = 1; - c = 1; - - while (counter++<50) { - __VERIFIER_assert(1 + x*z - x - z*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + 1; - y = y * z; - } - __VERIFIER_assert(1 + x*z - x - z*y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/geo2_unwindbound50.yml b/c/nla-digbench-scaling/geo2_unwindbound50.yml deleted file mode 100644 index f7e204817b1..00000000000 --- a/c/nla-digbench-scaling/geo2_unwindbound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo2_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo2_valuebound1.c b/c/nla-digbench-scaling/geo2_valuebound1.c deleted file mode 100644 index d2bcff6eb64..00000000000 --- a/c/nla-digbench-scaling/geo2_valuebound1.c +++ /dev/null @@ -1,46 +0,0 @@ -/* -Geometric Series -computes x = sum(z^k)[k=0..k-1], y = z^(k-1) -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - - -int main() { - int z, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - assume_abort_if_not(z>0 && z<=1); - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=1); - - x = 1; - y = 1; - c = 1; - - while (1) { - __VERIFIER_assert(1 + x*z - x - z*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + 1; - y = y * z; - } - __VERIFIER_assert(1 + x*z - x - z*y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/geo2_valuebound1.yml b/c/nla-digbench-scaling/geo2_valuebound1.yml deleted file mode 100644 index 7bda99a5d51..00000000000 --- a/c/nla-digbench-scaling/geo2_valuebound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo2_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo2_valuebound10.c b/c/nla-digbench-scaling/geo2_valuebound10.c deleted file mode 100644 index 10d1005d820..00000000000 --- a/c/nla-digbench-scaling/geo2_valuebound10.c +++ /dev/null @@ -1,46 +0,0 @@ -/* -Geometric Series -computes x = sum(z^k)[k=0..k-1], y = z^(k-1) -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - - -int main() { - int z, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - assume_abort_if_not(z>0 && z<=10); - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=10); - - x = 1; - y = 1; - c = 1; - - while (1) { - __VERIFIER_assert(1 + x*z - x - z*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + 1; - y = y * z; - } - __VERIFIER_assert(1 + x*z - x - z*y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/geo2_valuebound10.yml b/c/nla-digbench-scaling/geo2_valuebound10.yml deleted file mode 100644 index 7a271065197..00000000000 --- a/c/nla-digbench-scaling/geo2_valuebound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo2_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo2_valuebound100.c b/c/nla-digbench-scaling/geo2_valuebound100.c deleted file mode 100644 index 846d50d79e1..00000000000 --- a/c/nla-digbench-scaling/geo2_valuebound100.c +++ /dev/null @@ -1,46 +0,0 @@ -/* -Geometric Series -computes x = sum(z^k)[k=0..k-1], y = z^(k-1) -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - - -int main() { - int z, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - assume_abort_if_not(z>0 && z<=100); - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=100); - - x = 1; - y = 1; - c = 1; - - while (1) { - __VERIFIER_assert(1 + x*z - x - z*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + 1; - y = y * z; - } - __VERIFIER_assert(1 + x*z - x - z*y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/geo2_valuebound100.yml b/c/nla-digbench-scaling/geo2_valuebound100.yml deleted file mode 100644 index 29856333593..00000000000 --- a/c/nla-digbench-scaling/geo2_valuebound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo2_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo2_valuebound2.c b/c/nla-digbench-scaling/geo2_valuebound2.c deleted file mode 100644 index fb9c4349a25..00000000000 --- a/c/nla-digbench-scaling/geo2_valuebound2.c +++ /dev/null @@ -1,46 +0,0 @@ -/* -Geometric Series -computes x = sum(z^k)[k=0..k-1], y = z^(k-1) -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - - -int main() { - int z, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - assume_abort_if_not(z>0 && z<=2); - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=2); - - x = 1; - y = 1; - c = 1; - - while (1) { - __VERIFIER_assert(1 + x*z - x - z*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + 1; - y = y * z; - } - __VERIFIER_assert(1 + x*z - x - z*y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/geo2_valuebound2.yml b/c/nla-digbench-scaling/geo2_valuebound2.yml deleted file mode 100644 index c456268beab..00000000000 --- a/c/nla-digbench-scaling/geo2_valuebound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo2_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo2_valuebound20.c b/c/nla-digbench-scaling/geo2_valuebound20.c deleted file mode 100644 index 01000ca6901..00000000000 --- a/c/nla-digbench-scaling/geo2_valuebound20.c +++ /dev/null @@ -1,46 +0,0 @@ -/* -Geometric Series -computes x = sum(z^k)[k=0..k-1], y = z^(k-1) -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - - -int main() { - int z, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - assume_abort_if_not(z>0 && z<=20); - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=20); - - x = 1; - y = 1; - c = 1; - - while (1) { - __VERIFIER_assert(1 + x*z - x - z*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + 1; - y = y * z; - } - __VERIFIER_assert(1 + x*z - x - z*y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/geo2_valuebound20.yml b/c/nla-digbench-scaling/geo2_valuebound20.yml deleted file mode 100644 index bea9a7e3508..00000000000 --- a/c/nla-digbench-scaling/geo2_valuebound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo2_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo2_valuebound5.c b/c/nla-digbench-scaling/geo2_valuebound5.c deleted file mode 100644 index d6956a188ba..00000000000 --- a/c/nla-digbench-scaling/geo2_valuebound5.c +++ /dev/null @@ -1,46 +0,0 @@ -/* -Geometric Series -computes x = sum(z^k)[k=0..k-1], y = z^(k-1) -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - - -int main() { - int z, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - assume_abort_if_not(z>0 && z<=5); - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=5); - - x = 1; - y = 1; - c = 1; - - while (1) { - __VERIFIER_assert(1 + x*z - x - z*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + 1; - y = y * z; - } - __VERIFIER_assert(1 + x*z - x - z*y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/geo2_valuebound5.yml b/c/nla-digbench-scaling/geo2_valuebound5.yml deleted file mode 100644 index 717e846a30a..00000000000 --- a/c/nla-digbench-scaling/geo2_valuebound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo2_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo2_valuebound50.c b/c/nla-digbench-scaling/geo2_valuebound50.c deleted file mode 100644 index 2b57bcc1217..00000000000 --- a/c/nla-digbench-scaling/geo2_valuebound50.c +++ /dev/null @@ -1,46 +0,0 @@ -/* -Geometric Series -computes x = sum(z^k)[k=0..k-1], y = z^(k-1) -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - - -int main() { - int z, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - assume_abort_if_not(z>0 && z<=50); - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=50); - - x = 1; - y = 1; - c = 1; - - while (1) { - __VERIFIER_assert(1 + x*z - x - z*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + 1; - y = y * z; - } - __VERIFIER_assert(1 + x*z - x - z*y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/geo2_valuebound50.yml b/c/nla-digbench-scaling/geo2_valuebound50.yml deleted file mode 100644 index 43736bf23aa..00000000000 --- a/c/nla-digbench-scaling/geo2_valuebound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo2_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo3-ll_unwindbound1.c b/c/nla-digbench-scaling/geo3-ll_unwindbound1.c new file mode 100644 index 00000000000..ca4c4e3e0c3 --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_unwindbound1.c @@ -0,0 +1,46 @@ +/* +Geometric Series +computes x = sum(z^k)[k=0..k-1], y = z^(k-1) +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo3-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int counter = 0; +int main() { + int z, a, k; + long long x, y, c, az; + z = __VERIFIER_nondet_int(); + a = __VERIFIER_nondet_int(); + k = __VERIFIER_nondet_int(); + + x = a; + y = 1; + c = 1; + az = (long long) a * z; + + while (counter++<1) { + __VERIFIER_assert(z*x - x + a - az*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + a; + y = y * z; + } + __VERIFIER_assert(z*x - x + a - az*y == 0); + return x; +} diff --git a/c/nla-digbench-scaling/geo3-ll_unwindbound1.yml b/c/nla-digbench-scaling/geo3-ll_unwindbound1.yml new file mode 100644 index 00000000000..a78fec9f87d --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_unwindbound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo3-ll_unwindbound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo3-ll_unwindbound10.c b/c/nla-digbench-scaling/geo3-ll_unwindbound10.c new file mode 100644 index 00000000000..547915356a5 --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_unwindbound10.c @@ -0,0 +1,46 @@ +/* +Geometric Series +computes x = sum(z^k)[k=0..k-1], y = z^(k-1) +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo3-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int counter = 0; +int main() { + int z, a, k; + long long x, y, c, az; + z = __VERIFIER_nondet_int(); + a = __VERIFIER_nondet_int(); + k = __VERIFIER_nondet_int(); + + x = a; + y = 1; + c = 1; + az = (long long) a * z; + + while (counter++<10) { + __VERIFIER_assert(z*x - x + a - az*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + a; + y = y * z; + } + __VERIFIER_assert(z*x - x + a - az*y == 0); + return x; +} diff --git a/c/nla-digbench-scaling/geo3-ll_unwindbound10.yml b/c/nla-digbench-scaling/geo3-ll_unwindbound10.yml new file mode 100644 index 00000000000..fd2b6cd6806 --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_unwindbound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo3-ll_unwindbound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo3-ll_unwindbound100.c b/c/nla-digbench-scaling/geo3-ll_unwindbound100.c new file mode 100644 index 00000000000..f97cd67f314 --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_unwindbound100.c @@ -0,0 +1,46 @@ +/* +Geometric Series +computes x = sum(z^k)[k=0..k-1], y = z^(k-1) +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo3-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int counter = 0; +int main() { + int z, a, k; + long long x, y, c, az; + z = __VERIFIER_nondet_int(); + a = __VERIFIER_nondet_int(); + k = __VERIFIER_nondet_int(); + + x = a; + y = 1; + c = 1; + az = (long long) a * z; + + while (counter++<100) { + __VERIFIER_assert(z*x - x + a - az*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + a; + y = y * z; + } + __VERIFIER_assert(z*x - x + a - az*y == 0); + return x; +} diff --git a/c/nla-digbench-scaling/geo3-ll_unwindbound100.yml b/c/nla-digbench-scaling/geo3-ll_unwindbound100.yml new file mode 100644 index 00000000000..fd155b45c60 --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_unwindbound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo3-ll_unwindbound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo3-ll_unwindbound2.c b/c/nla-digbench-scaling/geo3-ll_unwindbound2.c new file mode 100644 index 00000000000..51188f470fc --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_unwindbound2.c @@ -0,0 +1,46 @@ +/* +Geometric Series +computes x = sum(z^k)[k=0..k-1], y = z^(k-1) +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo3-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int counter = 0; +int main() { + int z, a, k; + long long x, y, c, az; + z = __VERIFIER_nondet_int(); + a = __VERIFIER_nondet_int(); + k = __VERIFIER_nondet_int(); + + x = a; + y = 1; + c = 1; + az = (long long) a * z; + + while (counter++<2) { + __VERIFIER_assert(z*x - x + a - az*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + a; + y = y * z; + } + __VERIFIER_assert(z*x - x + a - az*y == 0); + return x; +} diff --git a/c/nla-digbench-scaling/geo3-ll_unwindbound2.yml b/c/nla-digbench-scaling/geo3-ll_unwindbound2.yml new file mode 100644 index 00000000000..d68f821066b --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_unwindbound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo3-ll_unwindbound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo3-ll_unwindbound20.c b/c/nla-digbench-scaling/geo3-ll_unwindbound20.c new file mode 100644 index 00000000000..dca3ad2bf95 --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_unwindbound20.c @@ -0,0 +1,46 @@ +/* +Geometric Series +computes x = sum(z^k)[k=0..k-1], y = z^(k-1) +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo3-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int counter = 0; +int main() { + int z, a, k; + long long x, y, c, az; + z = __VERIFIER_nondet_int(); + a = __VERIFIER_nondet_int(); + k = __VERIFIER_nondet_int(); + + x = a; + y = 1; + c = 1; + az = (long long) a * z; + + while (counter++<20) { + __VERIFIER_assert(z*x - x + a - az*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + a; + y = y * z; + } + __VERIFIER_assert(z*x - x + a - az*y == 0); + return x; +} diff --git a/c/nla-digbench-scaling/geo3-ll_unwindbound20.yml b/c/nla-digbench-scaling/geo3-ll_unwindbound20.yml new file mode 100644 index 00000000000..e89c3bfaad5 --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_unwindbound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo3-ll_unwindbound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo3-ll_unwindbound5.c b/c/nla-digbench-scaling/geo3-ll_unwindbound5.c new file mode 100644 index 00000000000..d657c9ad6b7 --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_unwindbound5.c @@ -0,0 +1,46 @@ +/* +Geometric Series +computes x = sum(z^k)[k=0..k-1], y = z^(k-1) +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo3-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int counter = 0; +int main() { + int z, a, k; + long long x, y, c, az; + z = __VERIFIER_nondet_int(); + a = __VERIFIER_nondet_int(); + k = __VERIFIER_nondet_int(); + + x = a; + y = 1; + c = 1; + az = (long long) a * z; + + while (counter++<5) { + __VERIFIER_assert(z*x - x + a - az*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + a; + y = y * z; + } + __VERIFIER_assert(z*x - x + a - az*y == 0); + return x; +} diff --git a/c/nla-digbench-scaling/geo3-ll_unwindbound5.yml b/c/nla-digbench-scaling/geo3-ll_unwindbound5.yml new file mode 100644 index 00000000000..61b157ba06d --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_unwindbound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo3-ll_unwindbound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo3-ll_unwindbound50.c b/c/nla-digbench-scaling/geo3-ll_unwindbound50.c new file mode 100644 index 00000000000..60ee6d378f7 --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_unwindbound50.c @@ -0,0 +1,46 @@ +/* +Geometric Series +computes x = sum(z^k)[k=0..k-1], y = z^(k-1) +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo3-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int counter = 0; +int main() { + int z, a, k; + long long x, y, c, az; + z = __VERIFIER_nondet_int(); + a = __VERIFIER_nondet_int(); + k = __VERIFIER_nondet_int(); + + x = a; + y = 1; + c = 1; + az = (long long) a * z; + + while (counter++<50) { + __VERIFIER_assert(z*x - x + a - az*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + a; + y = y * z; + } + __VERIFIER_assert(z*x - x + a - az*y == 0); + return x; +} diff --git a/c/nla-digbench-scaling/geo3-ll_unwindbound50.yml b/c/nla-digbench-scaling/geo3-ll_unwindbound50.yml new file mode 100644 index 00000000000..c965efc9c77 --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_unwindbound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo3-ll_unwindbound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo3-ll_valuebound1.c b/c/nla-digbench-scaling/geo3-ll_valuebound1.c new file mode 100644 index 00000000000..c27e28985ea --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_valuebound1.c @@ -0,0 +1,48 @@ +/* +Geometric Series +computes x = sum(z^k)[k=0..k-1], y = z^(k-1) +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo3-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int main() { + int z, a, k; + long long x, y, c, az; + z = __VERIFIER_nondet_int(); + assume_abort_if_not(z>=0 && z<=1); + a = __VERIFIER_nondet_int(); + assume_abort_if_not(a>=0 && a<=1); + k = __VERIFIER_nondet_int(); + assume_abort_if_not(k>=0 && k<=1); + + x = a; + y = 1; + c = 1; + az = (long long) a * z; + + while (1) { + __VERIFIER_assert(z*x - x + a - az*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + a; + y = y * z; + } + __VERIFIER_assert(z*x - x + a - az*y == 0); + return x; +} diff --git a/c/nla-digbench-scaling/geo3-ll_valuebound1.yml b/c/nla-digbench-scaling/geo3-ll_valuebound1.yml new file mode 100644 index 00000000000..7abbd9b79b0 --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_valuebound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo3-ll_valuebound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo3-ll_valuebound10.c b/c/nla-digbench-scaling/geo3-ll_valuebound10.c new file mode 100644 index 00000000000..faf2f5c93fb --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_valuebound10.c @@ -0,0 +1,48 @@ +/* +Geometric Series +computes x = sum(z^k)[k=0..k-1], y = z^(k-1) +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo3-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int main() { + int z, a, k; + long long x, y, c, az; + z = __VERIFIER_nondet_int(); + assume_abort_if_not(z>=0 && z<=10); + a = __VERIFIER_nondet_int(); + assume_abort_if_not(a>=0 && a<=10); + k = __VERIFIER_nondet_int(); + assume_abort_if_not(k>=0 && k<=10); + + x = a; + y = 1; + c = 1; + az = (long long) a * z; + + while (1) { + __VERIFIER_assert(z*x - x + a - az*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + a; + y = y * z; + } + __VERIFIER_assert(z*x - x + a - az*y == 0); + return x; +} diff --git a/c/nla-digbench-scaling/geo3-ll_valuebound10.yml b/c/nla-digbench-scaling/geo3-ll_valuebound10.yml new file mode 100644 index 00000000000..bb056c028ae --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_valuebound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo3-ll_valuebound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo3-ll_valuebound100.c b/c/nla-digbench-scaling/geo3-ll_valuebound100.c new file mode 100644 index 00000000000..ce2ef0473fd --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_valuebound100.c @@ -0,0 +1,48 @@ +/* +Geometric Series +computes x = sum(z^k)[k=0..k-1], y = z^(k-1) +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo3-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int main() { + int z, a, k; + long long x, y, c, az; + z = __VERIFIER_nondet_int(); + assume_abort_if_not(z>=0 && z<=100); + a = __VERIFIER_nondet_int(); + assume_abort_if_not(a>=0 && a<=100); + k = __VERIFIER_nondet_int(); + assume_abort_if_not(k>=0 && k<=100); + + x = a; + y = 1; + c = 1; + az = (long long) a * z; + + while (1) { + __VERIFIER_assert(z*x - x + a - az*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + a; + y = y * z; + } + __VERIFIER_assert(z*x - x + a - az*y == 0); + return x; +} diff --git a/c/nla-digbench-scaling/geo3-ll_valuebound100.yml b/c/nla-digbench-scaling/geo3-ll_valuebound100.yml new file mode 100644 index 00000000000..e87899d5c7d --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_valuebound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo3-ll_valuebound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo3-ll_valuebound2.c b/c/nla-digbench-scaling/geo3-ll_valuebound2.c new file mode 100644 index 00000000000..0350ded0f52 --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_valuebound2.c @@ -0,0 +1,48 @@ +/* +Geometric Series +computes x = sum(z^k)[k=0..k-1], y = z^(k-1) +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo3-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int main() { + int z, a, k; + long long x, y, c, az; + z = __VERIFIER_nondet_int(); + assume_abort_if_not(z>=0 && z<=2); + a = __VERIFIER_nondet_int(); + assume_abort_if_not(a>=0 && a<=2); + k = __VERIFIER_nondet_int(); + assume_abort_if_not(k>=0 && k<=2); + + x = a; + y = 1; + c = 1; + az = (long long) a * z; + + while (1) { + __VERIFIER_assert(z*x - x + a - az*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + a; + y = y * z; + } + __VERIFIER_assert(z*x - x + a - az*y == 0); + return x; +} diff --git a/c/nla-digbench-scaling/geo3-ll_valuebound2.yml b/c/nla-digbench-scaling/geo3-ll_valuebound2.yml new file mode 100644 index 00000000000..d4a8e52c40a --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_valuebound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo3-ll_valuebound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo3-ll_valuebound20.c b/c/nla-digbench-scaling/geo3-ll_valuebound20.c new file mode 100644 index 00000000000..e34b97aa35f --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_valuebound20.c @@ -0,0 +1,48 @@ +/* +Geometric Series +computes x = sum(z^k)[k=0..k-1], y = z^(k-1) +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo3-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int main() { + int z, a, k; + long long x, y, c, az; + z = __VERIFIER_nondet_int(); + assume_abort_if_not(z>=0 && z<=20); + a = __VERIFIER_nondet_int(); + assume_abort_if_not(a>=0 && a<=20); + k = __VERIFIER_nondet_int(); + assume_abort_if_not(k>=0 && k<=20); + + x = a; + y = 1; + c = 1; + az = (long long) a * z; + + while (1) { + __VERIFIER_assert(z*x - x + a - az*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + a; + y = y * z; + } + __VERIFIER_assert(z*x - x + a - az*y == 0); + return x; +} diff --git a/c/nla-digbench-scaling/geo3-ll_valuebound20.yml b/c/nla-digbench-scaling/geo3-ll_valuebound20.yml new file mode 100644 index 00000000000..ed288bb0375 --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_valuebound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo3-ll_valuebound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo3-ll_valuebound5.c b/c/nla-digbench-scaling/geo3-ll_valuebound5.c new file mode 100644 index 00000000000..397a4513772 --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_valuebound5.c @@ -0,0 +1,48 @@ +/* +Geometric Series +computes x = sum(z^k)[k=0..k-1], y = z^(k-1) +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo3-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int main() { + int z, a, k; + long long x, y, c, az; + z = __VERIFIER_nondet_int(); + assume_abort_if_not(z>=0 && z<=5); + a = __VERIFIER_nondet_int(); + assume_abort_if_not(a>=0 && a<=5); + k = __VERIFIER_nondet_int(); + assume_abort_if_not(k>=0 && k<=5); + + x = a; + y = 1; + c = 1; + az = (long long) a * z; + + while (1) { + __VERIFIER_assert(z*x - x + a - az*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + a; + y = y * z; + } + __VERIFIER_assert(z*x - x + a - az*y == 0); + return x; +} diff --git a/c/nla-digbench-scaling/geo3-ll_valuebound5.yml b/c/nla-digbench-scaling/geo3-ll_valuebound5.yml new file mode 100644 index 00000000000..53e0b9f35a0 --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_valuebound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo3-ll_valuebound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo3-ll_valuebound50.c b/c/nla-digbench-scaling/geo3-ll_valuebound50.c new file mode 100644 index 00000000000..4724f8b2b09 --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_valuebound50.c @@ -0,0 +1,48 @@ +/* +Geometric Series +computes x = sum(z^k)[k=0..k-1], y = z^(k-1) +*/ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "geo3-ll.c", 8, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} +int main() { + int z, a, k; + long long x, y, c, az; + z = __VERIFIER_nondet_int(); + assume_abort_if_not(z>=0 && z<=50); + a = __VERIFIER_nondet_int(); + assume_abort_if_not(a>=0 && a<=50); + k = __VERIFIER_nondet_int(); + assume_abort_if_not(k>=0 && k<=50); + + x = a; + y = 1; + c = 1; + az = (long long) a * z; + + while (1) { + __VERIFIER_assert(z*x - x + a - az*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + x = x * z + a; + y = y * z; + } + __VERIFIER_assert(z*x - x + a - az*y == 0); + return x; +} diff --git a/c/nla-digbench-scaling/geo3-ll_valuebound50.yml b/c/nla-digbench-scaling/geo3-ll_valuebound50.yml new file mode 100644 index 00000000000..37892e4e739 --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_valuebound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'geo3-ll_valuebound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo3_unwindbound1.c b/c/nla-digbench-scaling/geo3_unwindbound1.c deleted file mode 100644 index 198b8934f9e..00000000000 --- a/c/nla-digbench-scaling/geo3_unwindbound1.c +++ /dev/null @@ -1,44 +0,0 @@ -/* -Geometric Series -computes x = sum(z^k)[k=0..k-1], y = z^(k-1) -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} -int counter = 0; -int main() { - int z, a, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - a = __VERIFIER_nondet_int(); - k = __VERIFIER_nondet_int(); - - x = a; - y = 1; - c = 1; - - while (counter++<1) { - __VERIFIER_assert(z*x - x + a - a*z*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + a; - y = y * z; - } - __VERIFIER_assert(z*x - x + a - a*z*y == 0); - return x; -} diff --git a/c/nla-digbench-scaling/geo3_unwindbound1.yml b/c/nla-digbench-scaling/geo3_unwindbound1.yml deleted file mode 100644 index 35209f3bb04..00000000000 --- a/c/nla-digbench-scaling/geo3_unwindbound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo3_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo3_unwindbound10.c b/c/nla-digbench-scaling/geo3_unwindbound10.c deleted file mode 100644 index 4035824aa9e..00000000000 --- a/c/nla-digbench-scaling/geo3_unwindbound10.c +++ /dev/null @@ -1,44 +0,0 @@ -/* -Geometric Series -computes x = sum(z^k)[k=0..k-1], y = z^(k-1) -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} -int counter = 0; -int main() { - int z, a, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - a = __VERIFIER_nondet_int(); - k = __VERIFIER_nondet_int(); - - x = a; - y = 1; - c = 1; - - while (counter++<10) { - __VERIFIER_assert(z*x - x + a - a*z*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + a; - y = y * z; - } - __VERIFIER_assert(z*x - x + a - a*z*y == 0); - return x; -} diff --git a/c/nla-digbench-scaling/geo3_unwindbound10.yml b/c/nla-digbench-scaling/geo3_unwindbound10.yml deleted file mode 100644 index 0c35dd0ebbf..00000000000 --- a/c/nla-digbench-scaling/geo3_unwindbound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo3_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo3_unwindbound100.c b/c/nla-digbench-scaling/geo3_unwindbound100.c deleted file mode 100644 index 76f990eee61..00000000000 --- a/c/nla-digbench-scaling/geo3_unwindbound100.c +++ /dev/null @@ -1,44 +0,0 @@ -/* -Geometric Series -computes x = sum(z^k)[k=0..k-1], y = z^(k-1) -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} -int counter = 0; -int main() { - int z, a, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - a = __VERIFIER_nondet_int(); - k = __VERIFIER_nondet_int(); - - x = a; - y = 1; - c = 1; - - while (counter++<100) { - __VERIFIER_assert(z*x - x + a - a*z*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + a; - y = y * z; - } - __VERIFIER_assert(z*x - x + a - a*z*y == 0); - return x; -} diff --git a/c/nla-digbench-scaling/geo3_unwindbound100.yml b/c/nla-digbench-scaling/geo3_unwindbound100.yml deleted file mode 100644 index bc6afa741cc..00000000000 --- a/c/nla-digbench-scaling/geo3_unwindbound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo3_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo3_unwindbound2.c b/c/nla-digbench-scaling/geo3_unwindbound2.c deleted file mode 100644 index 1bac113283e..00000000000 --- a/c/nla-digbench-scaling/geo3_unwindbound2.c +++ /dev/null @@ -1,44 +0,0 @@ -/* -Geometric Series -computes x = sum(z^k)[k=0..k-1], y = z^(k-1) -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} -int counter = 0; -int main() { - int z, a, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - a = __VERIFIER_nondet_int(); - k = __VERIFIER_nondet_int(); - - x = a; - y = 1; - c = 1; - - while (counter++<2) { - __VERIFIER_assert(z*x - x + a - a*z*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + a; - y = y * z; - } - __VERIFIER_assert(z*x - x + a - a*z*y == 0); - return x; -} diff --git a/c/nla-digbench-scaling/geo3_unwindbound2.yml b/c/nla-digbench-scaling/geo3_unwindbound2.yml deleted file mode 100644 index f27e48bc216..00000000000 --- a/c/nla-digbench-scaling/geo3_unwindbound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo3_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo3_unwindbound20.c b/c/nla-digbench-scaling/geo3_unwindbound20.c deleted file mode 100644 index e20fade7345..00000000000 --- a/c/nla-digbench-scaling/geo3_unwindbound20.c +++ /dev/null @@ -1,44 +0,0 @@ -/* -Geometric Series -computes x = sum(z^k)[k=0..k-1], y = z^(k-1) -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} -int counter = 0; -int main() { - int z, a, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - a = __VERIFIER_nondet_int(); - k = __VERIFIER_nondet_int(); - - x = a; - y = 1; - c = 1; - - while (counter++<20) { - __VERIFIER_assert(z*x - x + a - a*z*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + a; - y = y * z; - } - __VERIFIER_assert(z*x - x + a - a*z*y == 0); - return x; -} diff --git a/c/nla-digbench-scaling/geo3_unwindbound20.yml b/c/nla-digbench-scaling/geo3_unwindbound20.yml deleted file mode 100644 index 148a4dcc369..00000000000 --- a/c/nla-digbench-scaling/geo3_unwindbound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo3_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo3_unwindbound5.c b/c/nla-digbench-scaling/geo3_unwindbound5.c deleted file mode 100644 index 16725bfc1f9..00000000000 --- a/c/nla-digbench-scaling/geo3_unwindbound5.c +++ /dev/null @@ -1,44 +0,0 @@ -/* -Geometric Series -computes x = sum(z^k)[k=0..k-1], y = z^(k-1) -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} -int counter = 0; -int main() { - int z, a, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - a = __VERIFIER_nondet_int(); - k = __VERIFIER_nondet_int(); - - x = a; - y = 1; - c = 1; - - while (counter++<5) { - __VERIFIER_assert(z*x - x + a - a*z*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + a; - y = y * z; - } - __VERIFIER_assert(z*x - x + a - a*z*y == 0); - return x; -} diff --git a/c/nla-digbench-scaling/geo3_unwindbound5.yml b/c/nla-digbench-scaling/geo3_unwindbound5.yml deleted file mode 100644 index 2aabb30cbea..00000000000 --- a/c/nla-digbench-scaling/geo3_unwindbound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo3_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo3_unwindbound50.c b/c/nla-digbench-scaling/geo3_unwindbound50.c deleted file mode 100644 index 9c46f7152b7..00000000000 --- a/c/nla-digbench-scaling/geo3_unwindbound50.c +++ /dev/null @@ -1,44 +0,0 @@ -/* -Geometric Series -computes x = sum(z^k)[k=0..k-1], y = z^(k-1) -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} -int counter = 0; -int main() { - int z, a, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - a = __VERIFIER_nondet_int(); - k = __VERIFIER_nondet_int(); - - x = a; - y = 1; - c = 1; - - while (counter++<50) { - __VERIFIER_assert(z*x - x + a - a*z*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + a; - y = y * z; - } - __VERIFIER_assert(z*x - x + a - a*z*y == 0); - return x; -} diff --git a/c/nla-digbench-scaling/geo3_unwindbound50.yml b/c/nla-digbench-scaling/geo3_unwindbound50.yml deleted file mode 100644 index ab6edff0096..00000000000 --- a/c/nla-digbench-scaling/geo3_unwindbound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo3_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo3_valuebound1.c b/c/nla-digbench-scaling/geo3_valuebound1.c deleted file mode 100644 index dab15148f73..00000000000 --- a/c/nla-digbench-scaling/geo3_valuebound1.c +++ /dev/null @@ -1,46 +0,0 @@ -/* -Geometric Series -computes x = sum(z^k)[k=0..k-1], y = z^(k-1) -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} -int main() { - int z, a, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - assume_abort_if_not(z>0 && z<=1); - a = __VERIFIER_nondet_int(); - assume_abort_if_not(a>0 && a<=1); - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=1); - - x = a; - y = 1; - c = 1; - - while (1) { - __VERIFIER_assert(z*x - x + a - a*z*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + a; - y = y * z; - } - __VERIFIER_assert(z*x - x + a - a*z*y == 0); - return x; -} diff --git a/c/nla-digbench-scaling/geo3_valuebound1.yml b/c/nla-digbench-scaling/geo3_valuebound1.yml deleted file mode 100644 index ff75b4d40b3..00000000000 --- a/c/nla-digbench-scaling/geo3_valuebound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo3_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo3_valuebound10.c b/c/nla-digbench-scaling/geo3_valuebound10.c deleted file mode 100644 index ace9cdd919e..00000000000 --- a/c/nla-digbench-scaling/geo3_valuebound10.c +++ /dev/null @@ -1,46 +0,0 @@ -/* -Geometric Series -computes x = sum(z^k)[k=0..k-1], y = z^(k-1) -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} -int main() { - int z, a, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - assume_abort_if_not(z>0 && z<=10); - a = __VERIFIER_nondet_int(); - assume_abort_if_not(a>0 && a<=10); - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=10); - - x = a; - y = 1; - c = 1; - - while (1) { - __VERIFIER_assert(z*x - x + a - a*z*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + a; - y = y * z; - } - __VERIFIER_assert(z*x - x + a - a*z*y == 0); - return x; -} diff --git a/c/nla-digbench-scaling/geo3_valuebound10.yml b/c/nla-digbench-scaling/geo3_valuebound10.yml deleted file mode 100644 index 52dbf66e5e2..00000000000 --- a/c/nla-digbench-scaling/geo3_valuebound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo3_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo3_valuebound100.c b/c/nla-digbench-scaling/geo3_valuebound100.c deleted file mode 100644 index 01dc0b5b85e..00000000000 --- a/c/nla-digbench-scaling/geo3_valuebound100.c +++ /dev/null @@ -1,46 +0,0 @@ -/* -Geometric Series -computes x = sum(z^k)[k=0..k-1], y = z^(k-1) -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} -int main() { - int z, a, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - assume_abort_if_not(z>0 && z<=100); - a = __VERIFIER_nondet_int(); - assume_abort_if_not(a>0 && a<=100); - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=100); - - x = a; - y = 1; - c = 1; - - while (1) { - __VERIFIER_assert(z*x - x + a - a*z*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + a; - y = y * z; - } - __VERIFIER_assert(z*x - x + a - a*z*y == 0); - return x; -} diff --git a/c/nla-digbench-scaling/geo3_valuebound100.yml b/c/nla-digbench-scaling/geo3_valuebound100.yml deleted file mode 100644 index c5c396edd53..00000000000 --- a/c/nla-digbench-scaling/geo3_valuebound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo3_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo3_valuebound2.c b/c/nla-digbench-scaling/geo3_valuebound2.c deleted file mode 100644 index c43c6632fb7..00000000000 --- a/c/nla-digbench-scaling/geo3_valuebound2.c +++ /dev/null @@ -1,46 +0,0 @@ -/* -Geometric Series -computes x = sum(z^k)[k=0..k-1], y = z^(k-1) -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} -int main() { - int z, a, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - assume_abort_if_not(z>0 && z<=2); - a = __VERIFIER_nondet_int(); - assume_abort_if_not(a>0 && a<=2); - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=2); - - x = a; - y = 1; - c = 1; - - while (1) { - __VERIFIER_assert(z*x - x + a - a*z*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + a; - y = y * z; - } - __VERIFIER_assert(z*x - x + a - a*z*y == 0); - return x; -} diff --git a/c/nla-digbench-scaling/geo3_valuebound2.yml b/c/nla-digbench-scaling/geo3_valuebound2.yml deleted file mode 100644 index ecb4436cbad..00000000000 --- a/c/nla-digbench-scaling/geo3_valuebound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo3_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo3_valuebound20.c b/c/nla-digbench-scaling/geo3_valuebound20.c deleted file mode 100644 index 9cba5f436fd..00000000000 --- a/c/nla-digbench-scaling/geo3_valuebound20.c +++ /dev/null @@ -1,46 +0,0 @@ -/* -Geometric Series -computes x = sum(z^k)[k=0..k-1], y = z^(k-1) -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} -int main() { - int z, a, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - assume_abort_if_not(z>0 && z<=20); - a = __VERIFIER_nondet_int(); - assume_abort_if_not(a>0 && a<=20); - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=20); - - x = a; - y = 1; - c = 1; - - while (1) { - __VERIFIER_assert(z*x - x + a - a*z*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + a; - y = y * z; - } - __VERIFIER_assert(z*x - x + a - a*z*y == 0); - return x; -} diff --git a/c/nla-digbench-scaling/geo3_valuebound20.yml b/c/nla-digbench-scaling/geo3_valuebound20.yml deleted file mode 100644 index 2d22fd19346..00000000000 --- a/c/nla-digbench-scaling/geo3_valuebound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo3_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo3_valuebound5.c b/c/nla-digbench-scaling/geo3_valuebound5.c deleted file mode 100644 index 37454d3590c..00000000000 --- a/c/nla-digbench-scaling/geo3_valuebound5.c +++ /dev/null @@ -1,46 +0,0 @@ -/* -Geometric Series -computes x = sum(z^k)[k=0..k-1], y = z^(k-1) -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} -int main() { - int z, a, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - assume_abort_if_not(z>0 && z<=5); - a = __VERIFIER_nondet_int(); - assume_abort_if_not(a>0 && a<=5); - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=5); - - x = a; - y = 1; - c = 1; - - while (1) { - __VERIFIER_assert(z*x - x + a - a*z*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + a; - y = y * z; - } - __VERIFIER_assert(z*x - x + a - a*z*y == 0); - return x; -} diff --git a/c/nla-digbench-scaling/geo3_valuebound5.yml b/c/nla-digbench-scaling/geo3_valuebound5.yml deleted file mode 100644 index 2b8999808f2..00000000000 --- a/c/nla-digbench-scaling/geo3_valuebound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo3_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/geo3_valuebound50.c b/c/nla-digbench-scaling/geo3_valuebound50.c deleted file mode 100644 index 7cd4559c5ff..00000000000 --- a/c/nla-digbench-scaling/geo3_valuebound50.c +++ /dev/null @@ -1,46 +0,0 @@ -/* -Geometric Series -computes x = sum(z^k)[k=0..k-1], y = z^(k-1) -*/ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} -int main() { - int z, a, k; - int x, y, c; - z = __VERIFIER_nondet_int(); - assume_abort_if_not(z>0 && z<=50); - a = __VERIFIER_nondet_int(); - assume_abort_if_not(a>0 && a<=50); - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=50); - - x = a; - y = 1; - c = 1; - - while (1) { - __VERIFIER_assert(z*x - x + a - a*z*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - x = x * z + a; - y = y * z; - } - __VERIFIER_assert(z*x - x + a - a*z*y == 0); - return x; -} diff --git a/c/nla-digbench-scaling/geo3_valuebound50.yml b/c/nla-digbench-scaling/geo3_valuebound50.yml deleted file mode 100644 index 8e1bb146a8c..00000000000 --- a/c/nla-digbench-scaling/geo3_valuebound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'geo3_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard-ll_unwindbound1.c b/c/nla-digbench-scaling/hard-ll_unwindbound1.c new file mode 100644 index 00000000000..5bdb1f14c3d --- /dev/null +++ b/c/nla-digbench-scaling/hard-ll_unwindbound1.c @@ -0,0 +1,62 @@ +/* + hardware integer division program, by Manna + returns q==A//B + */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard-ll.c", 8, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + unsigned int A, B; + long long r, d, p, q; + A = __VERIFIER_nondet_unsigned_int(); + B = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(B >= 1); + + r = A; + d = B; + p = 1; + q = 0; + + while (counter++<1) { + __VERIFIER_assert(q == 0); + __VERIFIER_assert(r == A); + __VERIFIER_assert(d == B * p); + if (!(r >= d)) break; + + d = 2 * d; + p = 2 * p; + } + + while (counter++<1) { + __VERIFIER_assert(A == q*B + r); + __VERIFIER_assert(d == B*p); + + if (!(p != 1)) break; + + d = d / 2; + p = p / 2; + if (r >= d) { + r = r - d; + q = q + p; + } + } + + __VERIFIER_assert(A == d*q + r); + __VERIFIER_assert(B == d); + return 0; +} diff --git a/c/nla-digbench-scaling/hard-ll_unwindbound1.yml b/c/nla-digbench-scaling/hard-ll_unwindbound1.yml new file mode 100644 index 00000000000..32b05de90b1 --- /dev/null +++ b/c/nla-digbench-scaling/hard-ll_unwindbound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'hard-ll_unwindbound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard-ll_unwindbound10.c b/c/nla-digbench-scaling/hard-ll_unwindbound10.c new file mode 100644 index 00000000000..8139f0e1827 --- /dev/null +++ b/c/nla-digbench-scaling/hard-ll_unwindbound10.c @@ -0,0 +1,62 @@ +/* + hardware integer division program, by Manna + returns q==A//B + */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard-ll.c", 8, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + unsigned int A, B; + long long r, d, p, q; + A = __VERIFIER_nondet_unsigned_int(); + B = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(B >= 1); + + r = A; + d = B; + p = 1; + q = 0; + + while (counter++<10) { + __VERIFIER_assert(q == 0); + __VERIFIER_assert(r == A); + __VERIFIER_assert(d == B * p); + if (!(r >= d)) break; + + d = 2 * d; + p = 2 * p; + } + + while (counter++<10) { + __VERIFIER_assert(A == q*B + r); + __VERIFIER_assert(d == B*p); + + if (!(p != 1)) break; + + d = d / 2; + p = p / 2; + if (r >= d) { + r = r - d; + q = q + p; + } + } + + __VERIFIER_assert(A == d*q + r); + __VERIFIER_assert(B == d); + return 0; +} diff --git a/c/nla-digbench-scaling/hard-ll_unwindbound10.yml b/c/nla-digbench-scaling/hard-ll_unwindbound10.yml new file mode 100644 index 00000000000..d1b7a1efc06 --- /dev/null +++ b/c/nla-digbench-scaling/hard-ll_unwindbound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'hard-ll_unwindbound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard-ll_unwindbound100.c b/c/nla-digbench-scaling/hard-ll_unwindbound100.c new file mode 100644 index 00000000000..3e1de01f0ff --- /dev/null +++ b/c/nla-digbench-scaling/hard-ll_unwindbound100.c @@ -0,0 +1,62 @@ +/* + hardware integer division program, by Manna + returns q==A//B + */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard-ll.c", 8, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + unsigned int A, B; + long long r, d, p, q; + A = __VERIFIER_nondet_unsigned_int(); + B = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(B >= 1); + + r = A; + d = B; + p = 1; + q = 0; + + while (counter++<100) { + __VERIFIER_assert(q == 0); + __VERIFIER_assert(r == A); + __VERIFIER_assert(d == B * p); + if (!(r >= d)) break; + + d = 2 * d; + p = 2 * p; + } + + while (counter++<100) { + __VERIFIER_assert(A == q*B + r); + __VERIFIER_assert(d == B*p); + + if (!(p != 1)) break; + + d = d / 2; + p = p / 2; + if (r >= d) { + r = r - d; + q = q + p; + } + } + + __VERIFIER_assert(A == d*q + r); + __VERIFIER_assert(B == d); + return 0; +} diff --git a/c/nla-digbench-scaling/hard-ll_unwindbound100.yml b/c/nla-digbench-scaling/hard-ll_unwindbound100.yml new file mode 100644 index 00000000000..41d2369be25 --- /dev/null +++ b/c/nla-digbench-scaling/hard-ll_unwindbound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'hard-ll_unwindbound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard-ll_unwindbound2.c b/c/nla-digbench-scaling/hard-ll_unwindbound2.c new file mode 100644 index 00000000000..a45b861840f --- /dev/null +++ b/c/nla-digbench-scaling/hard-ll_unwindbound2.c @@ -0,0 +1,62 @@ +/* + hardware integer division program, by Manna + returns q==A//B + */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard-ll.c", 8, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + unsigned int A, B; + long long r, d, p, q; + A = __VERIFIER_nondet_unsigned_int(); + B = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(B >= 1); + + r = A; + d = B; + p = 1; + q = 0; + + while (counter++<2) { + __VERIFIER_assert(q == 0); + __VERIFIER_assert(r == A); + __VERIFIER_assert(d == B * p); + if (!(r >= d)) break; + + d = 2 * d; + p = 2 * p; + } + + while (counter++<2) { + __VERIFIER_assert(A == q*B + r); + __VERIFIER_assert(d == B*p); + + if (!(p != 1)) break; + + d = d / 2; + p = p / 2; + if (r >= d) { + r = r - d; + q = q + p; + } + } + + __VERIFIER_assert(A == d*q + r); + __VERIFIER_assert(B == d); + return 0; +} diff --git a/c/nla-digbench-scaling/hard-ll_unwindbound2.yml b/c/nla-digbench-scaling/hard-ll_unwindbound2.yml new file mode 100644 index 00000000000..da479d61f91 --- /dev/null +++ b/c/nla-digbench-scaling/hard-ll_unwindbound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'hard-ll_unwindbound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard-ll_unwindbound20.c b/c/nla-digbench-scaling/hard-ll_unwindbound20.c new file mode 100644 index 00000000000..dd0cd9b8784 --- /dev/null +++ b/c/nla-digbench-scaling/hard-ll_unwindbound20.c @@ -0,0 +1,62 @@ +/* + hardware integer division program, by Manna + returns q==A//B + */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard-ll.c", 8, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + unsigned int A, B; + long long r, d, p, q; + A = __VERIFIER_nondet_unsigned_int(); + B = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(B >= 1); + + r = A; + d = B; + p = 1; + q = 0; + + while (counter++<20) { + __VERIFIER_assert(q == 0); + __VERIFIER_assert(r == A); + __VERIFIER_assert(d == B * p); + if (!(r >= d)) break; + + d = 2 * d; + p = 2 * p; + } + + while (counter++<20) { + __VERIFIER_assert(A == q*B + r); + __VERIFIER_assert(d == B*p); + + if (!(p != 1)) break; + + d = d / 2; + p = p / 2; + if (r >= d) { + r = r - d; + q = q + p; + } + } + + __VERIFIER_assert(A == d*q + r); + __VERIFIER_assert(B == d); + return 0; +} diff --git a/c/nla-digbench-scaling/hard-ll_unwindbound20.yml b/c/nla-digbench-scaling/hard-ll_unwindbound20.yml new file mode 100644 index 00000000000..9db61800479 --- /dev/null +++ b/c/nla-digbench-scaling/hard-ll_unwindbound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'hard-ll_unwindbound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard-ll_unwindbound5.c b/c/nla-digbench-scaling/hard-ll_unwindbound5.c new file mode 100644 index 00000000000..609df63ba95 --- /dev/null +++ b/c/nla-digbench-scaling/hard-ll_unwindbound5.c @@ -0,0 +1,62 @@ +/* + hardware integer division program, by Manna + returns q==A//B + */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard-ll.c", 8, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + unsigned int A, B; + long long r, d, p, q; + A = __VERIFIER_nondet_unsigned_int(); + B = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(B >= 1); + + r = A; + d = B; + p = 1; + q = 0; + + while (counter++<5) { + __VERIFIER_assert(q == 0); + __VERIFIER_assert(r == A); + __VERIFIER_assert(d == B * p); + if (!(r >= d)) break; + + d = 2 * d; + p = 2 * p; + } + + while (counter++<5) { + __VERIFIER_assert(A == q*B + r); + __VERIFIER_assert(d == B*p); + + if (!(p != 1)) break; + + d = d / 2; + p = p / 2; + if (r >= d) { + r = r - d; + q = q + p; + } + } + + __VERIFIER_assert(A == d*q + r); + __VERIFIER_assert(B == d); + return 0; +} diff --git a/c/nla-digbench-scaling/hard-ll_unwindbound5.yml b/c/nla-digbench-scaling/hard-ll_unwindbound5.yml new file mode 100644 index 00000000000..9593c147e03 --- /dev/null +++ b/c/nla-digbench-scaling/hard-ll_unwindbound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'hard-ll_unwindbound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard-ll_unwindbound50.c b/c/nla-digbench-scaling/hard-ll_unwindbound50.c new file mode 100644 index 00000000000..9cc7edadc77 --- /dev/null +++ b/c/nla-digbench-scaling/hard-ll_unwindbound50.c @@ -0,0 +1,62 @@ +/* + hardware integer division program, by Manna + returns q==A//B + */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard-ll.c", 8, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + unsigned int A, B; + long long r, d, p, q; + A = __VERIFIER_nondet_unsigned_int(); + B = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(B >= 1); + + r = A; + d = B; + p = 1; + q = 0; + + while (counter++<50) { + __VERIFIER_assert(q == 0); + __VERIFIER_assert(r == A); + __VERIFIER_assert(d == B * p); + if (!(r >= d)) break; + + d = 2 * d; + p = 2 * p; + } + + while (counter++<50) { + __VERIFIER_assert(A == q*B + r); + __VERIFIER_assert(d == B*p); + + if (!(p != 1)) break; + + d = d / 2; + p = p / 2; + if (r >= d) { + r = r - d; + q = q + p; + } + } + + __VERIFIER_assert(A == d*q + r); + __VERIFIER_assert(B == d); + return 0; +} diff --git a/c/nla-digbench-scaling/hard-ll_unwindbound50.yml b/c/nla-digbench-scaling/hard-ll_unwindbound50.yml new file mode 100644 index 00000000000..5a8cdbc2e97 --- /dev/null +++ b/c/nla-digbench-scaling/hard-ll_unwindbound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'hard-ll_unwindbound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard-ll_valuebound1.c b/c/nla-digbench-scaling/hard-ll_valuebound1.c new file mode 100644 index 00000000000..6f39bec89a9 --- /dev/null +++ b/c/nla-digbench-scaling/hard-ll_valuebound1.c @@ -0,0 +1,63 @@ +/* + hardware integer division program, by Manna + returns q==A//B + */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard-ll.c", 8, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + unsigned int A, B; + long long r, d, p, q; + A = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(A>=0 && A<=1); + B = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(B>=0 && B<=1); + assume_abort_if_not(B >= 1); + + r = A; + d = B; + p = 1; + q = 0; + + while (1) { + __VERIFIER_assert(q == 0); + __VERIFIER_assert(r == A); + __VERIFIER_assert(d == B * p); + if (!(r >= d)) break; + + d = 2 * d; + p = 2 * p; + } + + while (1) { + __VERIFIER_assert(A == q*B + r); + __VERIFIER_assert(d == B*p); + + if (!(p != 1)) break; + + d = d / 2; + p = p / 2; + if (r >= d) { + r = r - d; + q = q + p; + } + } + + __VERIFIER_assert(A == d*q + r); + __VERIFIER_assert(B == d); + return 0; +} diff --git a/c/nla-digbench-scaling/hard-ll_valuebound1.yml b/c/nla-digbench-scaling/hard-ll_valuebound1.yml new file mode 100644 index 00000000000..2e254737c82 --- /dev/null +++ b/c/nla-digbench-scaling/hard-ll_valuebound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'hard-ll_valuebound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard-ll_valuebound10.c b/c/nla-digbench-scaling/hard-ll_valuebound10.c new file mode 100644 index 00000000000..fd886a8fa50 --- /dev/null +++ b/c/nla-digbench-scaling/hard-ll_valuebound10.c @@ -0,0 +1,63 @@ +/* + hardware integer division program, by Manna + returns q==A//B + */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard-ll.c", 8, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + unsigned int A, B; + long long r, d, p, q; + A = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(A>=0 && A<=10); + B = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(B>=0 && B<=10); + assume_abort_if_not(B >= 1); + + r = A; + d = B; + p = 1; + q = 0; + + while (1) { + __VERIFIER_assert(q == 0); + __VERIFIER_assert(r == A); + __VERIFIER_assert(d == B * p); + if (!(r >= d)) break; + + d = 2 * d; + p = 2 * p; + } + + while (1) { + __VERIFIER_assert(A == q*B + r); + __VERIFIER_assert(d == B*p); + + if (!(p != 1)) break; + + d = d / 2; + p = p / 2; + if (r >= d) { + r = r - d; + q = q + p; + } + } + + __VERIFIER_assert(A == d*q + r); + __VERIFIER_assert(B == d); + return 0; +} diff --git a/c/nla-digbench-scaling/hard-ll_valuebound10.yml b/c/nla-digbench-scaling/hard-ll_valuebound10.yml new file mode 100644 index 00000000000..7bbd9773fc0 --- /dev/null +++ b/c/nla-digbench-scaling/hard-ll_valuebound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'hard-ll_valuebound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard-ll_valuebound100.c b/c/nla-digbench-scaling/hard-ll_valuebound100.c new file mode 100644 index 00000000000..52ac57b13fc --- /dev/null +++ b/c/nla-digbench-scaling/hard-ll_valuebound100.c @@ -0,0 +1,63 @@ +/* + hardware integer division program, by Manna + returns q==A//B + */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard-ll.c", 8, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + unsigned int A, B; + long long r, d, p, q; + A = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(A>=0 && A<=100); + B = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(B>=0 && B<=100); + assume_abort_if_not(B >= 1); + + r = A; + d = B; + p = 1; + q = 0; + + while (1) { + __VERIFIER_assert(q == 0); + __VERIFIER_assert(r == A); + __VERIFIER_assert(d == B * p); + if (!(r >= d)) break; + + d = 2 * d; + p = 2 * p; + } + + while (1) { + __VERIFIER_assert(A == q*B + r); + __VERIFIER_assert(d == B*p); + + if (!(p != 1)) break; + + d = d / 2; + p = p / 2; + if (r >= d) { + r = r - d; + q = q + p; + } + } + + __VERIFIER_assert(A == d*q + r); + __VERIFIER_assert(B == d); + return 0; +} diff --git a/c/nla-digbench-scaling/hard-ll_valuebound100.yml b/c/nla-digbench-scaling/hard-ll_valuebound100.yml new file mode 100644 index 00000000000..6b966bd3e8d --- /dev/null +++ b/c/nla-digbench-scaling/hard-ll_valuebound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'hard-ll_valuebound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard-ll_valuebound2.c b/c/nla-digbench-scaling/hard-ll_valuebound2.c new file mode 100644 index 00000000000..802280d2843 --- /dev/null +++ b/c/nla-digbench-scaling/hard-ll_valuebound2.c @@ -0,0 +1,63 @@ +/* + hardware integer division program, by Manna + returns q==A//B + */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard-ll.c", 8, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + unsigned int A, B; + long long r, d, p, q; + A = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(A>=0 && A<=2); + B = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(B>=0 && B<=2); + assume_abort_if_not(B >= 1); + + r = A; + d = B; + p = 1; + q = 0; + + while (1) { + __VERIFIER_assert(q == 0); + __VERIFIER_assert(r == A); + __VERIFIER_assert(d == B * p); + if (!(r >= d)) break; + + d = 2 * d; + p = 2 * p; + } + + while (1) { + __VERIFIER_assert(A == q*B + r); + __VERIFIER_assert(d == B*p); + + if (!(p != 1)) break; + + d = d / 2; + p = p / 2; + if (r >= d) { + r = r - d; + q = q + p; + } + } + + __VERIFIER_assert(A == d*q + r); + __VERIFIER_assert(B == d); + return 0; +} diff --git a/c/nla-digbench-scaling/hard-ll_valuebound2.yml b/c/nla-digbench-scaling/hard-ll_valuebound2.yml new file mode 100644 index 00000000000..d9463b347c2 --- /dev/null +++ b/c/nla-digbench-scaling/hard-ll_valuebound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'hard-ll_valuebound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard-ll_valuebound20.c b/c/nla-digbench-scaling/hard-ll_valuebound20.c new file mode 100644 index 00000000000..ec6c2839a8a --- /dev/null +++ b/c/nla-digbench-scaling/hard-ll_valuebound20.c @@ -0,0 +1,63 @@ +/* + hardware integer division program, by Manna + returns q==A//B + */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard-ll.c", 8, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + unsigned int A, B; + long long r, d, p, q; + A = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(A>=0 && A<=20); + B = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(B>=0 && B<=20); + assume_abort_if_not(B >= 1); + + r = A; + d = B; + p = 1; + q = 0; + + while (1) { + __VERIFIER_assert(q == 0); + __VERIFIER_assert(r == A); + __VERIFIER_assert(d == B * p); + if (!(r >= d)) break; + + d = 2 * d; + p = 2 * p; + } + + while (1) { + __VERIFIER_assert(A == q*B + r); + __VERIFIER_assert(d == B*p); + + if (!(p != 1)) break; + + d = d / 2; + p = p / 2; + if (r >= d) { + r = r - d; + q = q + p; + } + } + + __VERIFIER_assert(A == d*q + r); + __VERIFIER_assert(B == d); + return 0; +} diff --git a/c/nla-digbench-scaling/hard-ll_valuebound20.yml b/c/nla-digbench-scaling/hard-ll_valuebound20.yml new file mode 100644 index 00000000000..744c4dcae95 --- /dev/null +++ b/c/nla-digbench-scaling/hard-ll_valuebound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'hard-ll_valuebound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard-ll_valuebound5.c b/c/nla-digbench-scaling/hard-ll_valuebound5.c new file mode 100644 index 00000000000..715fbb638f2 --- /dev/null +++ b/c/nla-digbench-scaling/hard-ll_valuebound5.c @@ -0,0 +1,63 @@ +/* + hardware integer division program, by Manna + returns q==A//B + */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard-ll.c", 8, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + unsigned int A, B; + long long r, d, p, q; + A = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(A>=0 && A<=5); + B = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(B>=0 && B<=5); + assume_abort_if_not(B >= 1); + + r = A; + d = B; + p = 1; + q = 0; + + while (1) { + __VERIFIER_assert(q == 0); + __VERIFIER_assert(r == A); + __VERIFIER_assert(d == B * p); + if (!(r >= d)) break; + + d = 2 * d; + p = 2 * p; + } + + while (1) { + __VERIFIER_assert(A == q*B + r); + __VERIFIER_assert(d == B*p); + + if (!(p != 1)) break; + + d = d / 2; + p = p / 2; + if (r >= d) { + r = r - d; + q = q + p; + } + } + + __VERIFIER_assert(A == d*q + r); + __VERIFIER_assert(B == d); + return 0; +} diff --git a/c/nla-digbench-scaling/hard-ll_valuebound5.yml b/c/nla-digbench-scaling/hard-ll_valuebound5.yml new file mode 100644 index 00000000000..f7878fa7804 --- /dev/null +++ b/c/nla-digbench-scaling/hard-ll_valuebound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'hard-ll_valuebound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard-ll_valuebound50.c b/c/nla-digbench-scaling/hard-ll_valuebound50.c new file mode 100644 index 00000000000..88dd7b9f067 --- /dev/null +++ b/c/nla-digbench-scaling/hard-ll_valuebound50.c @@ -0,0 +1,63 @@ +/* + hardware integer division program, by Manna + returns q==A//B + */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard-ll.c", 8, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + unsigned int A, B; + long long r, d, p, q; + A = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(A>=0 && A<=50); + B = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(B>=0 && B<=50); + assume_abort_if_not(B >= 1); + + r = A; + d = B; + p = 1; + q = 0; + + while (1) { + __VERIFIER_assert(q == 0); + __VERIFIER_assert(r == A); + __VERIFIER_assert(d == B * p); + if (!(r >= d)) break; + + d = 2 * d; + p = 2 * p; + } + + while (1) { + __VERIFIER_assert(A == q*B + r); + __VERIFIER_assert(d == B*p); + + if (!(p != 1)) break; + + d = d / 2; + p = p / 2; + if (r >= d) { + r = r - d; + q = q + p; + } + } + + __VERIFIER_assert(A == d*q + r); + __VERIFIER_assert(B == d); + return 0; +} diff --git a/c/nla-digbench-scaling/hard-ll_valuebound50.yml b/c/nla-digbench-scaling/hard-ll_valuebound50.yml new file mode 100644 index 00000000000..35707d29f07 --- /dev/null +++ b/c/nla-digbench-scaling/hard-ll_valuebound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'hard-ll_valuebound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard-u_unwindbound1.c b/c/nla-digbench-scaling/hard-u_unwindbound1.c new file mode 100644 index 00000000000..8de12b07f27 --- /dev/null +++ b/c/nla-digbench-scaling/hard-u_unwindbound1.c @@ -0,0 +1,62 @@ +/* + hardware integer division program, by Manna + returns q==A//B + */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard-u.c", 8, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + unsigned int A, B; + unsigned int r, d, p, q; + A = __VERIFIER_nondet_unsigned_int(); + B = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(B >= 1); + + r = A; + d = B; + p = 1; + q = 0; + + while (counter++<1) { + __VERIFIER_assert(q == 0); + __VERIFIER_assert(r == A); + __VERIFIER_assert(d == B * p); + if (!(r >= d)) break; + + d = 2 * d; + p = 2 * p; + } + + while (counter++<1) { + __VERIFIER_assert(A == q*B + r); + __VERIFIER_assert(d == B*p); + + if (!(p != 1)) break; + + d = d / 2; + p = p / 2; + if (r >= d) { + r = r - d; + q = q + p; + } + } + + __VERIFIER_assert(A == d*q + r); + __VERIFIER_assert(B == d); + return 0; +} diff --git a/c/nla-digbench-scaling/hard-u_unwindbound1.yml b/c/nla-digbench-scaling/hard-u_unwindbound1.yml new file mode 100644 index 00000000000..110cba8ab9b --- /dev/null +++ b/c/nla-digbench-scaling/hard-u_unwindbound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'hard-u_unwindbound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard-u_unwindbound10.c b/c/nla-digbench-scaling/hard-u_unwindbound10.c new file mode 100644 index 00000000000..d189c025210 --- /dev/null +++ b/c/nla-digbench-scaling/hard-u_unwindbound10.c @@ -0,0 +1,62 @@ +/* + hardware integer division program, by Manna + returns q==A//B + */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard-u.c", 8, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + unsigned int A, B; + unsigned int r, d, p, q; + A = __VERIFIER_nondet_unsigned_int(); + B = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(B >= 1); + + r = A; + d = B; + p = 1; + q = 0; + + while (counter++<10) { + __VERIFIER_assert(q == 0); + __VERIFIER_assert(r == A); + __VERIFIER_assert(d == B * p); + if (!(r >= d)) break; + + d = 2 * d; + p = 2 * p; + } + + while (counter++<10) { + __VERIFIER_assert(A == q*B + r); + __VERIFIER_assert(d == B*p); + + if (!(p != 1)) break; + + d = d / 2; + p = p / 2; + if (r >= d) { + r = r - d; + q = q + p; + } + } + + __VERIFIER_assert(A == d*q + r); + __VERIFIER_assert(B == d); + return 0; +} diff --git a/c/nla-digbench-scaling/hard-u_unwindbound10.yml b/c/nla-digbench-scaling/hard-u_unwindbound10.yml new file mode 100644 index 00000000000..e355dc2926c --- /dev/null +++ b/c/nla-digbench-scaling/hard-u_unwindbound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'hard-u_unwindbound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard-u_unwindbound100.c b/c/nla-digbench-scaling/hard-u_unwindbound100.c new file mode 100644 index 00000000000..6bb18abda09 --- /dev/null +++ b/c/nla-digbench-scaling/hard-u_unwindbound100.c @@ -0,0 +1,62 @@ +/* + hardware integer division program, by Manna + returns q==A//B + */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard-u.c", 8, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + unsigned int A, B; + unsigned int r, d, p, q; + A = __VERIFIER_nondet_unsigned_int(); + B = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(B >= 1); + + r = A; + d = B; + p = 1; + q = 0; + + while (counter++<100) { + __VERIFIER_assert(q == 0); + __VERIFIER_assert(r == A); + __VERIFIER_assert(d == B * p); + if (!(r >= d)) break; + + d = 2 * d; + p = 2 * p; + } + + while (counter++<100) { + __VERIFIER_assert(A == q*B + r); + __VERIFIER_assert(d == B*p); + + if (!(p != 1)) break; + + d = d / 2; + p = p / 2; + if (r >= d) { + r = r - d; + q = q + p; + } + } + + __VERIFIER_assert(A == d*q + r); + __VERIFIER_assert(B == d); + return 0; +} diff --git a/c/nla-digbench-scaling/hard-u_unwindbound100.yml b/c/nla-digbench-scaling/hard-u_unwindbound100.yml new file mode 100644 index 00000000000..ff06afa2dfa --- /dev/null +++ b/c/nla-digbench-scaling/hard-u_unwindbound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'hard-u_unwindbound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard-u_unwindbound2.c b/c/nla-digbench-scaling/hard-u_unwindbound2.c new file mode 100644 index 00000000000..9d99415d5b6 --- /dev/null +++ b/c/nla-digbench-scaling/hard-u_unwindbound2.c @@ -0,0 +1,62 @@ +/* + hardware integer division program, by Manna + returns q==A//B + */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard-u.c", 8, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + unsigned int A, B; + unsigned int r, d, p, q; + A = __VERIFIER_nondet_unsigned_int(); + B = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(B >= 1); + + r = A; + d = B; + p = 1; + q = 0; + + while (counter++<2) { + __VERIFIER_assert(q == 0); + __VERIFIER_assert(r == A); + __VERIFIER_assert(d == B * p); + if (!(r >= d)) break; + + d = 2 * d; + p = 2 * p; + } + + while (counter++<2) { + __VERIFIER_assert(A == q*B + r); + __VERIFIER_assert(d == B*p); + + if (!(p != 1)) break; + + d = d / 2; + p = p / 2; + if (r >= d) { + r = r - d; + q = q + p; + } + } + + __VERIFIER_assert(A == d*q + r); + __VERIFIER_assert(B == d); + return 0; +} diff --git a/c/nla-digbench-scaling/hard-u_unwindbound2.yml b/c/nla-digbench-scaling/hard-u_unwindbound2.yml new file mode 100644 index 00000000000..a0e48faa2e8 --- /dev/null +++ b/c/nla-digbench-scaling/hard-u_unwindbound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'hard-u_unwindbound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard-u_unwindbound20.c b/c/nla-digbench-scaling/hard-u_unwindbound20.c new file mode 100644 index 00000000000..32a0f2361aa --- /dev/null +++ b/c/nla-digbench-scaling/hard-u_unwindbound20.c @@ -0,0 +1,62 @@ +/* + hardware integer division program, by Manna + returns q==A//B + */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard-u.c", 8, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + unsigned int A, B; + unsigned int r, d, p, q; + A = __VERIFIER_nondet_unsigned_int(); + B = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(B >= 1); + + r = A; + d = B; + p = 1; + q = 0; + + while (counter++<20) { + __VERIFIER_assert(q == 0); + __VERIFIER_assert(r == A); + __VERIFIER_assert(d == B * p); + if (!(r >= d)) break; + + d = 2 * d; + p = 2 * p; + } + + while (counter++<20) { + __VERIFIER_assert(A == q*B + r); + __VERIFIER_assert(d == B*p); + + if (!(p != 1)) break; + + d = d / 2; + p = p / 2; + if (r >= d) { + r = r - d; + q = q + p; + } + } + + __VERIFIER_assert(A == d*q + r); + __VERIFIER_assert(B == d); + return 0; +} diff --git a/c/nla-digbench-scaling/hard-u_unwindbound20.yml b/c/nla-digbench-scaling/hard-u_unwindbound20.yml new file mode 100644 index 00000000000..dee6fca34e2 --- /dev/null +++ b/c/nla-digbench-scaling/hard-u_unwindbound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'hard-u_unwindbound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard-u_unwindbound5.c b/c/nla-digbench-scaling/hard-u_unwindbound5.c new file mode 100644 index 00000000000..bfe010802d9 --- /dev/null +++ b/c/nla-digbench-scaling/hard-u_unwindbound5.c @@ -0,0 +1,62 @@ +/* + hardware integer division program, by Manna + returns q==A//B + */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard-u.c", 8, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + unsigned int A, B; + unsigned int r, d, p, q; + A = __VERIFIER_nondet_unsigned_int(); + B = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(B >= 1); + + r = A; + d = B; + p = 1; + q = 0; + + while (counter++<5) { + __VERIFIER_assert(q == 0); + __VERIFIER_assert(r == A); + __VERIFIER_assert(d == B * p); + if (!(r >= d)) break; + + d = 2 * d; + p = 2 * p; + } + + while (counter++<5) { + __VERIFIER_assert(A == q*B + r); + __VERIFIER_assert(d == B*p); + + if (!(p != 1)) break; + + d = d / 2; + p = p / 2; + if (r >= d) { + r = r - d; + q = q + p; + } + } + + __VERIFIER_assert(A == d*q + r); + __VERIFIER_assert(B == d); + return 0; +} diff --git a/c/nla-digbench-scaling/hard-u_unwindbound5.yml b/c/nla-digbench-scaling/hard-u_unwindbound5.yml new file mode 100644 index 00000000000..03d36fb8082 --- /dev/null +++ b/c/nla-digbench-scaling/hard-u_unwindbound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'hard-u_unwindbound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard-u_unwindbound50.c b/c/nla-digbench-scaling/hard-u_unwindbound50.c new file mode 100644 index 00000000000..d87118b8f77 --- /dev/null +++ b/c/nla-digbench-scaling/hard-u_unwindbound50.c @@ -0,0 +1,62 @@ +/* + hardware integer division program, by Manna + returns q==A//B + */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard-u.c", 8, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + unsigned int A, B; + unsigned int r, d, p, q; + A = __VERIFIER_nondet_unsigned_int(); + B = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(B >= 1); + + r = A; + d = B; + p = 1; + q = 0; + + while (counter++<50) { + __VERIFIER_assert(q == 0); + __VERIFIER_assert(r == A); + __VERIFIER_assert(d == B * p); + if (!(r >= d)) break; + + d = 2 * d; + p = 2 * p; + } + + while (counter++<50) { + __VERIFIER_assert(A == q*B + r); + __VERIFIER_assert(d == B*p); + + if (!(p != 1)) break; + + d = d / 2; + p = p / 2; + if (r >= d) { + r = r - d; + q = q + p; + } + } + + __VERIFIER_assert(A == d*q + r); + __VERIFIER_assert(B == d); + return 0; +} diff --git a/c/nla-digbench-scaling/hard-u_unwindbound50.yml b/c/nla-digbench-scaling/hard-u_unwindbound50.yml new file mode 100644 index 00000000000..d3804ad16b8 --- /dev/null +++ b/c/nla-digbench-scaling/hard-u_unwindbound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'hard-u_unwindbound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard-u_valuebound1.c b/c/nla-digbench-scaling/hard-u_valuebound1.c new file mode 100644 index 00000000000..8731cb69bad --- /dev/null +++ b/c/nla-digbench-scaling/hard-u_valuebound1.c @@ -0,0 +1,63 @@ +/* + hardware integer division program, by Manna + returns q==A//B + */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard-u.c", 8, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + unsigned int A, B; + unsigned int r, d, p, q; + A = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(A>=0 && A<=1); + B = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(B>=0 && B<=1); + assume_abort_if_not(B >= 1); + + r = A; + d = B; + p = 1; + q = 0; + + while (1) { + __VERIFIER_assert(q == 0); + __VERIFIER_assert(r == A); + __VERIFIER_assert(d == B * p); + if (!(r >= d)) break; + + d = 2 * d; + p = 2 * p; + } + + while (1) { + __VERIFIER_assert(A == q*B + r); + __VERIFIER_assert(d == B*p); + + if (!(p != 1)) break; + + d = d / 2; + p = p / 2; + if (r >= d) { + r = r - d; + q = q + p; + } + } + + __VERIFIER_assert(A == d*q + r); + __VERIFIER_assert(B == d); + return 0; +} diff --git a/c/nla-digbench-scaling/hard-u_valuebound1.yml b/c/nla-digbench-scaling/hard-u_valuebound1.yml new file mode 100644 index 00000000000..2c3e270b206 --- /dev/null +++ b/c/nla-digbench-scaling/hard-u_valuebound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'hard-u_valuebound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard-u_valuebound10.c b/c/nla-digbench-scaling/hard-u_valuebound10.c new file mode 100644 index 00000000000..72f08fed8f7 --- /dev/null +++ b/c/nla-digbench-scaling/hard-u_valuebound10.c @@ -0,0 +1,63 @@ +/* + hardware integer division program, by Manna + returns q==A//B + */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard-u.c", 8, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + unsigned int A, B; + unsigned int r, d, p, q; + A = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(A>=0 && A<=10); + B = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(B>=0 && B<=10); + assume_abort_if_not(B >= 1); + + r = A; + d = B; + p = 1; + q = 0; + + while (1) { + __VERIFIER_assert(q == 0); + __VERIFIER_assert(r == A); + __VERIFIER_assert(d == B * p); + if (!(r >= d)) break; + + d = 2 * d; + p = 2 * p; + } + + while (1) { + __VERIFIER_assert(A == q*B + r); + __VERIFIER_assert(d == B*p); + + if (!(p != 1)) break; + + d = d / 2; + p = p / 2; + if (r >= d) { + r = r - d; + q = q + p; + } + } + + __VERIFIER_assert(A == d*q + r); + __VERIFIER_assert(B == d); + return 0; +} diff --git a/c/nla-digbench-scaling/hard-u_valuebound10.yml b/c/nla-digbench-scaling/hard-u_valuebound10.yml new file mode 100644 index 00000000000..27529acf319 --- /dev/null +++ b/c/nla-digbench-scaling/hard-u_valuebound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'hard-u_valuebound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard-u_valuebound100.c b/c/nla-digbench-scaling/hard-u_valuebound100.c new file mode 100644 index 00000000000..6c4b212cead --- /dev/null +++ b/c/nla-digbench-scaling/hard-u_valuebound100.c @@ -0,0 +1,63 @@ +/* + hardware integer division program, by Manna + returns q==A//B + */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard-u.c", 8, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + unsigned int A, B; + unsigned int r, d, p, q; + A = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(A>=0 && A<=100); + B = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(B>=0 && B<=100); + assume_abort_if_not(B >= 1); + + r = A; + d = B; + p = 1; + q = 0; + + while (1) { + __VERIFIER_assert(q == 0); + __VERIFIER_assert(r == A); + __VERIFIER_assert(d == B * p); + if (!(r >= d)) break; + + d = 2 * d; + p = 2 * p; + } + + while (1) { + __VERIFIER_assert(A == q*B + r); + __VERIFIER_assert(d == B*p); + + if (!(p != 1)) break; + + d = d / 2; + p = p / 2; + if (r >= d) { + r = r - d; + q = q + p; + } + } + + __VERIFIER_assert(A == d*q + r); + __VERIFIER_assert(B == d); + return 0; +} diff --git a/c/nla-digbench-scaling/hard-u_valuebound100.yml b/c/nla-digbench-scaling/hard-u_valuebound100.yml new file mode 100644 index 00000000000..a5d5830381a --- /dev/null +++ b/c/nla-digbench-scaling/hard-u_valuebound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'hard-u_valuebound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard-u_valuebound2.c b/c/nla-digbench-scaling/hard-u_valuebound2.c new file mode 100644 index 00000000000..201c4299558 --- /dev/null +++ b/c/nla-digbench-scaling/hard-u_valuebound2.c @@ -0,0 +1,63 @@ +/* + hardware integer division program, by Manna + returns q==A//B + */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard-u.c", 8, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + unsigned int A, B; + unsigned int r, d, p, q; + A = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(A>=0 && A<=2); + B = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(B>=0 && B<=2); + assume_abort_if_not(B >= 1); + + r = A; + d = B; + p = 1; + q = 0; + + while (1) { + __VERIFIER_assert(q == 0); + __VERIFIER_assert(r == A); + __VERIFIER_assert(d == B * p); + if (!(r >= d)) break; + + d = 2 * d; + p = 2 * p; + } + + while (1) { + __VERIFIER_assert(A == q*B + r); + __VERIFIER_assert(d == B*p); + + if (!(p != 1)) break; + + d = d / 2; + p = p / 2; + if (r >= d) { + r = r - d; + q = q + p; + } + } + + __VERIFIER_assert(A == d*q + r); + __VERIFIER_assert(B == d); + return 0; +} diff --git a/c/nla-digbench-scaling/hard-u_valuebound2.yml b/c/nla-digbench-scaling/hard-u_valuebound2.yml new file mode 100644 index 00000000000..d62db984457 --- /dev/null +++ b/c/nla-digbench-scaling/hard-u_valuebound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'hard-u_valuebound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard-u_valuebound20.c b/c/nla-digbench-scaling/hard-u_valuebound20.c new file mode 100644 index 00000000000..262db2f82ac --- /dev/null +++ b/c/nla-digbench-scaling/hard-u_valuebound20.c @@ -0,0 +1,63 @@ +/* + hardware integer division program, by Manna + returns q==A//B + */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard-u.c", 8, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + unsigned int A, B; + unsigned int r, d, p, q; + A = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(A>=0 && A<=20); + B = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(B>=0 && B<=20); + assume_abort_if_not(B >= 1); + + r = A; + d = B; + p = 1; + q = 0; + + while (1) { + __VERIFIER_assert(q == 0); + __VERIFIER_assert(r == A); + __VERIFIER_assert(d == B * p); + if (!(r >= d)) break; + + d = 2 * d; + p = 2 * p; + } + + while (1) { + __VERIFIER_assert(A == q*B + r); + __VERIFIER_assert(d == B*p); + + if (!(p != 1)) break; + + d = d / 2; + p = p / 2; + if (r >= d) { + r = r - d; + q = q + p; + } + } + + __VERIFIER_assert(A == d*q + r); + __VERIFIER_assert(B == d); + return 0; +} diff --git a/c/nla-digbench-scaling/hard-u_valuebound20.yml b/c/nla-digbench-scaling/hard-u_valuebound20.yml new file mode 100644 index 00000000000..6fd48205108 --- /dev/null +++ b/c/nla-digbench-scaling/hard-u_valuebound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'hard-u_valuebound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard-u_valuebound5.c b/c/nla-digbench-scaling/hard-u_valuebound5.c new file mode 100644 index 00000000000..f2f977ae589 --- /dev/null +++ b/c/nla-digbench-scaling/hard-u_valuebound5.c @@ -0,0 +1,63 @@ +/* + hardware integer division program, by Manna + returns q==A//B + */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard-u.c", 8, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + unsigned int A, B; + unsigned int r, d, p, q; + A = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(A>=0 && A<=5); + B = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(B>=0 && B<=5); + assume_abort_if_not(B >= 1); + + r = A; + d = B; + p = 1; + q = 0; + + while (1) { + __VERIFIER_assert(q == 0); + __VERIFIER_assert(r == A); + __VERIFIER_assert(d == B * p); + if (!(r >= d)) break; + + d = 2 * d; + p = 2 * p; + } + + while (1) { + __VERIFIER_assert(A == q*B + r); + __VERIFIER_assert(d == B*p); + + if (!(p != 1)) break; + + d = d / 2; + p = p / 2; + if (r >= d) { + r = r - d; + q = q + p; + } + } + + __VERIFIER_assert(A == d*q + r); + __VERIFIER_assert(B == d); + return 0; +} diff --git a/c/nla-digbench-scaling/hard-u_valuebound5.yml b/c/nla-digbench-scaling/hard-u_valuebound5.yml new file mode 100644 index 00000000000..f9973a8d1c5 --- /dev/null +++ b/c/nla-digbench-scaling/hard-u_valuebound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'hard-u_valuebound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard-u_valuebound50.c b/c/nla-digbench-scaling/hard-u_valuebound50.c new file mode 100644 index 00000000000..b895d6dd529 --- /dev/null +++ b/c/nla-digbench-scaling/hard-u_valuebound50.c @@ -0,0 +1,63 @@ +/* + hardware integer division program, by Manna + returns q==A//B + */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard-u.c", 8, "reach_error"); } +extern unsigned int __VERIFIER_nondet_unsigned_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + unsigned int A, B; + unsigned int r, d, p, q; + A = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(A>=0 && A<=50); + B = __VERIFIER_nondet_unsigned_int(); + assume_abort_if_not(B>=0 && B<=50); + assume_abort_if_not(B >= 1); + + r = A; + d = B; + p = 1; + q = 0; + + while (1) { + __VERIFIER_assert(q == 0); + __VERIFIER_assert(r == A); + __VERIFIER_assert(d == B * p); + if (!(r >= d)) break; + + d = 2 * d; + p = 2 * p; + } + + while (1) { + __VERIFIER_assert(A == q*B + r); + __VERIFIER_assert(d == B*p); + + if (!(p != 1)) break; + + d = d / 2; + p = p / 2; + if (r >= d) { + r = r - d; + q = q + p; + } + } + + __VERIFIER_assert(A == d*q + r); + __VERIFIER_assert(B == d); + return 0; +} diff --git a/c/nla-digbench-scaling/hard-u_valuebound50.yml b/c/nla-digbench-scaling/hard-u_valuebound50.yml new file mode 100644 index 00000000000..dc47070750a --- /dev/null +++ b/c/nla-digbench-scaling/hard-u_valuebound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'hard-u_valuebound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard2_unwindbound1.c b/c/nla-digbench-scaling/hard2_unwindbound1.c index b3ca0494030..06429ef9c93 100644 --- a/c/nla-digbench-scaling/hard2_unwindbound1.c +++ b/c/nla-digbench-scaling/hard2_unwindbound1.c @@ -4,7 +4,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard2.c", 8, "reach_error"); } extern int __VERIFIER_nondet_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/hard2_unwindbound1.yml b/c/nla-digbench-scaling/hard2_unwindbound1.yml index 2e82fa6f10b..5b97426803a 100644 --- a/c/nla-digbench-scaling/hard2_unwindbound1.yml +++ b/c/nla-digbench-scaling/hard2_unwindbound1.yml @@ -3,6 +3,8 @@ input_files: 'hard2_unwindbound1.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/hard2_unwindbound10.c b/c/nla-digbench-scaling/hard2_unwindbound10.c index 37d9e0146d0..918345c9c91 100644 --- a/c/nla-digbench-scaling/hard2_unwindbound10.c +++ b/c/nla-digbench-scaling/hard2_unwindbound10.c @@ -4,7 +4,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard2.c", 8, "reach_error"); } extern int __VERIFIER_nondet_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/hard2_unwindbound10.yml b/c/nla-digbench-scaling/hard2_unwindbound10.yml index 887c7f0488e..b7addd8c2f2 100644 --- a/c/nla-digbench-scaling/hard2_unwindbound10.yml +++ b/c/nla-digbench-scaling/hard2_unwindbound10.yml @@ -3,6 +3,8 @@ input_files: 'hard2_unwindbound10.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/hard2_unwindbound100.c b/c/nla-digbench-scaling/hard2_unwindbound100.c index 45ab4434242..5096aaf4d66 100644 --- a/c/nla-digbench-scaling/hard2_unwindbound100.c +++ b/c/nla-digbench-scaling/hard2_unwindbound100.c @@ -4,7 +4,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard2.c", 8, "reach_error"); } extern int __VERIFIER_nondet_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/hard2_unwindbound100.yml b/c/nla-digbench-scaling/hard2_unwindbound100.yml index 3ed0ea69bef..b0dd7540f75 100644 --- a/c/nla-digbench-scaling/hard2_unwindbound100.yml +++ b/c/nla-digbench-scaling/hard2_unwindbound100.yml @@ -3,6 +3,8 @@ input_files: 'hard2_unwindbound100.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/hard2_unwindbound2.c b/c/nla-digbench-scaling/hard2_unwindbound2.c index 62deb06a410..d23495c1193 100644 --- a/c/nla-digbench-scaling/hard2_unwindbound2.c +++ b/c/nla-digbench-scaling/hard2_unwindbound2.c @@ -4,7 +4,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard2.c", 8, "reach_error"); } extern int __VERIFIER_nondet_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/hard2_unwindbound2.yml b/c/nla-digbench-scaling/hard2_unwindbound2.yml index d7ba87c91e7..c6c3781e0ca 100644 --- a/c/nla-digbench-scaling/hard2_unwindbound2.yml +++ b/c/nla-digbench-scaling/hard2_unwindbound2.yml @@ -3,6 +3,8 @@ input_files: 'hard2_unwindbound2.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/hard2_unwindbound20.c b/c/nla-digbench-scaling/hard2_unwindbound20.c index d5e1864af34..c17ecb81d8b 100644 --- a/c/nla-digbench-scaling/hard2_unwindbound20.c +++ b/c/nla-digbench-scaling/hard2_unwindbound20.c @@ -4,7 +4,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard2.c", 8, "reach_error"); } extern int __VERIFIER_nondet_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/hard2_unwindbound20.yml b/c/nla-digbench-scaling/hard2_unwindbound20.yml index 186f847758e..e51b69e1c7e 100644 --- a/c/nla-digbench-scaling/hard2_unwindbound20.yml +++ b/c/nla-digbench-scaling/hard2_unwindbound20.yml @@ -3,6 +3,8 @@ input_files: 'hard2_unwindbound20.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/hard2_unwindbound5.c b/c/nla-digbench-scaling/hard2_unwindbound5.c index f3cbe4e89fb..feed640fc1e 100644 --- a/c/nla-digbench-scaling/hard2_unwindbound5.c +++ b/c/nla-digbench-scaling/hard2_unwindbound5.c @@ -4,7 +4,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard2.c", 8, "reach_error"); } extern int __VERIFIER_nondet_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/hard2_unwindbound5.yml b/c/nla-digbench-scaling/hard2_unwindbound5.yml index b5ca36b1342..e63f4653bf1 100644 --- a/c/nla-digbench-scaling/hard2_unwindbound5.yml +++ b/c/nla-digbench-scaling/hard2_unwindbound5.yml @@ -3,6 +3,8 @@ input_files: 'hard2_unwindbound5.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/hard2_unwindbound50.c b/c/nla-digbench-scaling/hard2_unwindbound50.c index 3f49d23900b..da9f931f518 100644 --- a/c/nla-digbench-scaling/hard2_unwindbound50.c +++ b/c/nla-digbench-scaling/hard2_unwindbound50.c @@ -4,7 +4,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard2.c", 8, "reach_error"); } extern int __VERIFIER_nondet_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/hard2_unwindbound50.yml b/c/nla-digbench-scaling/hard2_unwindbound50.yml index 7d5f7b96bb5..6afe1198f3b 100644 --- a/c/nla-digbench-scaling/hard2_unwindbound50.yml +++ b/c/nla-digbench-scaling/hard2_unwindbound50.yml @@ -3,6 +3,8 @@ input_files: 'hard2_unwindbound50.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/hard2_valuebound1.c b/c/nla-digbench-scaling/hard2_valuebound1.c index 9a6a128301e..02be17b64ce 100644 --- a/c/nla-digbench-scaling/hard2_valuebound1.c +++ b/c/nla-digbench-scaling/hard2_valuebound1.c @@ -4,7 +4,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard2.c", 8, "reach_error"); } extern int __VERIFIER_nondet_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -22,7 +23,7 @@ int main() { int A, B; int r, d, p, q; A = __VERIFIER_nondet_int(); - assume_abort_if_not(A>0 && A<=1); + assume_abort_if_not(A>=0 && A<=1); B = 1; r = A; diff --git a/c/nla-digbench-scaling/hard2_valuebound1.yml b/c/nla-digbench-scaling/hard2_valuebound1.yml index 8ef64066707..56da3a1d2ad 100644 --- a/c/nla-digbench-scaling/hard2_valuebound1.yml +++ b/c/nla-digbench-scaling/hard2_valuebound1.yml @@ -3,6 +3,8 @@ input_files: 'hard2_valuebound1.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/hard2_valuebound10.c b/c/nla-digbench-scaling/hard2_valuebound10.c index 9804c6f0325..ba3beb30088 100644 --- a/c/nla-digbench-scaling/hard2_valuebound10.c +++ b/c/nla-digbench-scaling/hard2_valuebound10.c @@ -4,7 +4,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard2.c", 8, "reach_error"); } extern int __VERIFIER_nondet_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -22,7 +23,7 @@ int main() { int A, B; int r, d, p, q; A = __VERIFIER_nondet_int(); - assume_abort_if_not(A>0 && A<=10); + assume_abort_if_not(A>=0 && A<=10); B = 1; r = A; diff --git a/c/nla-digbench-scaling/hard2_valuebound10.yml b/c/nla-digbench-scaling/hard2_valuebound10.yml index 03e94e55ff9..95f17eeac5f 100644 --- a/c/nla-digbench-scaling/hard2_valuebound10.yml +++ b/c/nla-digbench-scaling/hard2_valuebound10.yml @@ -3,6 +3,8 @@ input_files: 'hard2_valuebound10.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/hard2_valuebound100.c b/c/nla-digbench-scaling/hard2_valuebound100.c index 77233352069..ee7f9faebde 100644 --- a/c/nla-digbench-scaling/hard2_valuebound100.c +++ b/c/nla-digbench-scaling/hard2_valuebound100.c @@ -4,7 +4,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard2.c", 8, "reach_error"); } extern int __VERIFIER_nondet_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -22,7 +23,7 @@ int main() { int A, B; int r, d, p, q; A = __VERIFIER_nondet_int(); - assume_abort_if_not(A>0 && A<=100); + assume_abort_if_not(A>=0 && A<=100); B = 1; r = A; diff --git a/c/nla-digbench-scaling/hard2_valuebound100.yml b/c/nla-digbench-scaling/hard2_valuebound100.yml index 628af72a41f..f65dc6e1b62 100644 --- a/c/nla-digbench-scaling/hard2_valuebound100.yml +++ b/c/nla-digbench-scaling/hard2_valuebound100.yml @@ -3,6 +3,8 @@ input_files: 'hard2_valuebound100.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/hard2_valuebound2.c b/c/nla-digbench-scaling/hard2_valuebound2.c index 65925a8c64a..956a20f6346 100644 --- a/c/nla-digbench-scaling/hard2_valuebound2.c +++ b/c/nla-digbench-scaling/hard2_valuebound2.c @@ -4,7 +4,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard2.c", 8, "reach_error"); } extern int __VERIFIER_nondet_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -22,7 +23,7 @@ int main() { int A, B; int r, d, p, q; A = __VERIFIER_nondet_int(); - assume_abort_if_not(A>0 && A<=2); + assume_abort_if_not(A>=0 && A<=2); B = 1; r = A; diff --git a/c/nla-digbench-scaling/hard2_valuebound2.yml b/c/nla-digbench-scaling/hard2_valuebound2.yml index 55837d48c8c..64c1bf9721d 100644 --- a/c/nla-digbench-scaling/hard2_valuebound2.yml +++ b/c/nla-digbench-scaling/hard2_valuebound2.yml @@ -3,6 +3,8 @@ input_files: 'hard2_valuebound2.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/hard2_valuebound20.c b/c/nla-digbench-scaling/hard2_valuebound20.c index 287a74a98f5..df814fd376c 100644 --- a/c/nla-digbench-scaling/hard2_valuebound20.c +++ b/c/nla-digbench-scaling/hard2_valuebound20.c @@ -4,7 +4,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard2.c", 8, "reach_error"); } extern int __VERIFIER_nondet_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -22,7 +23,7 @@ int main() { int A, B; int r, d, p, q; A = __VERIFIER_nondet_int(); - assume_abort_if_not(A>0 && A<=20); + assume_abort_if_not(A>=0 && A<=20); B = 1; r = A; diff --git a/c/nla-digbench-scaling/hard2_valuebound20.yml b/c/nla-digbench-scaling/hard2_valuebound20.yml index 4341db74dd3..6f94302acfa 100644 --- a/c/nla-digbench-scaling/hard2_valuebound20.yml +++ b/c/nla-digbench-scaling/hard2_valuebound20.yml @@ -3,6 +3,8 @@ input_files: 'hard2_valuebound20.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/hard2_valuebound5.c b/c/nla-digbench-scaling/hard2_valuebound5.c index c674ff7f82a..63cb01fc7fc 100644 --- a/c/nla-digbench-scaling/hard2_valuebound5.c +++ b/c/nla-digbench-scaling/hard2_valuebound5.c @@ -4,7 +4,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard2.c", 8, "reach_error"); } extern int __VERIFIER_nondet_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -22,7 +23,7 @@ int main() { int A, B; int r, d, p, q; A = __VERIFIER_nondet_int(); - assume_abort_if_not(A>0 && A<=5); + assume_abort_if_not(A>=0 && A<=5); B = 1; r = A; diff --git a/c/nla-digbench-scaling/hard2_valuebound5.yml b/c/nla-digbench-scaling/hard2_valuebound5.yml index 1ab7777149f..5d3ab63f000 100644 --- a/c/nla-digbench-scaling/hard2_valuebound5.yml +++ b/c/nla-digbench-scaling/hard2_valuebound5.yml @@ -3,6 +3,8 @@ input_files: 'hard2_valuebound5.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/hard2_valuebound50.c b/c/nla-digbench-scaling/hard2_valuebound50.c index cfeaf147948..c8986288ed0 100644 --- a/c/nla-digbench-scaling/hard2_valuebound50.c +++ b/c/nla-digbench-scaling/hard2_valuebound50.c @@ -4,7 +4,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "hard2.c", 8, "reach_error"); } extern int __VERIFIER_nondet_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -22,7 +23,7 @@ int main() { int A, B; int r, d, p, q; A = __VERIFIER_nondet_int(); - assume_abort_if_not(A>0 && A<=50); + assume_abort_if_not(A>=0 && A<=50); B = 1; r = A; diff --git a/c/nla-digbench-scaling/hard2_valuebound50.yml b/c/nla-digbench-scaling/hard2_valuebound50.yml index 513e67a3d4b..29ab974fbac 100644 --- a/c/nla-digbench-scaling/hard2_valuebound50.yml +++ b/c/nla-digbench-scaling/hard2_valuebound50.yml @@ -3,6 +3,8 @@ input_files: 'hard2_valuebound50.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/hard_unwindbound1.c b/c/nla-digbench-scaling/hard_unwindbound1.c deleted file mode 100644 index 33eb403ef41..00000000000 --- a/c/nla-digbench-scaling/hard_unwindbound1.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - hardware integer division program, by Manna - returns q==A//B - */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int A, B; - int r, d, p, q; - A = __VERIFIER_nondet_int(); - B = __VERIFIER_nondet_int(); - assume_abort_if_not(B >= 1); - - r = A; - d = B; - p = 1; - q = 0; - - while (counter++<1) { - __VERIFIER_assert(q == 0); - __VERIFIER_assert(r == A); - __VERIFIER_assert(d == B * p); - if (!(r >= d)) break; - - d = 2 * d; - p = 2 * p; - } - - while (counter++<1) { - __VERIFIER_assert(A == q*B + r); - __VERIFIER_assert(d == B*p); - - if (!(p != 1)) break; - - d = d / 2; - p = p / 2; - if (r >= d) { - r = r - d; - q = q + p; - } - } - - __VERIFIER_assert(A == d*q + r); - __VERIFIER_assert(B == d); - return 0; -} diff --git a/c/nla-digbench-scaling/hard_unwindbound1.yml b/c/nla-digbench-scaling/hard_unwindbound1.yml deleted file mode 100644 index ccffd51027a..00000000000 --- a/c/nla-digbench-scaling/hard_unwindbound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'hard_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard_unwindbound10.c b/c/nla-digbench-scaling/hard_unwindbound10.c deleted file mode 100644 index 032a34ed298..00000000000 --- a/c/nla-digbench-scaling/hard_unwindbound10.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - hardware integer division program, by Manna - returns q==A//B - */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int A, B; - int r, d, p, q; - A = __VERIFIER_nondet_int(); - B = __VERIFIER_nondet_int(); - assume_abort_if_not(B >= 1); - - r = A; - d = B; - p = 1; - q = 0; - - while (counter++<10) { - __VERIFIER_assert(q == 0); - __VERIFIER_assert(r == A); - __VERIFIER_assert(d == B * p); - if (!(r >= d)) break; - - d = 2 * d; - p = 2 * p; - } - - while (counter++<10) { - __VERIFIER_assert(A == q*B + r); - __VERIFIER_assert(d == B*p); - - if (!(p != 1)) break; - - d = d / 2; - p = p / 2; - if (r >= d) { - r = r - d; - q = q + p; - } - } - - __VERIFIER_assert(A == d*q + r); - __VERIFIER_assert(B == d); - return 0; -} diff --git a/c/nla-digbench-scaling/hard_unwindbound10.yml b/c/nla-digbench-scaling/hard_unwindbound10.yml deleted file mode 100644 index 83125fb2e12..00000000000 --- a/c/nla-digbench-scaling/hard_unwindbound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'hard_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard_unwindbound100.c b/c/nla-digbench-scaling/hard_unwindbound100.c deleted file mode 100644 index 93da2d71dff..00000000000 --- a/c/nla-digbench-scaling/hard_unwindbound100.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - hardware integer division program, by Manna - returns q==A//B - */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int A, B; - int r, d, p, q; - A = __VERIFIER_nondet_int(); - B = __VERIFIER_nondet_int(); - assume_abort_if_not(B >= 1); - - r = A; - d = B; - p = 1; - q = 0; - - while (counter++<100) { - __VERIFIER_assert(q == 0); - __VERIFIER_assert(r == A); - __VERIFIER_assert(d == B * p); - if (!(r >= d)) break; - - d = 2 * d; - p = 2 * p; - } - - while (counter++<100) { - __VERIFIER_assert(A == q*B + r); - __VERIFIER_assert(d == B*p); - - if (!(p != 1)) break; - - d = d / 2; - p = p / 2; - if (r >= d) { - r = r - d; - q = q + p; - } - } - - __VERIFIER_assert(A == d*q + r); - __VERIFIER_assert(B == d); - return 0; -} diff --git a/c/nla-digbench-scaling/hard_unwindbound100.yml b/c/nla-digbench-scaling/hard_unwindbound100.yml deleted file mode 100644 index 7495ae8af82..00000000000 --- a/c/nla-digbench-scaling/hard_unwindbound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'hard_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard_unwindbound2.c b/c/nla-digbench-scaling/hard_unwindbound2.c deleted file mode 100644 index 0e445dfa020..00000000000 --- a/c/nla-digbench-scaling/hard_unwindbound2.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - hardware integer division program, by Manna - returns q==A//B - */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int A, B; - int r, d, p, q; - A = __VERIFIER_nondet_int(); - B = __VERIFIER_nondet_int(); - assume_abort_if_not(B >= 1); - - r = A; - d = B; - p = 1; - q = 0; - - while (counter++<2) { - __VERIFIER_assert(q == 0); - __VERIFIER_assert(r == A); - __VERIFIER_assert(d == B * p); - if (!(r >= d)) break; - - d = 2 * d; - p = 2 * p; - } - - while (counter++<2) { - __VERIFIER_assert(A == q*B + r); - __VERIFIER_assert(d == B*p); - - if (!(p != 1)) break; - - d = d / 2; - p = p / 2; - if (r >= d) { - r = r - d; - q = q + p; - } - } - - __VERIFIER_assert(A == d*q + r); - __VERIFIER_assert(B == d); - return 0; -} diff --git a/c/nla-digbench-scaling/hard_unwindbound2.yml b/c/nla-digbench-scaling/hard_unwindbound2.yml deleted file mode 100644 index ddd13a07d9a..00000000000 --- a/c/nla-digbench-scaling/hard_unwindbound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'hard_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard_unwindbound20.c b/c/nla-digbench-scaling/hard_unwindbound20.c deleted file mode 100644 index 306ed8b246f..00000000000 --- a/c/nla-digbench-scaling/hard_unwindbound20.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - hardware integer division program, by Manna - returns q==A//B - */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int A, B; - int r, d, p, q; - A = __VERIFIER_nondet_int(); - B = __VERIFIER_nondet_int(); - assume_abort_if_not(B >= 1); - - r = A; - d = B; - p = 1; - q = 0; - - while (counter++<20) { - __VERIFIER_assert(q == 0); - __VERIFIER_assert(r == A); - __VERIFIER_assert(d == B * p); - if (!(r >= d)) break; - - d = 2 * d; - p = 2 * p; - } - - while (counter++<20) { - __VERIFIER_assert(A == q*B + r); - __VERIFIER_assert(d == B*p); - - if (!(p != 1)) break; - - d = d / 2; - p = p / 2; - if (r >= d) { - r = r - d; - q = q + p; - } - } - - __VERIFIER_assert(A == d*q + r); - __VERIFIER_assert(B == d); - return 0; -} diff --git a/c/nla-digbench-scaling/hard_unwindbound20.yml b/c/nla-digbench-scaling/hard_unwindbound20.yml deleted file mode 100644 index 04a8041d35f..00000000000 --- a/c/nla-digbench-scaling/hard_unwindbound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'hard_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard_unwindbound5.c b/c/nla-digbench-scaling/hard_unwindbound5.c deleted file mode 100644 index 9f5116e9b5d..00000000000 --- a/c/nla-digbench-scaling/hard_unwindbound5.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - hardware integer division program, by Manna - returns q==A//B - */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int A, B; - int r, d, p, q; - A = __VERIFIER_nondet_int(); - B = __VERIFIER_nondet_int(); - assume_abort_if_not(B >= 1); - - r = A; - d = B; - p = 1; - q = 0; - - while (counter++<5) { - __VERIFIER_assert(q == 0); - __VERIFIER_assert(r == A); - __VERIFIER_assert(d == B * p); - if (!(r >= d)) break; - - d = 2 * d; - p = 2 * p; - } - - while (counter++<5) { - __VERIFIER_assert(A == q*B + r); - __VERIFIER_assert(d == B*p); - - if (!(p != 1)) break; - - d = d / 2; - p = p / 2; - if (r >= d) { - r = r - d; - q = q + p; - } - } - - __VERIFIER_assert(A == d*q + r); - __VERIFIER_assert(B == d); - return 0; -} diff --git a/c/nla-digbench-scaling/hard_unwindbound5.yml b/c/nla-digbench-scaling/hard_unwindbound5.yml deleted file mode 100644 index 3bbd995e6e7..00000000000 --- a/c/nla-digbench-scaling/hard_unwindbound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'hard_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard_unwindbound50.c b/c/nla-digbench-scaling/hard_unwindbound50.c deleted file mode 100644 index 9b9a334e3bc..00000000000 --- a/c/nla-digbench-scaling/hard_unwindbound50.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - hardware integer division program, by Manna - returns q==A//B - */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int A, B; - int r, d, p, q; - A = __VERIFIER_nondet_int(); - B = __VERIFIER_nondet_int(); - assume_abort_if_not(B >= 1); - - r = A; - d = B; - p = 1; - q = 0; - - while (counter++<50) { - __VERIFIER_assert(q == 0); - __VERIFIER_assert(r == A); - __VERIFIER_assert(d == B * p); - if (!(r >= d)) break; - - d = 2 * d; - p = 2 * p; - } - - while (counter++<50) { - __VERIFIER_assert(A == q*B + r); - __VERIFIER_assert(d == B*p); - - if (!(p != 1)) break; - - d = d / 2; - p = p / 2; - if (r >= d) { - r = r - d; - q = q + p; - } - } - - __VERIFIER_assert(A == d*q + r); - __VERIFIER_assert(B == d); - return 0; -} diff --git a/c/nla-digbench-scaling/hard_unwindbound50.yml b/c/nla-digbench-scaling/hard_unwindbound50.yml deleted file mode 100644 index a39578127a3..00000000000 --- a/c/nla-digbench-scaling/hard_unwindbound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'hard_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard_valuebound1.c b/c/nla-digbench-scaling/hard_valuebound1.c deleted file mode 100644 index 427e3253221..00000000000 --- a/c/nla-digbench-scaling/hard_valuebound1.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - hardware integer division program, by Manna - returns q==A//B - */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int A, B; - int r, d, p, q; - A = __VERIFIER_nondet_int(); - assume_abort_if_not(A>0 && A<=1); - B = __VERIFIER_nondet_int(); - assume_abort_if_not(B>0 && B<=1); - assume_abort_if_not(B >= 1); - - r = A; - d = B; - p = 1; - q = 0; - - while (1) { - __VERIFIER_assert(q == 0); - __VERIFIER_assert(r == A); - __VERIFIER_assert(d == B * p); - if (!(r >= d)) break; - - d = 2 * d; - p = 2 * p; - } - - while (1) { - __VERIFIER_assert(A == q*B + r); - __VERIFIER_assert(d == B*p); - - if (!(p != 1)) break; - - d = d / 2; - p = p / 2; - if (r >= d) { - r = r - d; - q = q + p; - } - } - - __VERIFIER_assert(A == d*q + r); - __VERIFIER_assert(B == d); - return 0; -} diff --git a/c/nla-digbench-scaling/hard_valuebound1.yml b/c/nla-digbench-scaling/hard_valuebound1.yml deleted file mode 100644 index 48b4581e889..00000000000 --- a/c/nla-digbench-scaling/hard_valuebound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'hard_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard_valuebound10.c b/c/nla-digbench-scaling/hard_valuebound10.c deleted file mode 100644 index 0472c61bcc4..00000000000 --- a/c/nla-digbench-scaling/hard_valuebound10.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - hardware integer division program, by Manna - returns q==A//B - */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int A, B; - int r, d, p, q; - A = __VERIFIER_nondet_int(); - assume_abort_if_not(A>0 && A<=10); - B = __VERIFIER_nondet_int(); - assume_abort_if_not(B>0 && B<=10); - assume_abort_if_not(B >= 1); - - r = A; - d = B; - p = 1; - q = 0; - - while (1) { - __VERIFIER_assert(q == 0); - __VERIFIER_assert(r == A); - __VERIFIER_assert(d == B * p); - if (!(r >= d)) break; - - d = 2 * d; - p = 2 * p; - } - - while (1) { - __VERIFIER_assert(A == q*B + r); - __VERIFIER_assert(d == B*p); - - if (!(p != 1)) break; - - d = d / 2; - p = p / 2; - if (r >= d) { - r = r - d; - q = q + p; - } - } - - __VERIFIER_assert(A == d*q + r); - __VERIFIER_assert(B == d); - return 0; -} diff --git a/c/nla-digbench-scaling/hard_valuebound10.yml b/c/nla-digbench-scaling/hard_valuebound10.yml deleted file mode 100644 index c9e173f10d8..00000000000 --- a/c/nla-digbench-scaling/hard_valuebound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'hard_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard_valuebound100.c b/c/nla-digbench-scaling/hard_valuebound100.c deleted file mode 100644 index c0511d6f919..00000000000 --- a/c/nla-digbench-scaling/hard_valuebound100.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - hardware integer division program, by Manna - returns q==A//B - */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int A, B; - int r, d, p, q; - A = __VERIFIER_nondet_int(); - assume_abort_if_not(A>0 && A<=100); - B = __VERIFIER_nondet_int(); - assume_abort_if_not(B>0 && B<=100); - assume_abort_if_not(B >= 1); - - r = A; - d = B; - p = 1; - q = 0; - - while (1) { - __VERIFIER_assert(q == 0); - __VERIFIER_assert(r == A); - __VERIFIER_assert(d == B * p); - if (!(r >= d)) break; - - d = 2 * d; - p = 2 * p; - } - - while (1) { - __VERIFIER_assert(A == q*B + r); - __VERIFIER_assert(d == B*p); - - if (!(p != 1)) break; - - d = d / 2; - p = p / 2; - if (r >= d) { - r = r - d; - q = q + p; - } - } - - __VERIFIER_assert(A == d*q + r); - __VERIFIER_assert(B == d); - return 0; -} diff --git a/c/nla-digbench-scaling/hard_valuebound100.yml b/c/nla-digbench-scaling/hard_valuebound100.yml deleted file mode 100644 index b1b7767d65d..00000000000 --- a/c/nla-digbench-scaling/hard_valuebound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'hard_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard_valuebound2.c b/c/nla-digbench-scaling/hard_valuebound2.c deleted file mode 100644 index 46b1e6f3f7d..00000000000 --- a/c/nla-digbench-scaling/hard_valuebound2.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - hardware integer division program, by Manna - returns q==A//B - */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int A, B; - int r, d, p, q; - A = __VERIFIER_nondet_int(); - assume_abort_if_not(A>0 && A<=2); - B = __VERIFIER_nondet_int(); - assume_abort_if_not(B>0 && B<=2); - assume_abort_if_not(B >= 1); - - r = A; - d = B; - p = 1; - q = 0; - - while (1) { - __VERIFIER_assert(q == 0); - __VERIFIER_assert(r == A); - __VERIFIER_assert(d == B * p); - if (!(r >= d)) break; - - d = 2 * d; - p = 2 * p; - } - - while (1) { - __VERIFIER_assert(A == q*B + r); - __VERIFIER_assert(d == B*p); - - if (!(p != 1)) break; - - d = d / 2; - p = p / 2; - if (r >= d) { - r = r - d; - q = q + p; - } - } - - __VERIFIER_assert(A == d*q + r); - __VERIFIER_assert(B == d); - return 0; -} diff --git a/c/nla-digbench-scaling/hard_valuebound2.yml b/c/nla-digbench-scaling/hard_valuebound2.yml deleted file mode 100644 index 4b558317cd1..00000000000 --- a/c/nla-digbench-scaling/hard_valuebound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'hard_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard_valuebound20.c b/c/nla-digbench-scaling/hard_valuebound20.c deleted file mode 100644 index c8f8b5ab0fb..00000000000 --- a/c/nla-digbench-scaling/hard_valuebound20.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - hardware integer division program, by Manna - returns q==A//B - */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int A, B; - int r, d, p, q; - A = __VERIFIER_nondet_int(); - assume_abort_if_not(A>0 && A<=20); - B = __VERIFIER_nondet_int(); - assume_abort_if_not(B>0 && B<=20); - assume_abort_if_not(B >= 1); - - r = A; - d = B; - p = 1; - q = 0; - - while (1) { - __VERIFIER_assert(q == 0); - __VERIFIER_assert(r == A); - __VERIFIER_assert(d == B * p); - if (!(r >= d)) break; - - d = 2 * d; - p = 2 * p; - } - - while (1) { - __VERIFIER_assert(A == q*B + r); - __VERIFIER_assert(d == B*p); - - if (!(p != 1)) break; - - d = d / 2; - p = p / 2; - if (r >= d) { - r = r - d; - q = q + p; - } - } - - __VERIFIER_assert(A == d*q + r); - __VERIFIER_assert(B == d); - return 0; -} diff --git a/c/nla-digbench-scaling/hard_valuebound20.yml b/c/nla-digbench-scaling/hard_valuebound20.yml deleted file mode 100644 index ab8922505a4..00000000000 --- a/c/nla-digbench-scaling/hard_valuebound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'hard_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard_valuebound5.c b/c/nla-digbench-scaling/hard_valuebound5.c deleted file mode 100644 index 453135a88a7..00000000000 --- a/c/nla-digbench-scaling/hard_valuebound5.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - hardware integer division program, by Manna - returns q==A//B - */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int A, B; - int r, d, p, q; - A = __VERIFIER_nondet_int(); - assume_abort_if_not(A>0 && A<=5); - B = __VERIFIER_nondet_int(); - assume_abort_if_not(B>0 && B<=5); - assume_abort_if_not(B >= 1); - - r = A; - d = B; - p = 1; - q = 0; - - while (1) { - __VERIFIER_assert(q == 0); - __VERIFIER_assert(r == A); - __VERIFIER_assert(d == B * p); - if (!(r >= d)) break; - - d = 2 * d; - p = 2 * p; - } - - while (1) { - __VERIFIER_assert(A == q*B + r); - __VERIFIER_assert(d == B*p); - - if (!(p != 1)) break; - - d = d / 2; - p = p / 2; - if (r >= d) { - r = r - d; - q = q + p; - } - } - - __VERIFIER_assert(A == d*q + r); - __VERIFIER_assert(B == d); - return 0; -} diff --git a/c/nla-digbench-scaling/hard_valuebound5.yml b/c/nla-digbench-scaling/hard_valuebound5.yml deleted file mode 100644 index f002b156f09..00000000000 --- a/c/nla-digbench-scaling/hard_valuebound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'hard_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/hard_valuebound50.c b/c/nla-digbench-scaling/hard_valuebound50.c deleted file mode 100644 index f1849a1bf59..00000000000 --- a/c/nla-digbench-scaling/hard_valuebound50.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - hardware integer division program, by Manna - returns q==A//B - */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int A, B; - int r, d, p, q; - A = __VERIFIER_nondet_int(); - assume_abort_if_not(A>0 && A<=50); - B = __VERIFIER_nondet_int(); - assume_abort_if_not(B>0 && B<=50); - assume_abort_if_not(B >= 1); - - r = A; - d = B; - p = 1; - q = 0; - - while (1) { - __VERIFIER_assert(q == 0); - __VERIFIER_assert(r == A); - __VERIFIER_assert(d == B * p); - if (!(r >= d)) break; - - d = 2 * d; - p = 2 * p; - } - - while (1) { - __VERIFIER_assert(A == q*B + r); - __VERIFIER_assert(d == B*p); - - if (!(p != 1)) break; - - d = d / 2; - p = p / 2; - if (r >= d) { - r = r - d; - q = q + p; - } - } - - __VERIFIER_assert(A == d*q + r); - __VERIFIER_assert(B == d); - return 0; -} diff --git a/c/nla-digbench-scaling/hard_valuebound50.yml b/c/nla-digbench-scaling/hard_valuebound50.yml deleted file mode 100644 index b851cefabdf..00000000000 --- a/c/nla-digbench-scaling/hard_valuebound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'hard_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/knuth_unwindbound1.c b/c/nla-digbench-scaling/knuth_unwindbound1.c index a61d2e648b3..38591cd1eec 100644 --- a/c/nla-digbench-scaling/knuth_unwindbound1.c +++ b/c/nla-digbench-scaling/knuth_unwindbound1.c @@ -3,7 +3,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/knuth_unwindbound1.i b/c/nla-digbench-scaling/knuth_unwindbound1.i index b59aaaee90a..69d89e83b0e 100644 --- a/c/nla-digbench-scaling/knuth_unwindbound1.i +++ b/c/nla-digbench-scaling/knuth_unwindbound1.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "knuth.c", 7, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/knuth_unwindbound1.yml b/c/nla-digbench-scaling/knuth_unwindbound1.yml index 92c04128339..e75f7727677 100644 --- a/c/nla-digbench-scaling/knuth_unwindbound1.yml +++ b/c/nla-digbench-scaling/knuth_unwindbound1.yml @@ -3,6 +3,8 @@ input_files: 'knuth_unwindbound1.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/knuth_unwindbound10.c b/c/nla-digbench-scaling/knuth_unwindbound10.c index 5a4df707525..7b2653e7f8d 100644 --- a/c/nla-digbench-scaling/knuth_unwindbound10.c +++ b/c/nla-digbench-scaling/knuth_unwindbound10.c @@ -3,7 +3,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/knuth_unwindbound10.i b/c/nla-digbench-scaling/knuth_unwindbound10.i index 316b615476b..4e57905089c 100644 --- a/c/nla-digbench-scaling/knuth_unwindbound10.i +++ b/c/nla-digbench-scaling/knuth_unwindbound10.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "knuth.c", 7, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/knuth_unwindbound10.yml b/c/nla-digbench-scaling/knuth_unwindbound10.yml index c094fc62868..a0dd1a8cbe9 100644 --- a/c/nla-digbench-scaling/knuth_unwindbound10.yml +++ b/c/nla-digbench-scaling/knuth_unwindbound10.yml @@ -3,6 +3,8 @@ input_files: 'knuth_unwindbound10.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/knuth_unwindbound100.c b/c/nla-digbench-scaling/knuth_unwindbound100.c index f848278af5e..db10c93e020 100644 --- a/c/nla-digbench-scaling/knuth_unwindbound100.c +++ b/c/nla-digbench-scaling/knuth_unwindbound100.c @@ -3,7 +3,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/knuth_unwindbound100.i b/c/nla-digbench-scaling/knuth_unwindbound100.i index 5dd3944cd4f..d91016eb488 100644 --- a/c/nla-digbench-scaling/knuth_unwindbound100.i +++ b/c/nla-digbench-scaling/knuth_unwindbound100.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "knuth.c", 7, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/knuth_unwindbound100.yml b/c/nla-digbench-scaling/knuth_unwindbound100.yml index 4b81bf456e2..7c9a318b449 100644 --- a/c/nla-digbench-scaling/knuth_unwindbound100.yml +++ b/c/nla-digbench-scaling/knuth_unwindbound100.yml @@ -3,6 +3,8 @@ input_files: 'knuth_unwindbound100.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/knuth_unwindbound2.c b/c/nla-digbench-scaling/knuth_unwindbound2.c index 362b4e2691f..41937d72962 100644 --- a/c/nla-digbench-scaling/knuth_unwindbound2.c +++ b/c/nla-digbench-scaling/knuth_unwindbound2.c @@ -3,7 +3,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/knuth_unwindbound2.i b/c/nla-digbench-scaling/knuth_unwindbound2.i index 375acc36df5..5c141824477 100644 --- a/c/nla-digbench-scaling/knuth_unwindbound2.i +++ b/c/nla-digbench-scaling/knuth_unwindbound2.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "knuth.c", 7, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/knuth_unwindbound2.yml b/c/nla-digbench-scaling/knuth_unwindbound2.yml index 705b0a97884..6272d7a2ee7 100644 --- a/c/nla-digbench-scaling/knuth_unwindbound2.yml +++ b/c/nla-digbench-scaling/knuth_unwindbound2.yml @@ -3,6 +3,8 @@ input_files: 'knuth_unwindbound2.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/knuth_unwindbound20.c b/c/nla-digbench-scaling/knuth_unwindbound20.c index 39763a2d995..d96a004be7f 100644 --- a/c/nla-digbench-scaling/knuth_unwindbound20.c +++ b/c/nla-digbench-scaling/knuth_unwindbound20.c @@ -3,7 +3,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/knuth_unwindbound20.i b/c/nla-digbench-scaling/knuth_unwindbound20.i index b02ebdc3fcc..2a566da5ae1 100644 --- a/c/nla-digbench-scaling/knuth_unwindbound20.i +++ b/c/nla-digbench-scaling/knuth_unwindbound20.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "knuth.c", 7, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/knuth_unwindbound20.yml b/c/nla-digbench-scaling/knuth_unwindbound20.yml index 943d1b2fec8..5b932578fe8 100644 --- a/c/nla-digbench-scaling/knuth_unwindbound20.yml +++ b/c/nla-digbench-scaling/knuth_unwindbound20.yml @@ -3,6 +3,8 @@ input_files: 'knuth_unwindbound20.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/knuth_unwindbound5.c b/c/nla-digbench-scaling/knuth_unwindbound5.c index ca19605d04a..6f4c5b78ce9 100644 --- a/c/nla-digbench-scaling/knuth_unwindbound5.c +++ b/c/nla-digbench-scaling/knuth_unwindbound5.c @@ -3,7 +3,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/knuth_unwindbound5.i b/c/nla-digbench-scaling/knuth_unwindbound5.i index dd6977df857..0bf789517fa 100644 --- a/c/nla-digbench-scaling/knuth_unwindbound5.i +++ b/c/nla-digbench-scaling/knuth_unwindbound5.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "knuth.c", 7, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/knuth_unwindbound5.yml b/c/nla-digbench-scaling/knuth_unwindbound5.yml index 73242caa093..db4eb76152b 100644 --- a/c/nla-digbench-scaling/knuth_unwindbound5.yml +++ b/c/nla-digbench-scaling/knuth_unwindbound5.yml @@ -3,6 +3,8 @@ input_files: 'knuth_unwindbound5.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/knuth_unwindbound50.c b/c/nla-digbench-scaling/knuth_unwindbound50.c index 26d785d3597..166fa0131fc 100644 --- a/c/nla-digbench-scaling/knuth_unwindbound50.c +++ b/c/nla-digbench-scaling/knuth_unwindbound50.c @@ -3,7 +3,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/knuth_unwindbound50.i b/c/nla-digbench-scaling/knuth_unwindbound50.i index 552d79e32f6..1a06b7906d4 100644 --- a/c/nla-digbench-scaling/knuth_unwindbound50.i +++ b/c/nla-digbench-scaling/knuth_unwindbound50.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "knuth.c", 7, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/knuth_unwindbound50.yml b/c/nla-digbench-scaling/knuth_unwindbound50.yml index 3dd0f04043a..75b34a72878 100644 --- a/c/nla-digbench-scaling/knuth_unwindbound50.yml +++ b/c/nla-digbench-scaling/knuth_unwindbound50.yml @@ -3,6 +3,8 @@ input_files: 'knuth_unwindbound50.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/knuth_valuebound1.c b/c/nla-digbench-scaling/knuth_valuebound1.c index d19d34d98ca..303a54482ae 100644 --- a/c/nla-digbench-scaling/knuth_valuebound1.c +++ b/c/nla-digbench-scaling/knuth_valuebound1.c @@ -3,7 +3,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -23,9 +24,9 @@ int main() { unsigned n, a; unsigned r, k, q, d, s, t; n = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(n>0 && n<=1); + assume_abort_if_not(n>=0 && n<=1); a = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(a>0 && a<=1); + assume_abort_if_not(a>=0 && a<=1); assume_abort_if_not(n < UINT_MAX/8); assume_abort_if_not(a > 2); diff --git a/c/nla-digbench-scaling/knuth_valuebound1.i b/c/nla-digbench-scaling/knuth_valuebound1.i index 4b223f68e1b..45cd76787d7 100644 --- a/c/nla-digbench-scaling/knuth_valuebound1.i +++ b/c/nla-digbench-scaling/knuth_valuebound1.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "knuth.c", 7, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -17,9 +27,9 @@ int main() { unsigned n, a; unsigned r, k, q, d, s, t; n = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(n>0 && n<=1); + assume_abort_if_not(n>=0 && n<=1); a = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(a>0 && a<=1); + assume_abort_if_not(a>=0 && a<=1); assume_abort_if_not(n < (0x7fffffff * 2U + 1U)/8); assume_abort_if_not(a > 2); d = a; diff --git a/c/nla-digbench-scaling/knuth_valuebound1.yml b/c/nla-digbench-scaling/knuth_valuebound1.yml index 041152c73c9..ee54132660c 100644 --- a/c/nla-digbench-scaling/knuth_valuebound1.yml +++ b/c/nla-digbench-scaling/knuth_valuebound1.yml @@ -3,6 +3,8 @@ input_files: 'knuth_valuebound1.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/knuth_valuebound10.c b/c/nla-digbench-scaling/knuth_valuebound10.c index 12ddf456f75..2293c44607d 100644 --- a/c/nla-digbench-scaling/knuth_valuebound10.c +++ b/c/nla-digbench-scaling/knuth_valuebound10.c @@ -3,7 +3,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -23,9 +24,9 @@ int main() { unsigned n, a; unsigned r, k, q, d, s, t; n = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(n>0 && n<=10); + assume_abort_if_not(n>=0 && n<=10); a = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(a>0 && a<=10); + assume_abort_if_not(a>=0 && a<=10); assume_abort_if_not(n < UINT_MAX/8); assume_abort_if_not(a > 2); diff --git a/c/nla-digbench-scaling/knuth_valuebound10.i b/c/nla-digbench-scaling/knuth_valuebound10.i index 719c73c60f3..d39ded34b63 100644 --- a/c/nla-digbench-scaling/knuth_valuebound10.i +++ b/c/nla-digbench-scaling/knuth_valuebound10.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "knuth.c", 7, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -17,9 +27,9 @@ int main() { unsigned n, a; unsigned r, k, q, d, s, t; n = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(n>0 && n<=10); + assume_abort_if_not(n>=0 && n<=10); a = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(a>0 && a<=10); + assume_abort_if_not(a>=0 && a<=10); assume_abort_if_not(n < (0x7fffffff * 2U + 1U)/8); assume_abort_if_not(a > 2); d = a; diff --git a/c/nla-digbench-scaling/knuth_valuebound10.yml b/c/nla-digbench-scaling/knuth_valuebound10.yml index b696e43ea80..a2826ce7796 100644 --- a/c/nla-digbench-scaling/knuth_valuebound10.yml +++ b/c/nla-digbench-scaling/knuth_valuebound10.yml @@ -3,6 +3,8 @@ input_files: 'knuth_valuebound10.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/knuth_valuebound100.c b/c/nla-digbench-scaling/knuth_valuebound100.c index e896b6802ed..73f42709137 100644 --- a/c/nla-digbench-scaling/knuth_valuebound100.c +++ b/c/nla-digbench-scaling/knuth_valuebound100.c @@ -3,7 +3,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -23,9 +24,9 @@ int main() { unsigned n, a; unsigned r, k, q, d, s, t; n = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(n>0 && n<=100); + assume_abort_if_not(n>=0 && n<=100); a = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(a>0 && a<=100); + assume_abort_if_not(a>=0 && a<=100); assume_abort_if_not(n < UINT_MAX/8); assume_abort_if_not(a > 2); diff --git a/c/nla-digbench-scaling/knuth_valuebound100.i b/c/nla-digbench-scaling/knuth_valuebound100.i index 40234740b29..d1655da0722 100644 --- a/c/nla-digbench-scaling/knuth_valuebound100.i +++ b/c/nla-digbench-scaling/knuth_valuebound100.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "knuth.c", 7, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -17,9 +27,9 @@ int main() { unsigned n, a; unsigned r, k, q, d, s, t; n = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(n>0 && n<=100); + assume_abort_if_not(n>=0 && n<=100); a = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(a>0 && a<=100); + assume_abort_if_not(a>=0 && a<=100); assume_abort_if_not(n < (0x7fffffff * 2U + 1U)/8); assume_abort_if_not(a > 2); d = a; diff --git a/c/nla-digbench-scaling/knuth_valuebound100.yml b/c/nla-digbench-scaling/knuth_valuebound100.yml index 2c88a3cb483..4aeb5c9c3c1 100644 --- a/c/nla-digbench-scaling/knuth_valuebound100.yml +++ b/c/nla-digbench-scaling/knuth_valuebound100.yml @@ -3,6 +3,8 @@ input_files: 'knuth_valuebound100.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/knuth_valuebound2.c b/c/nla-digbench-scaling/knuth_valuebound2.c index e95d6399ba6..a139ccdc531 100644 --- a/c/nla-digbench-scaling/knuth_valuebound2.c +++ b/c/nla-digbench-scaling/knuth_valuebound2.c @@ -3,7 +3,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -23,9 +24,9 @@ int main() { unsigned n, a; unsigned r, k, q, d, s, t; n = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(n>0 && n<=2); + assume_abort_if_not(n>=0 && n<=2); a = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(a>0 && a<=2); + assume_abort_if_not(a>=0 && a<=2); assume_abort_if_not(n < UINT_MAX/8); assume_abort_if_not(a > 2); diff --git a/c/nla-digbench-scaling/knuth_valuebound2.i b/c/nla-digbench-scaling/knuth_valuebound2.i index 9ca4e7428e3..5641eccec7d 100644 --- a/c/nla-digbench-scaling/knuth_valuebound2.i +++ b/c/nla-digbench-scaling/knuth_valuebound2.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "knuth.c", 7, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -17,9 +27,9 @@ int main() { unsigned n, a; unsigned r, k, q, d, s, t; n = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(n>0 && n<=2); + assume_abort_if_not(n>=0 && n<=2); a = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(a>0 && a<=2); + assume_abort_if_not(a>=0 && a<=2); assume_abort_if_not(n < (0x7fffffff * 2U + 1U)/8); assume_abort_if_not(a > 2); d = a; diff --git a/c/nla-digbench-scaling/knuth_valuebound2.yml b/c/nla-digbench-scaling/knuth_valuebound2.yml index 844135f0652..ef3ac6a6ee2 100644 --- a/c/nla-digbench-scaling/knuth_valuebound2.yml +++ b/c/nla-digbench-scaling/knuth_valuebound2.yml @@ -3,6 +3,8 @@ input_files: 'knuth_valuebound2.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/knuth_valuebound20.c b/c/nla-digbench-scaling/knuth_valuebound20.c index 44baac89fb0..b6c957a0d83 100644 --- a/c/nla-digbench-scaling/knuth_valuebound20.c +++ b/c/nla-digbench-scaling/knuth_valuebound20.c @@ -3,7 +3,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -23,9 +24,9 @@ int main() { unsigned n, a; unsigned r, k, q, d, s, t; n = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(n>0 && n<=20); + assume_abort_if_not(n>=0 && n<=20); a = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(a>0 && a<=20); + assume_abort_if_not(a>=0 && a<=20); assume_abort_if_not(n < UINT_MAX/8); assume_abort_if_not(a > 2); diff --git a/c/nla-digbench-scaling/knuth_valuebound20.i b/c/nla-digbench-scaling/knuth_valuebound20.i index eadebd49543..e3a211de838 100644 --- a/c/nla-digbench-scaling/knuth_valuebound20.i +++ b/c/nla-digbench-scaling/knuth_valuebound20.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "knuth.c", 7, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -17,9 +27,9 @@ int main() { unsigned n, a; unsigned r, k, q, d, s, t; n = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(n>0 && n<=20); + assume_abort_if_not(n>=0 && n<=20); a = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(a>0 && a<=20); + assume_abort_if_not(a>=0 && a<=20); assume_abort_if_not(n < (0x7fffffff * 2U + 1U)/8); assume_abort_if_not(a > 2); d = a; diff --git a/c/nla-digbench-scaling/knuth_valuebound20.yml b/c/nla-digbench-scaling/knuth_valuebound20.yml index 86b6e55d93c..bf5faee7a66 100644 --- a/c/nla-digbench-scaling/knuth_valuebound20.yml +++ b/c/nla-digbench-scaling/knuth_valuebound20.yml @@ -3,6 +3,8 @@ input_files: 'knuth_valuebound20.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/knuth_valuebound5.c b/c/nla-digbench-scaling/knuth_valuebound5.c index fa0f9e7d398..94021ac88bc 100644 --- a/c/nla-digbench-scaling/knuth_valuebound5.c +++ b/c/nla-digbench-scaling/knuth_valuebound5.c @@ -3,7 +3,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -23,9 +24,9 @@ int main() { unsigned n, a; unsigned r, k, q, d, s, t; n = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(n>0 && n<=5); + assume_abort_if_not(n>=0 && n<=5); a = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(a>0 && a<=5); + assume_abort_if_not(a>=0 && a<=5); assume_abort_if_not(n < UINT_MAX/8); assume_abort_if_not(a > 2); diff --git a/c/nla-digbench-scaling/knuth_valuebound5.i b/c/nla-digbench-scaling/knuth_valuebound5.i index 6088c43621c..e5ae6ae8704 100644 --- a/c/nla-digbench-scaling/knuth_valuebound5.i +++ b/c/nla-digbench-scaling/knuth_valuebound5.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "knuth.c", 7, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -17,9 +27,9 @@ int main() { unsigned n, a; unsigned r, k, q, d, s, t; n = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(n>0 && n<=5); + assume_abort_if_not(n>=0 && n<=5); a = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(a>0 && a<=5); + assume_abort_if_not(a>=0 && a<=5); assume_abort_if_not(n < (0x7fffffff * 2U + 1U)/8); assume_abort_if_not(a > 2); d = a; diff --git a/c/nla-digbench-scaling/knuth_valuebound5.yml b/c/nla-digbench-scaling/knuth_valuebound5.yml index 4e6f33b0271..c975f5fc9ca 100644 --- a/c/nla-digbench-scaling/knuth_valuebound5.yml +++ b/c/nla-digbench-scaling/knuth_valuebound5.yml @@ -3,6 +3,8 @@ input_files: 'knuth_valuebound5.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/knuth_valuebound50.c b/c/nla-digbench-scaling/knuth_valuebound50.c index f6481c9e78c..98bc7ac999f 100644 --- a/c/nla-digbench-scaling/knuth_valuebound50.c +++ b/c/nla-digbench-scaling/knuth_valuebound50.c @@ -3,7 +3,8 @@ #include extern void abort(void); -void reach_error(){} +#include +void reach_error() { assert(0); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -23,9 +24,9 @@ int main() { unsigned n, a; unsigned r, k, q, d, s, t; n = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(n>0 && n<=50); + assume_abort_if_not(n>=0 && n<=50); a = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(a>0 && a<=50); + assume_abort_if_not(a>=0 && a<=50); assume_abort_if_not(n < UINT_MAX/8); assume_abort_if_not(a > 2); diff --git a/c/nla-digbench-scaling/knuth_valuebound50.i b/c/nla-digbench-scaling/knuth_valuebound50.i index 34ac66be583..37a817ed55f 100644 --- a/c/nla-digbench-scaling/knuth_valuebound50.i +++ b/c/nla-digbench-scaling/knuth_valuebound50.i @@ -1,5 +1,15 @@ extern void abort(void); -void reach_error(){} + +extern void __assert_fail (const char *__assertion, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert_perror_fail (int __errnum, const char *__file, + unsigned int __line, const char *__function) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +extern void __assert (const char *__assertion, const char *__file, int __line) + __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); + +void reach_error() { ((void) sizeof ((0) ? 1 : 0), __extension__ ({ if (0) ; else __assert_fail ("0", "knuth.c", 7, __extension__ __PRETTY_FUNCTION__); })); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -17,9 +27,9 @@ int main() { unsigned n, a; unsigned r, k, q, d, s, t; n = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(n>0 && n<=50); + assume_abort_if_not(n>=0 && n<=50); a = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(a>0 && a<=50); + assume_abort_if_not(a>=0 && a<=50); assume_abort_if_not(n < (0x7fffffff * 2U + 1U)/8); assume_abort_if_not(a > 2); d = a; diff --git a/c/nla-digbench-scaling/knuth_valuebound50.yml b/c/nla-digbench-scaling/knuth_valuebound50.yml index 3d11e6209d0..c162183fe22 100644 --- a/c/nla-digbench-scaling/knuth_valuebound50.yml +++ b/c/nla-digbench-scaling/knuth_valuebound50.yml @@ -3,6 +3,8 @@ input_files: 'knuth_valuebound50.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/lcm1_unwindbound1.c b/c/nla-digbench-scaling/lcm1_unwindbound1.c index 3a8fba5cafa..d4dea1f4e88 100644 --- a/c/nla-digbench-scaling/lcm1_unwindbound1.c +++ b/c/nla-digbench-scaling/lcm1_unwindbound1.c @@ -4,7 +4,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "lcm1.c", 8, "reach_error"); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/lcm1_unwindbound1.yml b/c/nla-digbench-scaling/lcm1_unwindbound1.yml index 90fdac035c1..3bff5ab7ef3 100644 --- a/c/nla-digbench-scaling/lcm1_unwindbound1.yml +++ b/c/nla-digbench-scaling/lcm1_unwindbound1.yml @@ -2,6 +2,8 @@ format_version: '2.0' input_files: 'lcm1_unwindbound1.c' properties: - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp expected_verdict: true options: diff --git a/c/nla-digbench-scaling/lcm1_unwindbound10.c b/c/nla-digbench-scaling/lcm1_unwindbound10.c index 930948926ef..26976d87df0 100644 --- a/c/nla-digbench-scaling/lcm1_unwindbound10.c +++ b/c/nla-digbench-scaling/lcm1_unwindbound10.c @@ -4,7 +4,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "lcm1.c", 8, "reach_error"); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/lcm1_unwindbound10.yml b/c/nla-digbench-scaling/lcm1_unwindbound10.yml index b19134a378c..38e2a01a260 100644 --- a/c/nla-digbench-scaling/lcm1_unwindbound10.yml +++ b/c/nla-digbench-scaling/lcm1_unwindbound10.yml @@ -2,6 +2,8 @@ format_version: '2.0' input_files: 'lcm1_unwindbound10.c' properties: - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp expected_verdict: true options: diff --git a/c/nla-digbench-scaling/lcm1_unwindbound100.c b/c/nla-digbench-scaling/lcm1_unwindbound100.c index 2f94e298012..f3c4637533d 100644 --- a/c/nla-digbench-scaling/lcm1_unwindbound100.c +++ b/c/nla-digbench-scaling/lcm1_unwindbound100.c @@ -4,7 +4,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "lcm1.c", 8, "reach_error"); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/lcm1_unwindbound100.yml b/c/nla-digbench-scaling/lcm1_unwindbound100.yml index 557a947046d..93ce2046877 100644 --- a/c/nla-digbench-scaling/lcm1_unwindbound100.yml +++ b/c/nla-digbench-scaling/lcm1_unwindbound100.yml @@ -2,6 +2,8 @@ format_version: '2.0' input_files: 'lcm1_unwindbound100.c' properties: - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp expected_verdict: true options: diff --git a/c/nla-digbench-scaling/lcm1_unwindbound2.c b/c/nla-digbench-scaling/lcm1_unwindbound2.c index 6cce8b6c1ac..d4be18e1aec 100644 --- a/c/nla-digbench-scaling/lcm1_unwindbound2.c +++ b/c/nla-digbench-scaling/lcm1_unwindbound2.c @@ -4,7 +4,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "lcm1.c", 8, "reach_error"); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/lcm1_unwindbound2.yml b/c/nla-digbench-scaling/lcm1_unwindbound2.yml index 19e5f648301..e1f309e811e 100644 --- a/c/nla-digbench-scaling/lcm1_unwindbound2.yml +++ b/c/nla-digbench-scaling/lcm1_unwindbound2.yml @@ -2,6 +2,8 @@ format_version: '2.0' input_files: 'lcm1_unwindbound2.c' properties: - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp expected_verdict: true options: diff --git a/c/nla-digbench-scaling/lcm1_unwindbound20.c b/c/nla-digbench-scaling/lcm1_unwindbound20.c index e47c4ce5a9b..341e0506e26 100644 --- a/c/nla-digbench-scaling/lcm1_unwindbound20.c +++ b/c/nla-digbench-scaling/lcm1_unwindbound20.c @@ -4,7 +4,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "lcm1.c", 8, "reach_error"); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/lcm1_unwindbound20.yml b/c/nla-digbench-scaling/lcm1_unwindbound20.yml index fbf31016795..077fe65a0e0 100644 --- a/c/nla-digbench-scaling/lcm1_unwindbound20.yml +++ b/c/nla-digbench-scaling/lcm1_unwindbound20.yml @@ -2,6 +2,8 @@ format_version: '2.0' input_files: 'lcm1_unwindbound20.c' properties: - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp expected_verdict: true options: diff --git a/c/nla-digbench-scaling/lcm1_unwindbound5.c b/c/nla-digbench-scaling/lcm1_unwindbound5.c index a0c4f0bc8a9..fc6e9e1413a 100644 --- a/c/nla-digbench-scaling/lcm1_unwindbound5.c +++ b/c/nla-digbench-scaling/lcm1_unwindbound5.c @@ -4,7 +4,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "lcm1.c", 8, "reach_error"); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/lcm1_unwindbound5.yml b/c/nla-digbench-scaling/lcm1_unwindbound5.yml index 091ac5042b0..6e1750eae8c 100644 --- a/c/nla-digbench-scaling/lcm1_unwindbound5.yml +++ b/c/nla-digbench-scaling/lcm1_unwindbound5.yml @@ -2,6 +2,8 @@ format_version: '2.0' input_files: 'lcm1_unwindbound5.c' properties: - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp expected_verdict: true options: diff --git a/c/nla-digbench-scaling/lcm1_unwindbound50.c b/c/nla-digbench-scaling/lcm1_unwindbound50.c index d696559cebc..6884bdc5dbc 100644 --- a/c/nla-digbench-scaling/lcm1_unwindbound50.c +++ b/c/nla-digbench-scaling/lcm1_unwindbound50.c @@ -4,7 +4,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "lcm1.c", 8, "reach_error"); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/lcm1_unwindbound50.yml b/c/nla-digbench-scaling/lcm1_unwindbound50.yml index 10d915ab5b7..03605f4de20 100644 --- a/c/nla-digbench-scaling/lcm1_unwindbound50.yml +++ b/c/nla-digbench-scaling/lcm1_unwindbound50.yml @@ -2,6 +2,8 @@ format_version: '2.0' input_files: 'lcm1_unwindbound50.c' properties: - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp expected_verdict: true options: diff --git a/c/nla-digbench-scaling/lcm1_valuebound1.c b/c/nla-digbench-scaling/lcm1_valuebound1.c index 66b87177f8a..5151f9e5362 100644 --- a/c/nla-digbench-scaling/lcm1_valuebound1.c +++ b/c/nla-digbench-scaling/lcm1_valuebound1.c @@ -4,7 +4,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "lcm1.c", 8, "reach_error"); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -22,9 +23,9 @@ int main() { unsigned a, b; unsigned x, y, u, v; a = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(a>0 && a<=1); + assume_abort_if_not(a>=0 && a<=1); b = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(b>0 && b<=1); + assume_abort_if_not(b>=0 && b<=1); assume_abort_if_not(a >= 1); //infinite loop if remove assume_abort_if_not(b >= 1); diff --git a/c/nla-digbench-scaling/lcm1_valuebound1.yml b/c/nla-digbench-scaling/lcm1_valuebound1.yml index 3ecad3a7523..10547e62c14 100644 --- a/c/nla-digbench-scaling/lcm1_valuebound1.yml +++ b/c/nla-digbench-scaling/lcm1_valuebound1.yml @@ -3,6 +3,8 @@ input_files: 'lcm1_valuebound1.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/lcm1_valuebound10.c b/c/nla-digbench-scaling/lcm1_valuebound10.c index 03ad921e4f1..27bfbba2126 100644 --- a/c/nla-digbench-scaling/lcm1_valuebound10.c +++ b/c/nla-digbench-scaling/lcm1_valuebound10.c @@ -4,7 +4,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "lcm1.c", 8, "reach_error"); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -22,9 +23,9 @@ int main() { unsigned a, b; unsigned x, y, u, v; a = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(a>0 && a<=10); + assume_abort_if_not(a>=0 && a<=10); b = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(b>0 && b<=10); + assume_abort_if_not(b>=0 && b<=10); assume_abort_if_not(a >= 1); //infinite loop if remove assume_abort_if_not(b >= 1); diff --git a/c/nla-digbench-scaling/lcm1_valuebound10.yml b/c/nla-digbench-scaling/lcm1_valuebound10.yml index 6fdf9c78d3a..27b9cdb3192 100644 --- a/c/nla-digbench-scaling/lcm1_valuebound10.yml +++ b/c/nla-digbench-scaling/lcm1_valuebound10.yml @@ -3,6 +3,8 @@ input_files: 'lcm1_valuebound10.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/lcm1_valuebound100.c b/c/nla-digbench-scaling/lcm1_valuebound100.c index 29372c96bfe..9f4ccddd19a 100644 --- a/c/nla-digbench-scaling/lcm1_valuebound100.c +++ b/c/nla-digbench-scaling/lcm1_valuebound100.c @@ -4,7 +4,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "lcm1.c", 8, "reach_error"); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -22,9 +23,9 @@ int main() { unsigned a, b; unsigned x, y, u, v; a = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(a>0 && a<=100); + assume_abort_if_not(a>=0 && a<=100); b = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(b>0 && b<=100); + assume_abort_if_not(b>=0 && b<=100); assume_abort_if_not(a >= 1); //infinite loop if remove assume_abort_if_not(b >= 1); diff --git a/c/nla-digbench-scaling/lcm1_valuebound100.yml b/c/nla-digbench-scaling/lcm1_valuebound100.yml index 3c29e52b5de..cde1aa47b68 100644 --- a/c/nla-digbench-scaling/lcm1_valuebound100.yml +++ b/c/nla-digbench-scaling/lcm1_valuebound100.yml @@ -3,6 +3,8 @@ input_files: 'lcm1_valuebound100.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/lcm1_valuebound2.c b/c/nla-digbench-scaling/lcm1_valuebound2.c index 43c551a7c7d..edf14a5169a 100644 --- a/c/nla-digbench-scaling/lcm1_valuebound2.c +++ b/c/nla-digbench-scaling/lcm1_valuebound2.c @@ -4,7 +4,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "lcm1.c", 8, "reach_error"); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -22,9 +23,9 @@ int main() { unsigned a, b; unsigned x, y, u, v; a = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(a>0 && a<=2); + assume_abort_if_not(a>=0 && a<=2); b = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(b>0 && b<=2); + assume_abort_if_not(b>=0 && b<=2); assume_abort_if_not(a >= 1); //infinite loop if remove assume_abort_if_not(b >= 1); diff --git a/c/nla-digbench-scaling/lcm1_valuebound2.yml b/c/nla-digbench-scaling/lcm1_valuebound2.yml index d6d0b9f0c98..778bd182ad6 100644 --- a/c/nla-digbench-scaling/lcm1_valuebound2.yml +++ b/c/nla-digbench-scaling/lcm1_valuebound2.yml @@ -3,6 +3,8 @@ input_files: 'lcm1_valuebound2.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/lcm1_valuebound20.c b/c/nla-digbench-scaling/lcm1_valuebound20.c index fb86bfef25f..cb53615fdb7 100644 --- a/c/nla-digbench-scaling/lcm1_valuebound20.c +++ b/c/nla-digbench-scaling/lcm1_valuebound20.c @@ -4,7 +4,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "lcm1.c", 8, "reach_error"); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -22,9 +23,9 @@ int main() { unsigned a, b; unsigned x, y, u, v; a = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(a>0 && a<=20); + assume_abort_if_not(a>=0 && a<=20); b = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(b>0 && b<=20); + assume_abort_if_not(b>=0 && b<=20); assume_abort_if_not(a >= 1); //infinite loop if remove assume_abort_if_not(b >= 1); diff --git a/c/nla-digbench-scaling/lcm1_valuebound20.yml b/c/nla-digbench-scaling/lcm1_valuebound20.yml index 4b8abf3fff2..9e9ce1b5c7d 100644 --- a/c/nla-digbench-scaling/lcm1_valuebound20.yml +++ b/c/nla-digbench-scaling/lcm1_valuebound20.yml @@ -3,6 +3,8 @@ input_files: 'lcm1_valuebound20.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/lcm1_valuebound5.c b/c/nla-digbench-scaling/lcm1_valuebound5.c index 07e342b9d98..ac37b30ee3d 100644 --- a/c/nla-digbench-scaling/lcm1_valuebound5.c +++ b/c/nla-digbench-scaling/lcm1_valuebound5.c @@ -4,7 +4,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "lcm1.c", 8, "reach_error"); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -22,9 +23,9 @@ int main() { unsigned a, b; unsigned x, y, u, v; a = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(a>0 && a<=5); + assume_abort_if_not(a>=0 && a<=5); b = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(b>0 && b<=5); + assume_abort_if_not(b>=0 && b<=5); assume_abort_if_not(a >= 1); //infinite loop if remove assume_abort_if_not(b >= 1); diff --git a/c/nla-digbench-scaling/lcm1_valuebound5.yml b/c/nla-digbench-scaling/lcm1_valuebound5.yml index af2f0e1ce8a..da921b98d52 100644 --- a/c/nla-digbench-scaling/lcm1_valuebound5.yml +++ b/c/nla-digbench-scaling/lcm1_valuebound5.yml @@ -3,6 +3,8 @@ input_files: 'lcm1_valuebound5.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/lcm1_valuebound50.c b/c/nla-digbench-scaling/lcm1_valuebound50.c index 2cb3f568236..00c3eae7986 100644 --- a/c/nla-digbench-scaling/lcm1_valuebound50.c +++ b/c/nla-digbench-scaling/lcm1_valuebound50.c @@ -4,7 +4,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "lcm1.c", 8, "reach_error"); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -22,9 +23,9 @@ int main() { unsigned a, b; unsigned x, y, u, v; a = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(a>0 && a<=50); + assume_abort_if_not(a>=0 && a<=50); b = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(b>0 && b<=50); + assume_abort_if_not(b>=0 && b<=50); assume_abort_if_not(a >= 1); //infinite loop if remove assume_abort_if_not(b >= 1); diff --git a/c/nla-digbench-scaling/lcm1_valuebound50.yml b/c/nla-digbench-scaling/lcm1_valuebound50.yml index 335c263e05e..5e3d9f73d77 100644 --- a/c/nla-digbench-scaling/lcm1_valuebound50.yml +++ b/c/nla-digbench-scaling/lcm1_valuebound50.yml @@ -3,6 +3,8 @@ input_files: 'lcm1_valuebound50.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/lcm2_unwindbound1.c b/c/nla-digbench-scaling/lcm2_unwindbound1.c index dfe7ee34eb4..42ef03790fa 100644 --- a/c/nla-digbench-scaling/lcm2_unwindbound1.c +++ b/c/nla-digbench-scaling/lcm2_unwindbound1.c @@ -1,7 +1,8 @@ /* Algorithm for computing simultaneously the GCD and the LCM, by Dijkstra */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "lcm2.c", 5, "reach_error"); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -17,8 +18,8 @@ void __VERIFIER_assert(int cond) { int counter = 0; int main() { - int a, b; - int x, y, u, v; + unsigned a, b; + unsigned x, y, u, v; a = __VERIFIER_nondet_unsigned_int(); b = __VERIFIER_nondet_unsigned_int(); assume_abort_if_not(a >= 1); //inf loop if remove diff --git a/c/nla-digbench-scaling/lcm2_unwindbound1.yml b/c/nla-digbench-scaling/lcm2_unwindbound1.yml index 8072fd0b221..577a82350f6 100644 --- a/c/nla-digbench-scaling/lcm2_unwindbound1.yml +++ b/c/nla-digbench-scaling/lcm2_unwindbound1.yml @@ -3,6 +3,8 @@ input_files: 'lcm2_unwindbound1.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/lcm2_unwindbound10.c b/c/nla-digbench-scaling/lcm2_unwindbound10.c index b301e11434f..04a8e9505f8 100644 --- a/c/nla-digbench-scaling/lcm2_unwindbound10.c +++ b/c/nla-digbench-scaling/lcm2_unwindbound10.c @@ -1,7 +1,8 @@ /* Algorithm for computing simultaneously the GCD and the LCM, by Dijkstra */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "lcm2.c", 5, "reach_error"); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -17,8 +18,8 @@ void __VERIFIER_assert(int cond) { int counter = 0; int main() { - int a, b; - int x, y, u, v; + unsigned a, b; + unsigned x, y, u, v; a = __VERIFIER_nondet_unsigned_int(); b = __VERIFIER_nondet_unsigned_int(); assume_abort_if_not(a >= 1); //inf loop if remove diff --git a/c/nla-digbench-scaling/lcm2_unwindbound10.yml b/c/nla-digbench-scaling/lcm2_unwindbound10.yml index 5d8db95ba35..411d39c73e6 100644 --- a/c/nla-digbench-scaling/lcm2_unwindbound10.yml +++ b/c/nla-digbench-scaling/lcm2_unwindbound10.yml @@ -3,6 +3,8 @@ input_files: 'lcm2_unwindbound10.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/lcm2_unwindbound100.c b/c/nla-digbench-scaling/lcm2_unwindbound100.c index 25b6808cb6c..d95de1c8f26 100644 --- a/c/nla-digbench-scaling/lcm2_unwindbound100.c +++ b/c/nla-digbench-scaling/lcm2_unwindbound100.c @@ -1,7 +1,8 @@ /* Algorithm for computing simultaneously the GCD and the LCM, by Dijkstra */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "lcm2.c", 5, "reach_error"); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -17,8 +18,8 @@ void __VERIFIER_assert(int cond) { int counter = 0; int main() { - int a, b; - int x, y, u, v; + unsigned a, b; + unsigned x, y, u, v; a = __VERIFIER_nondet_unsigned_int(); b = __VERIFIER_nondet_unsigned_int(); assume_abort_if_not(a >= 1); //inf loop if remove diff --git a/c/nla-digbench-scaling/lcm2_unwindbound100.yml b/c/nla-digbench-scaling/lcm2_unwindbound100.yml index 8202a8b128c..082f8975245 100644 --- a/c/nla-digbench-scaling/lcm2_unwindbound100.yml +++ b/c/nla-digbench-scaling/lcm2_unwindbound100.yml @@ -3,6 +3,8 @@ input_files: 'lcm2_unwindbound100.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/lcm2_unwindbound2.c b/c/nla-digbench-scaling/lcm2_unwindbound2.c index d5be854dda2..a5018e6f0d0 100644 --- a/c/nla-digbench-scaling/lcm2_unwindbound2.c +++ b/c/nla-digbench-scaling/lcm2_unwindbound2.c @@ -1,7 +1,8 @@ /* Algorithm for computing simultaneously the GCD and the LCM, by Dijkstra */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "lcm2.c", 5, "reach_error"); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -17,8 +18,8 @@ void __VERIFIER_assert(int cond) { int counter = 0; int main() { - int a, b; - int x, y, u, v; + unsigned a, b; + unsigned x, y, u, v; a = __VERIFIER_nondet_unsigned_int(); b = __VERIFIER_nondet_unsigned_int(); assume_abort_if_not(a >= 1); //inf loop if remove diff --git a/c/nla-digbench-scaling/lcm2_unwindbound2.yml b/c/nla-digbench-scaling/lcm2_unwindbound2.yml index 94fe6e84f24..e2934ad7f1e 100644 --- a/c/nla-digbench-scaling/lcm2_unwindbound2.yml +++ b/c/nla-digbench-scaling/lcm2_unwindbound2.yml @@ -3,6 +3,8 @@ input_files: 'lcm2_unwindbound2.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/lcm2_unwindbound20.c b/c/nla-digbench-scaling/lcm2_unwindbound20.c index e8a0d84f689..8e27e83065a 100644 --- a/c/nla-digbench-scaling/lcm2_unwindbound20.c +++ b/c/nla-digbench-scaling/lcm2_unwindbound20.c @@ -1,7 +1,8 @@ /* Algorithm for computing simultaneously the GCD and the LCM, by Dijkstra */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "lcm2.c", 5, "reach_error"); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -17,8 +18,8 @@ void __VERIFIER_assert(int cond) { int counter = 0; int main() { - int a, b; - int x, y, u, v; + unsigned a, b; + unsigned x, y, u, v; a = __VERIFIER_nondet_unsigned_int(); b = __VERIFIER_nondet_unsigned_int(); assume_abort_if_not(a >= 1); //inf loop if remove diff --git a/c/nla-digbench-scaling/lcm2_unwindbound20.yml b/c/nla-digbench-scaling/lcm2_unwindbound20.yml index 6bcabf77f90..f72f0b7e3fa 100644 --- a/c/nla-digbench-scaling/lcm2_unwindbound20.yml +++ b/c/nla-digbench-scaling/lcm2_unwindbound20.yml @@ -3,6 +3,8 @@ input_files: 'lcm2_unwindbound20.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/lcm2_unwindbound5.c b/c/nla-digbench-scaling/lcm2_unwindbound5.c index e847078f6fa..4cbb1045f55 100644 --- a/c/nla-digbench-scaling/lcm2_unwindbound5.c +++ b/c/nla-digbench-scaling/lcm2_unwindbound5.c @@ -1,7 +1,8 @@ /* Algorithm for computing simultaneously the GCD and the LCM, by Dijkstra */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "lcm2.c", 5, "reach_error"); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -17,8 +18,8 @@ void __VERIFIER_assert(int cond) { int counter = 0; int main() { - int a, b; - int x, y, u, v; + unsigned a, b; + unsigned x, y, u, v; a = __VERIFIER_nondet_unsigned_int(); b = __VERIFIER_nondet_unsigned_int(); assume_abort_if_not(a >= 1); //inf loop if remove diff --git a/c/nla-digbench-scaling/lcm2_unwindbound5.yml b/c/nla-digbench-scaling/lcm2_unwindbound5.yml index 3e2c905cbde..a9203d37f8e 100644 --- a/c/nla-digbench-scaling/lcm2_unwindbound5.yml +++ b/c/nla-digbench-scaling/lcm2_unwindbound5.yml @@ -3,6 +3,8 @@ input_files: 'lcm2_unwindbound5.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/lcm2_unwindbound50.c b/c/nla-digbench-scaling/lcm2_unwindbound50.c index 4d1a6536a9b..ee300ac39c0 100644 --- a/c/nla-digbench-scaling/lcm2_unwindbound50.c +++ b/c/nla-digbench-scaling/lcm2_unwindbound50.c @@ -1,7 +1,8 @@ /* Algorithm for computing simultaneously the GCD and the LCM, by Dijkstra */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "lcm2.c", 5, "reach_error"); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -17,8 +18,8 @@ void __VERIFIER_assert(int cond) { int counter = 0; int main() { - int a, b; - int x, y, u, v; + unsigned a, b; + unsigned x, y, u, v; a = __VERIFIER_nondet_unsigned_int(); b = __VERIFIER_nondet_unsigned_int(); assume_abort_if_not(a >= 1); //inf loop if remove diff --git a/c/nla-digbench-scaling/lcm2_unwindbound50.yml b/c/nla-digbench-scaling/lcm2_unwindbound50.yml index e6f08e0199d..617adeae658 100644 --- a/c/nla-digbench-scaling/lcm2_unwindbound50.yml +++ b/c/nla-digbench-scaling/lcm2_unwindbound50.yml @@ -3,6 +3,8 @@ input_files: 'lcm2_unwindbound50.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/lcm2_valuebound1.c b/c/nla-digbench-scaling/lcm2_valuebound1.c index a3299041d58..3fcce0293bf 100644 --- a/c/nla-digbench-scaling/lcm2_valuebound1.c +++ b/c/nla-digbench-scaling/lcm2_valuebound1.c @@ -1,7 +1,8 @@ /* Algorithm for computing simultaneously the GCD and the LCM, by Dijkstra */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "lcm2.c", 5, "reach_error"); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -16,12 +17,12 @@ void __VERIFIER_assert(int cond) { } int main() { - int a, b; - int x, y, u, v; + unsigned a, b; + unsigned x, y, u, v; a = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(a>0 && a<=1); + assume_abort_if_not(a>=0 && a<=1); b = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(b>0 && b<=1); + assume_abort_if_not(b>=0 && b<=1); assume_abort_if_not(a >= 1); //inf loop if remove assume_abort_if_not(b >= 1); diff --git a/c/nla-digbench-scaling/lcm2_valuebound1.yml b/c/nla-digbench-scaling/lcm2_valuebound1.yml index d274322500d..37c2e53ef49 100644 --- a/c/nla-digbench-scaling/lcm2_valuebound1.yml +++ b/c/nla-digbench-scaling/lcm2_valuebound1.yml @@ -3,6 +3,8 @@ input_files: 'lcm2_valuebound1.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/lcm2_valuebound10.c b/c/nla-digbench-scaling/lcm2_valuebound10.c index 4b11aa7087a..ef756a31b19 100644 --- a/c/nla-digbench-scaling/lcm2_valuebound10.c +++ b/c/nla-digbench-scaling/lcm2_valuebound10.c @@ -1,7 +1,8 @@ /* Algorithm for computing simultaneously the GCD and the LCM, by Dijkstra */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "lcm2.c", 5, "reach_error"); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -16,12 +17,12 @@ void __VERIFIER_assert(int cond) { } int main() { - int a, b; - int x, y, u, v; + unsigned a, b; + unsigned x, y, u, v; a = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(a>0 && a<=10); + assume_abort_if_not(a>=0 && a<=10); b = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(b>0 && b<=10); + assume_abort_if_not(b>=0 && b<=10); assume_abort_if_not(a >= 1); //inf loop if remove assume_abort_if_not(b >= 1); diff --git a/c/nla-digbench-scaling/lcm2_valuebound10.yml b/c/nla-digbench-scaling/lcm2_valuebound10.yml index 2502e60ad3b..e7c9e06a44d 100644 --- a/c/nla-digbench-scaling/lcm2_valuebound10.yml +++ b/c/nla-digbench-scaling/lcm2_valuebound10.yml @@ -3,6 +3,8 @@ input_files: 'lcm2_valuebound10.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/lcm2_valuebound100.c b/c/nla-digbench-scaling/lcm2_valuebound100.c index 3631e8061bd..380e56fccf4 100644 --- a/c/nla-digbench-scaling/lcm2_valuebound100.c +++ b/c/nla-digbench-scaling/lcm2_valuebound100.c @@ -1,7 +1,8 @@ /* Algorithm for computing simultaneously the GCD and the LCM, by Dijkstra */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "lcm2.c", 5, "reach_error"); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -16,12 +17,12 @@ void __VERIFIER_assert(int cond) { } int main() { - int a, b; - int x, y, u, v; + unsigned a, b; + unsigned x, y, u, v; a = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(a>0 && a<=100); + assume_abort_if_not(a>=0 && a<=100); b = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(b>0 && b<=100); + assume_abort_if_not(b>=0 && b<=100); assume_abort_if_not(a >= 1); //inf loop if remove assume_abort_if_not(b >= 1); diff --git a/c/nla-digbench-scaling/lcm2_valuebound100.yml b/c/nla-digbench-scaling/lcm2_valuebound100.yml index 3b6a092a1e1..8fecd711c25 100644 --- a/c/nla-digbench-scaling/lcm2_valuebound100.yml +++ b/c/nla-digbench-scaling/lcm2_valuebound100.yml @@ -3,6 +3,8 @@ input_files: 'lcm2_valuebound100.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/lcm2_valuebound2.c b/c/nla-digbench-scaling/lcm2_valuebound2.c index 212aafcca2d..eb49c36726e 100644 --- a/c/nla-digbench-scaling/lcm2_valuebound2.c +++ b/c/nla-digbench-scaling/lcm2_valuebound2.c @@ -1,7 +1,8 @@ /* Algorithm for computing simultaneously the GCD and the LCM, by Dijkstra */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "lcm2.c", 5, "reach_error"); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -16,12 +17,12 @@ void __VERIFIER_assert(int cond) { } int main() { - int a, b; - int x, y, u, v; + unsigned a, b; + unsigned x, y, u, v; a = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(a>0 && a<=2); + assume_abort_if_not(a>=0 && a<=2); b = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(b>0 && b<=2); + assume_abort_if_not(b>=0 && b<=2); assume_abort_if_not(a >= 1); //inf loop if remove assume_abort_if_not(b >= 1); diff --git a/c/nla-digbench-scaling/lcm2_valuebound2.yml b/c/nla-digbench-scaling/lcm2_valuebound2.yml index 6addcfde474..1bb9c520903 100644 --- a/c/nla-digbench-scaling/lcm2_valuebound2.yml +++ b/c/nla-digbench-scaling/lcm2_valuebound2.yml @@ -3,6 +3,8 @@ input_files: 'lcm2_valuebound2.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/lcm2_valuebound20.c b/c/nla-digbench-scaling/lcm2_valuebound20.c index ec9e85650eb..9732d22dd13 100644 --- a/c/nla-digbench-scaling/lcm2_valuebound20.c +++ b/c/nla-digbench-scaling/lcm2_valuebound20.c @@ -1,7 +1,8 @@ /* Algorithm for computing simultaneously the GCD and the LCM, by Dijkstra */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "lcm2.c", 5, "reach_error"); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -16,12 +17,12 @@ void __VERIFIER_assert(int cond) { } int main() { - int a, b; - int x, y, u, v; + unsigned a, b; + unsigned x, y, u, v; a = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(a>0 && a<=20); + assume_abort_if_not(a>=0 && a<=20); b = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(b>0 && b<=20); + assume_abort_if_not(b>=0 && b<=20); assume_abort_if_not(a >= 1); //inf loop if remove assume_abort_if_not(b >= 1); diff --git a/c/nla-digbench-scaling/lcm2_valuebound20.yml b/c/nla-digbench-scaling/lcm2_valuebound20.yml index 334e310490a..29be4cc9bb7 100644 --- a/c/nla-digbench-scaling/lcm2_valuebound20.yml +++ b/c/nla-digbench-scaling/lcm2_valuebound20.yml @@ -3,6 +3,8 @@ input_files: 'lcm2_valuebound20.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/lcm2_valuebound5.c b/c/nla-digbench-scaling/lcm2_valuebound5.c index fe53cc3e1fd..ade62bf75a9 100644 --- a/c/nla-digbench-scaling/lcm2_valuebound5.c +++ b/c/nla-digbench-scaling/lcm2_valuebound5.c @@ -1,7 +1,8 @@ /* Algorithm for computing simultaneously the GCD and the LCM, by Dijkstra */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "lcm2.c", 5, "reach_error"); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -16,12 +17,12 @@ void __VERIFIER_assert(int cond) { } int main() { - int a, b; - int x, y, u, v; + unsigned a, b; + unsigned x, y, u, v; a = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(a>0 && a<=5); + assume_abort_if_not(a>=0 && a<=5); b = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(b>0 && b<=5); + assume_abort_if_not(b>=0 && b<=5); assume_abort_if_not(a >= 1); //inf loop if remove assume_abort_if_not(b >= 1); diff --git a/c/nla-digbench-scaling/lcm2_valuebound5.yml b/c/nla-digbench-scaling/lcm2_valuebound5.yml index 4289c22eab7..0488d4da3fc 100644 --- a/c/nla-digbench-scaling/lcm2_valuebound5.yml +++ b/c/nla-digbench-scaling/lcm2_valuebound5.yml @@ -3,6 +3,8 @@ input_files: 'lcm2_valuebound5.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/lcm2_valuebound50.c b/c/nla-digbench-scaling/lcm2_valuebound50.c index 8369425c2e1..b8e00733f18 100644 --- a/c/nla-digbench-scaling/lcm2_valuebound50.c +++ b/c/nla-digbench-scaling/lcm2_valuebound50.c @@ -1,7 +1,8 @@ /* Algorithm for computing simultaneously the GCD and the LCM, by Dijkstra */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "lcm2.c", 5, "reach_error"); } extern unsigned __VERIFIER_nondet_unsigned_int(void); extern void abort(void); void assume_abort_if_not(int cond) { @@ -16,12 +17,12 @@ void __VERIFIER_assert(int cond) { } int main() { - int a, b; - int x, y, u, v; + unsigned a, b; + unsigned x, y, u, v; a = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(a>0 && a<=50); + assume_abort_if_not(a>=0 && a<=50); b = __VERIFIER_nondet_unsigned_int(); - assume_abort_if_not(b>0 && b<=50); + assume_abort_if_not(b>=0 && b<=50); assume_abort_if_not(a >= 1); //inf loop if remove assume_abort_if_not(b >= 1); diff --git a/c/nla-digbench-scaling/lcm2_valuebound50.yml b/c/nla-digbench-scaling/lcm2_valuebound50.yml index 7ebcc20adfd..bad80e2d14f 100644 --- a/c/nla-digbench-scaling/lcm2_valuebound50.yml +++ b/c/nla-digbench-scaling/lcm2_valuebound50.yml @@ -3,6 +3,8 @@ input_files: 'lcm2_valuebound50.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/mannadiv_unwindbound1.c b/c/nla-digbench-scaling/mannadiv_unwindbound1.c index 03f24239dda..0f6cdea6169 100644 --- a/c/nla-digbench-scaling/mannadiv_unwindbound1.c +++ b/c/nla-digbench-scaling/mannadiv_unwindbound1.c @@ -5,7 +5,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "mannadiv.c", 9, "reach_error"); } extern int __VERIFIER_nondet_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/mannadiv_unwindbound1.yml b/c/nla-digbench-scaling/mannadiv_unwindbound1.yml index fdd510df0c8..39d94eaa9b6 100644 --- a/c/nla-digbench-scaling/mannadiv_unwindbound1.yml +++ b/c/nla-digbench-scaling/mannadiv_unwindbound1.yml @@ -3,6 +3,8 @@ input_files: 'mannadiv_unwindbound1.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/mannadiv_unwindbound10.c b/c/nla-digbench-scaling/mannadiv_unwindbound10.c index 802ce3fa3aa..0237df2b615 100644 --- a/c/nla-digbench-scaling/mannadiv_unwindbound10.c +++ b/c/nla-digbench-scaling/mannadiv_unwindbound10.c @@ -5,7 +5,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "mannadiv.c", 9, "reach_error"); } extern int __VERIFIER_nondet_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/mannadiv_unwindbound10.yml b/c/nla-digbench-scaling/mannadiv_unwindbound10.yml index bec03fb0372..197bee28ac2 100644 --- a/c/nla-digbench-scaling/mannadiv_unwindbound10.yml +++ b/c/nla-digbench-scaling/mannadiv_unwindbound10.yml @@ -3,6 +3,8 @@ input_files: 'mannadiv_unwindbound10.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/mannadiv_unwindbound100.c b/c/nla-digbench-scaling/mannadiv_unwindbound100.c index a2df5e204d5..82edcada97a 100644 --- a/c/nla-digbench-scaling/mannadiv_unwindbound100.c +++ b/c/nla-digbench-scaling/mannadiv_unwindbound100.c @@ -5,7 +5,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "mannadiv.c", 9, "reach_error"); } extern int __VERIFIER_nondet_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/mannadiv_unwindbound100.yml b/c/nla-digbench-scaling/mannadiv_unwindbound100.yml index 1f00f459939..721977d33bb 100644 --- a/c/nla-digbench-scaling/mannadiv_unwindbound100.yml +++ b/c/nla-digbench-scaling/mannadiv_unwindbound100.yml @@ -3,6 +3,8 @@ input_files: 'mannadiv_unwindbound100.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/mannadiv_unwindbound2.c b/c/nla-digbench-scaling/mannadiv_unwindbound2.c index c357eeb5149..a12d3b50777 100644 --- a/c/nla-digbench-scaling/mannadiv_unwindbound2.c +++ b/c/nla-digbench-scaling/mannadiv_unwindbound2.c @@ -5,7 +5,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "mannadiv.c", 9, "reach_error"); } extern int __VERIFIER_nondet_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/mannadiv_unwindbound2.yml b/c/nla-digbench-scaling/mannadiv_unwindbound2.yml index 0e45a492172..6a107786340 100644 --- a/c/nla-digbench-scaling/mannadiv_unwindbound2.yml +++ b/c/nla-digbench-scaling/mannadiv_unwindbound2.yml @@ -3,6 +3,8 @@ input_files: 'mannadiv_unwindbound2.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/mannadiv_unwindbound20.c b/c/nla-digbench-scaling/mannadiv_unwindbound20.c index 97e5e1f5bb0..983de41a0c0 100644 --- a/c/nla-digbench-scaling/mannadiv_unwindbound20.c +++ b/c/nla-digbench-scaling/mannadiv_unwindbound20.c @@ -5,7 +5,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "mannadiv.c", 9, "reach_error"); } extern int __VERIFIER_nondet_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/mannadiv_unwindbound20.yml b/c/nla-digbench-scaling/mannadiv_unwindbound20.yml index 6479e39c26e..8a9bdfeb456 100644 --- a/c/nla-digbench-scaling/mannadiv_unwindbound20.yml +++ b/c/nla-digbench-scaling/mannadiv_unwindbound20.yml @@ -3,6 +3,8 @@ input_files: 'mannadiv_unwindbound20.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/mannadiv_unwindbound5.c b/c/nla-digbench-scaling/mannadiv_unwindbound5.c index dc6c537df31..e5808d0f719 100644 --- a/c/nla-digbench-scaling/mannadiv_unwindbound5.c +++ b/c/nla-digbench-scaling/mannadiv_unwindbound5.c @@ -5,7 +5,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "mannadiv.c", 9, "reach_error"); } extern int __VERIFIER_nondet_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/mannadiv_unwindbound5.yml b/c/nla-digbench-scaling/mannadiv_unwindbound5.yml index 6db38936918..2d0f869ecc3 100644 --- a/c/nla-digbench-scaling/mannadiv_unwindbound5.yml +++ b/c/nla-digbench-scaling/mannadiv_unwindbound5.yml @@ -3,6 +3,8 @@ input_files: 'mannadiv_unwindbound5.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/mannadiv_unwindbound50.c b/c/nla-digbench-scaling/mannadiv_unwindbound50.c index babcc7358e8..c437904c701 100644 --- a/c/nla-digbench-scaling/mannadiv_unwindbound50.c +++ b/c/nla-digbench-scaling/mannadiv_unwindbound50.c @@ -5,7 +5,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "mannadiv.c", 9, "reach_error"); } extern int __VERIFIER_nondet_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/mannadiv_unwindbound50.yml b/c/nla-digbench-scaling/mannadiv_unwindbound50.yml index fa464ed3bf6..4665ab27b3a 100644 --- a/c/nla-digbench-scaling/mannadiv_unwindbound50.yml +++ b/c/nla-digbench-scaling/mannadiv_unwindbound50.yml @@ -3,6 +3,8 @@ input_files: 'mannadiv_unwindbound50.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/mannadiv_valuebound1.c b/c/nla-digbench-scaling/mannadiv_valuebound1.c index 33f7d3c3860..bf7e2b1c290 100644 --- a/c/nla-digbench-scaling/mannadiv_valuebound1.c +++ b/c/nla-digbench-scaling/mannadiv_valuebound1.c @@ -5,7 +5,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "mannadiv.c", 9, "reach_error"); } extern int __VERIFIER_nondet_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/mannadiv_valuebound1.yml b/c/nla-digbench-scaling/mannadiv_valuebound1.yml index 94e9b184ccb..037c495693c 100644 --- a/c/nla-digbench-scaling/mannadiv_valuebound1.yml +++ b/c/nla-digbench-scaling/mannadiv_valuebound1.yml @@ -3,6 +3,8 @@ input_files: 'mannadiv_valuebound1.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/mannadiv_valuebound10.c b/c/nla-digbench-scaling/mannadiv_valuebound10.c index 33f7d3c3860..bf7e2b1c290 100644 --- a/c/nla-digbench-scaling/mannadiv_valuebound10.c +++ b/c/nla-digbench-scaling/mannadiv_valuebound10.c @@ -5,7 +5,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "mannadiv.c", 9, "reach_error"); } extern int __VERIFIER_nondet_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/mannadiv_valuebound10.yml b/c/nla-digbench-scaling/mannadiv_valuebound10.yml index c26e046556e..dc29a9a6c2d 100644 --- a/c/nla-digbench-scaling/mannadiv_valuebound10.yml +++ b/c/nla-digbench-scaling/mannadiv_valuebound10.yml @@ -3,6 +3,8 @@ input_files: 'mannadiv_valuebound10.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/mannadiv_valuebound100.c b/c/nla-digbench-scaling/mannadiv_valuebound100.c index 33f7d3c3860..bf7e2b1c290 100644 --- a/c/nla-digbench-scaling/mannadiv_valuebound100.c +++ b/c/nla-digbench-scaling/mannadiv_valuebound100.c @@ -5,7 +5,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "mannadiv.c", 9, "reach_error"); } extern int __VERIFIER_nondet_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/mannadiv_valuebound100.yml b/c/nla-digbench-scaling/mannadiv_valuebound100.yml index 74044bd94fc..9f87d855e88 100644 --- a/c/nla-digbench-scaling/mannadiv_valuebound100.yml +++ b/c/nla-digbench-scaling/mannadiv_valuebound100.yml @@ -3,6 +3,8 @@ input_files: 'mannadiv_valuebound100.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/mannadiv_valuebound2.c b/c/nla-digbench-scaling/mannadiv_valuebound2.c index 33f7d3c3860..bf7e2b1c290 100644 --- a/c/nla-digbench-scaling/mannadiv_valuebound2.c +++ b/c/nla-digbench-scaling/mannadiv_valuebound2.c @@ -5,7 +5,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "mannadiv.c", 9, "reach_error"); } extern int __VERIFIER_nondet_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/mannadiv_valuebound2.yml b/c/nla-digbench-scaling/mannadiv_valuebound2.yml index 050b2c2bd37..dde3669ccd4 100644 --- a/c/nla-digbench-scaling/mannadiv_valuebound2.yml +++ b/c/nla-digbench-scaling/mannadiv_valuebound2.yml @@ -3,6 +3,8 @@ input_files: 'mannadiv_valuebound2.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/mannadiv_valuebound20.c b/c/nla-digbench-scaling/mannadiv_valuebound20.c index 33f7d3c3860..bf7e2b1c290 100644 --- a/c/nla-digbench-scaling/mannadiv_valuebound20.c +++ b/c/nla-digbench-scaling/mannadiv_valuebound20.c @@ -5,7 +5,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "mannadiv.c", 9, "reach_error"); } extern int __VERIFIER_nondet_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/mannadiv_valuebound20.yml b/c/nla-digbench-scaling/mannadiv_valuebound20.yml index 76b4f1ef87f..cdb4118256a 100644 --- a/c/nla-digbench-scaling/mannadiv_valuebound20.yml +++ b/c/nla-digbench-scaling/mannadiv_valuebound20.yml @@ -3,6 +3,8 @@ input_files: 'mannadiv_valuebound20.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/mannadiv_valuebound5.c b/c/nla-digbench-scaling/mannadiv_valuebound5.c index 33f7d3c3860..bf7e2b1c290 100644 --- a/c/nla-digbench-scaling/mannadiv_valuebound5.c +++ b/c/nla-digbench-scaling/mannadiv_valuebound5.c @@ -5,7 +5,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "mannadiv.c", 9, "reach_error"); } extern int __VERIFIER_nondet_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/mannadiv_valuebound5.yml b/c/nla-digbench-scaling/mannadiv_valuebound5.yml index bec41d1a47d..13c47aa81b6 100644 --- a/c/nla-digbench-scaling/mannadiv_valuebound5.yml +++ b/c/nla-digbench-scaling/mannadiv_valuebound5.yml @@ -3,6 +3,8 @@ input_files: 'mannadiv_valuebound5.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/mannadiv_valuebound50.c b/c/nla-digbench-scaling/mannadiv_valuebound50.c index 33f7d3c3860..bf7e2b1c290 100644 --- a/c/nla-digbench-scaling/mannadiv_valuebound50.c +++ b/c/nla-digbench-scaling/mannadiv_valuebound50.c @@ -5,7 +5,8 @@ */ extern void abort(void); -void reach_error(){} +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "mannadiv.c", 9, "reach_error"); } extern int __VERIFIER_nondet_int(void); extern void abort(void); void assume_abort_if_not(int cond) { diff --git a/c/nla-digbench-scaling/mannadiv_valuebound50.yml b/c/nla-digbench-scaling/mannadiv_valuebound50.yml index f8e5a5f8c34..5138ec688c0 100644 --- a/c/nla-digbench-scaling/mannadiv_valuebound50.yml +++ b/c/nla-digbench-scaling/mannadiv_valuebound50.yml @@ -3,6 +3,8 @@ input_files: 'mannadiv_valuebound50.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench-scaling/prod4br-ll_unwindbound1.c b/c/nla-digbench-scaling/prod4br-ll_unwindbound1.c new file mode 100644 index 00000000000..122083724b7 --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_unwindbound1.c @@ -0,0 +1,59 @@ +/* algorithm for computing the product of two natural numbers */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "prod4br-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int x, y; + long long a, b, p, q; + + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + + while (counter++<1) { + __VERIFIER_assert(q + a * b * p == (long long) x * y); + + if (!(a != 0 && b != 0)) + break; + + if (a % 2 == 0 && b % 2 == 0) { + a = a / 2; + b = b / 2; + p = 4 * p; + } else if (a % 2 == 1 && b % 2 == 0) { + a = a - 1; + q = q + b * p; + } else if (a % 2 == 0 && b % 2 == 1) { + b = b - 1; + q = q + a * p; + } else { + a = a - 1; + b = b - 1; + q = q + (a + b + 1) * p; /*fix a bug here--- was (a+b-1)*/ + } + } + + __VERIFIER_assert(q == (long long) x * y); + __VERIFIER_assert(a * b == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/prod4br-ll_unwindbound1.yml b/c/nla-digbench-scaling/prod4br-ll_unwindbound1.yml new file mode 100644 index 00000000000..8e6c037d2f7 --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_unwindbound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'prod4br-ll_unwindbound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/prod4br-ll_unwindbound10.c b/c/nla-digbench-scaling/prod4br-ll_unwindbound10.c new file mode 100644 index 00000000000..0117513b30c --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_unwindbound10.c @@ -0,0 +1,59 @@ +/* algorithm for computing the product of two natural numbers */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "prod4br-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int x, y; + long long a, b, p, q; + + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + + while (counter++<10) { + __VERIFIER_assert(q + a * b * p == (long long) x * y); + + if (!(a != 0 && b != 0)) + break; + + if (a % 2 == 0 && b % 2 == 0) { + a = a / 2; + b = b / 2; + p = 4 * p; + } else if (a % 2 == 1 && b % 2 == 0) { + a = a - 1; + q = q + b * p; + } else if (a % 2 == 0 && b % 2 == 1) { + b = b - 1; + q = q + a * p; + } else { + a = a - 1; + b = b - 1; + q = q + (a + b + 1) * p; /*fix a bug here--- was (a+b-1)*/ + } + } + + __VERIFIER_assert(q == (long long) x * y); + __VERIFIER_assert(a * b == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/prod4br-ll_unwindbound10.yml b/c/nla-digbench-scaling/prod4br-ll_unwindbound10.yml new file mode 100644 index 00000000000..2e488266d95 --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_unwindbound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'prod4br-ll_unwindbound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/prod4br-ll_unwindbound100.c b/c/nla-digbench-scaling/prod4br-ll_unwindbound100.c new file mode 100644 index 00000000000..8772b09e10a --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_unwindbound100.c @@ -0,0 +1,59 @@ +/* algorithm for computing the product of two natural numbers */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "prod4br-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int x, y; + long long a, b, p, q; + + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + + while (counter++<100) { + __VERIFIER_assert(q + a * b * p == (long long) x * y); + + if (!(a != 0 && b != 0)) + break; + + if (a % 2 == 0 && b % 2 == 0) { + a = a / 2; + b = b / 2; + p = 4 * p; + } else if (a % 2 == 1 && b % 2 == 0) { + a = a - 1; + q = q + b * p; + } else if (a % 2 == 0 && b % 2 == 1) { + b = b - 1; + q = q + a * p; + } else { + a = a - 1; + b = b - 1; + q = q + (a + b + 1) * p; /*fix a bug here--- was (a+b-1)*/ + } + } + + __VERIFIER_assert(q == (long long) x * y); + __VERIFIER_assert(a * b == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/prod4br-ll_unwindbound100.yml b/c/nla-digbench-scaling/prod4br-ll_unwindbound100.yml new file mode 100644 index 00000000000..b15b28affba --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_unwindbound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'prod4br-ll_unwindbound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/prod4br-ll_unwindbound2.c b/c/nla-digbench-scaling/prod4br-ll_unwindbound2.c new file mode 100644 index 00000000000..0e6f1ede34b --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_unwindbound2.c @@ -0,0 +1,59 @@ +/* algorithm for computing the product of two natural numbers */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "prod4br-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int x, y; + long long a, b, p, q; + + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + + while (counter++<2) { + __VERIFIER_assert(q + a * b * p == (long long) x * y); + + if (!(a != 0 && b != 0)) + break; + + if (a % 2 == 0 && b % 2 == 0) { + a = a / 2; + b = b / 2; + p = 4 * p; + } else if (a % 2 == 1 && b % 2 == 0) { + a = a - 1; + q = q + b * p; + } else if (a % 2 == 0 && b % 2 == 1) { + b = b - 1; + q = q + a * p; + } else { + a = a - 1; + b = b - 1; + q = q + (a + b + 1) * p; /*fix a bug here--- was (a+b-1)*/ + } + } + + __VERIFIER_assert(q == (long long) x * y); + __VERIFIER_assert(a * b == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/prod4br-ll_unwindbound2.yml b/c/nla-digbench-scaling/prod4br-ll_unwindbound2.yml new file mode 100644 index 00000000000..f7d1fb17823 --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_unwindbound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'prod4br-ll_unwindbound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/prod4br-ll_unwindbound20.c b/c/nla-digbench-scaling/prod4br-ll_unwindbound20.c new file mode 100644 index 00000000000..df59ab1502c --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_unwindbound20.c @@ -0,0 +1,59 @@ +/* algorithm for computing the product of two natural numbers */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "prod4br-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int x, y; + long long a, b, p, q; + + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + + while (counter++<20) { + __VERIFIER_assert(q + a * b * p == (long long) x * y); + + if (!(a != 0 && b != 0)) + break; + + if (a % 2 == 0 && b % 2 == 0) { + a = a / 2; + b = b / 2; + p = 4 * p; + } else if (a % 2 == 1 && b % 2 == 0) { + a = a - 1; + q = q + b * p; + } else if (a % 2 == 0 && b % 2 == 1) { + b = b - 1; + q = q + a * p; + } else { + a = a - 1; + b = b - 1; + q = q + (a + b + 1) * p; /*fix a bug here--- was (a+b-1)*/ + } + } + + __VERIFIER_assert(q == (long long) x * y); + __VERIFIER_assert(a * b == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/prod4br-ll_unwindbound20.yml b/c/nla-digbench-scaling/prod4br-ll_unwindbound20.yml new file mode 100644 index 00000000000..024b2c464ad --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_unwindbound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'prod4br-ll_unwindbound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/prod4br-ll_unwindbound5.c b/c/nla-digbench-scaling/prod4br-ll_unwindbound5.c new file mode 100644 index 00000000000..1a9b56a2f45 --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_unwindbound5.c @@ -0,0 +1,59 @@ +/* algorithm for computing the product of two natural numbers */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "prod4br-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int x, y; + long long a, b, p, q; + + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + + while (counter++<5) { + __VERIFIER_assert(q + a * b * p == (long long) x * y); + + if (!(a != 0 && b != 0)) + break; + + if (a % 2 == 0 && b % 2 == 0) { + a = a / 2; + b = b / 2; + p = 4 * p; + } else if (a % 2 == 1 && b % 2 == 0) { + a = a - 1; + q = q + b * p; + } else if (a % 2 == 0 && b % 2 == 1) { + b = b - 1; + q = q + a * p; + } else { + a = a - 1; + b = b - 1; + q = q + (a + b + 1) * p; /*fix a bug here--- was (a+b-1)*/ + } + } + + __VERIFIER_assert(q == (long long) x * y); + __VERIFIER_assert(a * b == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/prod4br-ll_unwindbound5.yml b/c/nla-digbench-scaling/prod4br-ll_unwindbound5.yml new file mode 100644 index 00000000000..71415b1ce91 --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_unwindbound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'prod4br-ll_unwindbound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/prod4br-ll_unwindbound50.c b/c/nla-digbench-scaling/prod4br-ll_unwindbound50.c new file mode 100644 index 00000000000..9819c6aa60f --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_unwindbound50.c @@ -0,0 +1,59 @@ +/* algorithm for computing the product of two natural numbers */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "prod4br-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int x, y; + long long a, b, p, q; + + x = __VERIFIER_nondet_int(); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + + while (counter++<50) { + __VERIFIER_assert(q + a * b * p == (long long) x * y); + + if (!(a != 0 && b != 0)) + break; + + if (a % 2 == 0 && b % 2 == 0) { + a = a / 2; + b = b / 2; + p = 4 * p; + } else if (a % 2 == 1 && b % 2 == 0) { + a = a - 1; + q = q + b * p; + } else if (a % 2 == 0 && b % 2 == 1) { + b = b - 1; + q = q + a * p; + } else { + a = a - 1; + b = b - 1; + q = q + (a + b + 1) * p; /*fix a bug here--- was (a+b-1)*/ + } + } + + __VERIFIER_assert(q == (long long) x * y); + __VERIFIER_assert(a * b == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/prod4br-ll_unwindbound50.yml b/c/nla-digbench-scaling/prod4br-ll_unwindbound50.yml new file mode 100644 index 00000000000..2c9b37b9c52 --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_unwindbound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'prod4br-ll_unwindbound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/prod4br-ll_valuebound1.c b/c/nla-digbench-scaling/prod4br-ll_valuebound1.c new file mode 100644 index 00000000000..43e34c71b18 --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_valuebound1.c @@ -0,0 +1,60 @@ +/* algorithm for computing the product of two natural numbers */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "prod4br-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int x, y; + long long a, b, p, q; + + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=1); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=1); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + + while (1) { + __VERIFIER_assert(q + a * b * p == (long long) x * y); + + if (!(a != 0 && b != 0)) + break; + + if (a % 2 == 0 && b % 2 == 0) { + a = a / 2; + b = b / 2; + p = 4 * p; + } else if (a % 2 == 1 && b % 2 == 0) { + a = a - 1; + q = q + b * p; + } else if (a % 2 == 0 && b % 2 == 1) { + b = b - 1; + q = q + a * p; + } else { + a = a - 1; + b = b - 1; + q = q + (a + b + 1) * p; /*fix a bug here--- was (a+b-1)*/ + } + } + + __VERIFIER_assert(q == (long long) x * y); + __VERIFIER_assert(a * b == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/prod4br-ll_valuebound1.yml b/c/nla-digbench-scaling/prod4br-ll_valuebound1.yml new file mode 100644 index 00000000000..30891e64fb6 --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_valuebound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'prod4br-ll_valuebound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/prod4br-ll_valuebound10.c b/c/nla-digbench-scaling/prod4br-ll_valuebound10.c new file mode 100644 index 00000000000..4f8c8894661 --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_valuebound10.c @@ -0,0 +1,60 @@ +/* algorithm for computing the product of two natural numbers */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "prod4br-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int x, y; + long long a, b, p, q; + + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=10); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=10); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + + while (1) { + __VERIFIER_assert(q + a * b * p == (long long) x * y); + + if (!(a != 0 && b != 0)) + break; + + if (a % 2 == 0 && b % 2 == 0) { + a = a / 2; + b = b / 2; + p = 4 * p; + } else if (a % 2 == 1 && b % 2 == 0) { + a = a - 1; + q = q + b * p; + } else if (a % 2 == 0 && b % 2 == 1) { + b = b - 1; + q = q + a * p; + } else { + a = a - 1; + b = b - 1; + q = q + (a + b + 1) * p; /*fix a bug here--- was (a+b-1)*/ + } + } + + __VERIFIER_assert(q == (long long) x * y); + __VERIFIER_assert(a * b == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/prod4br-ll_valuebound10.yml b/c/nla-digbench-scaling/prod4br-ll_valuebound10.yml new file mode 100644 index 00000000000..5ad430ffc40 --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_valuebound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'prod4br-ll_valuebound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/prod4br-ll_valuebound100.c b/c/nla-digbench-scaling/prod4br-ll_valuebound100.c new file mode 100644 index 00000000000..08a445e9fc4 --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_valuebound100.c @@ -0,0 +1,60 @@ +/* algorithm for computing the product of two natural numbers */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "prod4br-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int x, y; + long long a, b, p, q; + + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=100); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=100); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + + while (1) { + __VERIFIER_assert(q + a * b * p == (long long) x * y); + + if (!(a != 0 && b != 0)) + break; + + if (a % 2 == 0 && b % 2 == 0) { + a = a / 2; + b = b / 2; + p = 4 * p; + } else if (a % 2 == 1 && b % 2 == 0) { + a = a - 1; + q = q + b * p; + } else if (a % 2 == 0 && b % 2 == 1) { + b = b - 1; + q = q + a * p; + } else { + a = a - 1; + b = b - 1; + q = q + (a + b + 1) * p; /*fix a bug here--- was (a+b-1)*/ + } + } + + __VERIFIER_assert(q == (long long) x * y); + __VERIFIER_assert(a * b == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/prod4br-ll_valuebound100.yml b/c/nla-digbench-scaling/prod4br-ll_valuebound100.yml new file mode 100644 index 00000000000..dc3a298cadf --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_valuebound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'prod4br-ll_valuebound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/prod4br-ll_valuebound2.c b/c/nla-digbench-scaling/prod4br-ll_valuebound2.c new file mode 100644 index 00000000000..460a0f990b0 --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_valuebound2.c @@ -0,0 +1,60 @@ +/* algorithm for computing the product of two natural numbers */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "prod4br-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int x, y; + long long a, b, p, q; + + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=2); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=2); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + + while (1) { + __VERIFIER_assert(q + a * b * p == (long long) x * y); + + if (!(a != 0 && b != 0)) + break; + + if (a % 2 == 0 && b % 2 == 0) { + a = a / 2; + b = b / 2; + p = 4 * p; + } else if (a % 2 == 1 && b % 2 == 0) { + a = a - 1; + q = q + b * p; + } else if (a % 2 == 0 && b % 2 == 1) { + b = b - 1; + q = q + a * p; + } else { + a = a - 1; + b = b - 1; + q = q + (a + b + 1) * p; /*fix a bug here--- was (a+b-1)*/ + } + } + + __VERIFIER_assert(q == (long long) x * y); + __VERIFIER_assert(a * b == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/prod4br-ll_valuebound2.yml b/c/nla-digbench-scaling/prod4br-ll_valuebound2.yml new file mode 100644 index 00000000000..9466dfe6758 --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_valuebound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'prod4br-ll_valuebound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/prod4br-ll_valuebound20.c b/c/nla-digbench-scaling/prod4br-ll_valuebound20.c new file mode 100644 index 00000000000..61113488b26 --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_valuebound20.c @@ -0,0 +1,60 @@ +/* algorithm for computing the product of two natural numbers */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "prod4br-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int x, y; + long long a, b, p, q; + + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=20); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=20); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + + while (1) { + __VERIFIER_assert(q + a * b * p == (long long) x * y); + + if (!(a != 0 && b != 0)) + break; + + if (a % 2 == 0 && b % 2 == 0) { + a = a / 2; + b = b / 2; + p = 4 * p; + } else if (a % 2 == 1 && b % 2 == 0) { + a = a - 1; + q = q + b * p; + } else if (a % 2 == 0 && b % 2 == 1) { + b = b - 1; + q = q + a * p; + } else { + a = a - 1; + b = b - 1; + q = q + (a + b + 1) * p; /*fix a bug here--- was (a+b-1)*/ + } + } + + __VERIFIER_assert(q == (long long) x * y); + __VERIFIER_assert(a * b == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/prod4br-ll_valuebound20.yml b/c/nla-digbench-scaling/prod4br-ll_valuebound20.yml new file mode 100644 index 00000000000..35dbdd99a6b --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_valuebound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'prod4br-ll_valuebound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/prod4br-ll_valuebound5.c b/c/nla-digbench-scaling/prod4br-ll_valuebound5.c new file mode 100644 index 00000000000..070ed398e6b --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_valuebound5.c @@ -0,0 +1,60 @@ +/* algorithm for computing the product of two natural numbers */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "prod4br-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int x, y; + long long a, b, p, q; + + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=5); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=5); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + + while (1) { + __VERIFIER_assert(q + a * b * p == (long long) x * y); + + if (!(a != 0 && b != 0)) + break; + + if (a % 2 == 0 && b % 2 == 0) { + a = a / 2; + b = b / 2; + p = 4 * p; + } else if (a % 2 == 1 && b % 2 == 0) { + a = a - 1; + q = q + b * p; + } else if (a % 2 == 0 && b % 2 == 1) { + b = b - 1; + q = q + a * p; + } else { + a = a - 1; + b = b - 1; + q = q + (a + b + 1) * p; /*fix a bug here--- was (a+b-1)*/ + } + } + + __VERIFIER_assert(q == (long long) x * y); + __VERIFIER_assert(a * b == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/prod4br-ll_valuebound5.yml b/c/nla-digbench-scaling/prod4br-ll_valuebound5.yml new file mode 100644 index 00000000000..b784a4b633a --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_valuebound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'prod4br-ll_valuebound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/prod4br-ll_valuebound50.c b/c/nla-digbench-scaling/prod4br-ll_valuebound50.c new file mode 100644 index 00000000000..45caf21f644 --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_valuebound50.c @@ -0,0 +1,60 @@ +/* algorithm for computing the product of two natural numbers */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "prod4br-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int x, y; + long long a, b, p, q; + + x = __VERIFIER_nondet_int(); + assume_abort_if_not(x>=0 && x<=50); + y = __VERIFIER_nondet_int(); + assume_abort_if_not(y>=0 && y<=50); + assume_abort_if_not(y >= 1); + + a = x; + b = y; + p = 1; + q = 0; + + while (1) { + __VERIFIER_assert(q + a * b * p == (long long) x * y); + + if (!(a != 0 && b != 0)) + break; + + if (a % 2 == 0 && b % 2 == 0) { + a = a / 2; + b = b / 2; + p = 4 * p; + } else if (a % 2 == 1 && b % 2 == 0) { + a = a - 1; + q = q + b * p; + } else if (a % 2 == 0 && b % 2 == 1) { + b = b - 1; + q = q + a * p; + } else { + a = a - 1; + b = b - 1; + q = q + (a + b + 1) * p; /*fix a bug here--- was (a+b-1)*/ + } + } + + __VERIFIER_assert(q == (long long) x * y); + __VERIFIER_assert(a * b == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/prod4br-ll_valuebound50.yml b/c/nla-digbench-scaling/prod4br-ll_valuebound50.yml new file mode 100644 index 00000000000..7240c6b3a4a --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_valuebound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'prod4br-ll_valuebound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/prod4br_unwindbound1.c b/c/nla-digbench-scaling/prod4br_unwindbound1.c deleted file mode 100644 index 5e66b783f7a..00000000000 --- a/c/nla-digbench-scaling/prod4br_unwindbound1.c +++ /dev/null @@ -1,58 +0,0 @@ -/* algorithm for computing the product of two natural numbers */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int x, y; - int a, b, p, q; - - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - - while (counter++<1) { - __VERIFIER_assert(q + a * b * p == x * y); - - if (!(a != 0 && b != 0)) - break; - - if (a % 2 == 0 && b % 2 == 0) { - a = a / 2; - b = b / 2; - p = 4 * p; - } else if (a % 2 == 1 && b % 2 == 0) { - a = a - 1; - q = q + b * p; - } else if (a % 2 == 0 && b % 2 == 1) { - b = b - 1; - q = q + a * p; - } else { - a = a - 1; - b = b - 1; - q = q + (a + b + 1) * p; /*fix a bug here--- was (a+b-1)*/ - } - } - - __VERIFIER_assert(q == x * y); - __VERIFIER_assert(a * b == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/prod4br_unwindbound1.yml b/c/nla-digbench-scaling/prod4br_unwindbound1.yml deleted file mode 100644 index bd24b1ad0a7..00000000000 --- a/c/nla-digbench-scaling/prod4br_unwindbound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'prod4br_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/prod4br_unwindbound10.c b/c/nla-digbench-scaling/prod4br_unwindbound10.c deleted file mode 100644 index ad726743cc5..00000000000 --- a/c/nla-digbench-scaling/prod4br_unwindbound10.c +++ /dev/null @@ -1,58 +0,0 @@ -/* algorithm for computing the product of two natural numbers */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int x, y; - int a, b, p, q; - - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - - while (counter++<10) { - __VERIFIER_assert(q + a * b * p == x * y); - - if (!(a != 0 && b != 0)) - break; - - if (a % 2 == 0 && b % 2 == 0) { - a = a / 2; - b = b / 2; - p = 4 * p; - } else if (a % 2 == 1 && b % 2 == 0) { - a = a - 1; - q = q + b * p; - } else if (a % 2 == 0 && b % 2 == 1) { - b = b - 1; - q = q + a * p; - } else { - a = a - 1; - b = b - 1; - q = q + (a + b + 1) * p; /*fix a bug here--- was (a+b-1)*/ - } - } - - __VERIFIER_assert(q == x * y); - __VERIFIER_assert(a * b == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/prod4br_unwindbound10.yml b/c/nla-digbench-scaling/prod4br_unwindbound10.yml deleted file mode 100644 index 9ecbf267f60..00000000000 --- a/c/nla-digbench-scaling/prod4br_unwindbound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'prod4br_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/prod4br_unwindbound100.c b/c/nla-digbench-scaling/prod4br_unwindbound100.c deleted file mode 100644 index 572be5905ed..00000000000 --- a/c/nla-digbench-scaling/prod4br_unwindbound100.c +++ /dev/null @@ -1,58 +0,0 @@ -/* algorithm for computing the product of two natural numbers */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int x, y; - int a, b, p, q; - - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - - while (counter++<100) { - __VERIFIER_assert(q + a * b * p == x * y); - - if (!(a != 0 && b != 0)) - break; - - if (a % 2 == 0 && b % 2 == 0) { - a = a / 2; - b = b / 2; - p = 4 * p; - } else if (a % 2 == 1 && b % 2 == 0) { - a = a - 1; - q = q + b * p; - } else if (a % 2 == 0 && b % 2 == 1) { - b = b - 1; - q = q + a * p; - } else { - a = a - 1; - b = b - 1; - q = q + (a + b + 1) * p; /*fix a bug here--- was (a+b-1)*/ - } - } - - __VERIFIER_assert(q == x * y); - __VERIFIER_assert(a * b == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/prod4br_unwindbound100.yml b/c/nla-digbench-scaling/prod4br_unwindbound100.yml deleted file mode 100644 index 3c6d3c56dcb..00000000000 --- a/c/nla-digbench-scaling/prod4br_unwindbound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'prod4br_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/prod4br_unwindbound2.c b/c/nla-digbench-scaling/prod4br_unwindbound2.c deleted file mode 100644 index 2329c89a58b..00000000000 --- a/c/nla-digbench-scaling/prod4br_unwindbound2.c +++ /dev/null @@ -1,58 +0,0 @@ -/* algorithm for computing the product of two natural numbers */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int x, y; - int a, b, p, q; - - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - - while (counter++<2) { - __VERIFIER_assert(q + a * b * p == x * y); - - if (!(a != 0 && b != 0)) - break; - - if (a % 2 == 0 && b % 2 == 0) { - a = a / 2; - b = b / 2; - p = 4 * p; - } else if (a % 2 == 1 && b % 2 == 0) { - a = a - 1; - q = q + b * p; - } else if (a % 2 == 0 && b % 2 == 1) { - b = b - 1; - q = q + a * p; - } else { - a = a - 1; - b = b - 1; - q = q + (a + b + 1) * p; /*fix a bug here--- was (a+b-1)*/ - } - } - - __VERIFIER_assert(q == x * y); - __VERIFIER_assert(a * b == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/prod4br_unwindbound2.yml b/c/nla-digbench-scaling/prod4br_unwindbound2.yml deleted file mode 100644 index 66ce6f382a6..00000000000 --- a/c/nla-digbench-scaling/prod4br_unwindbound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'prod4br_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/prod4br_unwindbound20.c b/c/nla-digbench-scaling/prod4br_unwindbound20.c deleted file mode 100644 index 9fb19ef0562..00000000000 --- a/c/nla-digbench-scaling/prod4br_unwindbound20.c +++ /dev/null @@ -1,58 +0,0 @@ -/* algorithm for computing the product of two natural numbers */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int x, y; - int a, b, p, q; - - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - - while (counter++<20) { - __VERIFIER_assert(q + a * b * p == x * y); - - if (!(a != 0 && b != 0)) - break; - - if (a % 2 == 0 && b % 2 == 0) { - a = a / 2; - b = b / 2; - p = 4 * p; - } else if (a % 2 == 1 && b % 2 == 0) { - a = a - 1; - q = q + b * p; - } else if (a % 2 == 0 && b % 2 == 1) { - b = b - 1; - q = q + a * p; - } else { - a = a - 1; - b = b - 1; - q = q + (a + b + 1) * p; /*fix a bug here--- was (a+b-1)*/ - } - } - - __VERIFIER_assert(q == x * y); - __VERIFIER_assert(a * b == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/prod4br_unwindbound20.yml b/c/nla-digbench-scaling/prod4br_unwindbound20.yml deleted file mode 100644 index 60561cb651e..00000000000 --- a/c/nla-digbench-scaling/prod4br_unwindbound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'prod4br_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/prod4br_unwindbound5.c b/c/nla-digbench-scaling/prod4br_unwindbound5.c deleted file mode 100644 index d8a42c8715c..00000000000 --- a/c/nla-digbench-scaling/prod4br_unwindbound5.c +++ /dev/null @@ -1,58 +0,0 @@ -/* algorithm for computing the product of two natural numbers */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int x, y; - int a, b, p, q; - - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - - while (counter++<5) { - __VERIFIER_assert(q + a * b * p == x * y); - - if (!(a != 0 && b != 0)) - break; - - if (a % 2 == 0 && b % 2 == 0) { - a = a / 2; - b = b / 2; - p = 4 * p; - } else if (a % 2 == 1 && b % 2 == 0) { - a = a - 1; - q = q + b * p; - } else if (a % 2 == 0 && b % 2 == 1) { - b = b - 1; - q = q + a * p; - } else { - a = a - 1; - b = b - 1; - q = q + (a + b + 1) * p; /*fix a bug here--- was (a+b-1)*/ - } - } - - __VERIFIER_assert(q == x * y); - __VERIFIER_assert(a * b == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/prod4br_unwindbound5.yml b/c/nla-digbench-scaling/prod4br_unwindbound5.yml deleted file mode 100644 index 7ba743d6bd1..00000000000 --- a/c/nla-digbench-scaling/prod4br_unwindbound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'prod4br_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/prod4br_unwindbound50.c b/c/nla-digbench-scaling/prod4br_unwindbound50.c deleted file mode 100644 index acb53b415a6..00000000000 --- a/c/nla-digbench-scaling/prod4br_unwindbound50.c +++ /dev/null @@ -1,58 +0,0 @@ -/* algorithm for computing the product of two natural numbers */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int x, y; - int a, b, p, q; - - x = __VERIFIER_nondet_int(); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - - while (counter++<50) { - __VERIFIER_assert(q + a * b * p == x * y); - - if (!(a != 0 && b != 0)) - break; - - if (a % 2 == 0 && b % 2 == 0) { - a = a / 2; - b = b / 2; - p = 4 * p; - } else if (a % 2 == 1 && b % 2 == 0) { - a = a - 1; - q = q + b * p; - } else if (a % 2 == 0 && b % 2 == 1) { - b = b - 1; - q = q + a * p; - } else { - a = a - 1; - b = b - 1; - q = q + (a + b + 1) * p; /*fix a bug here--- was (a+b-1)*/ - } - } - - __VERIFIER_assert(q == x * y); - __VERIFIER_assert(a * b == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/prod4br_unwindbound50.yml b/c/nla-digbench-scaling/prod4br_unwindbound50.yml deleted file mode 100644 index 2c9698d3856..00000000000 --- a/c/nla-digbench-scaling/prod4br_unwindbound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'prod4br_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/prod4br_valuebound1.c b/c/nla-digbench-scaling/prod4br_valuebound1.c deleted file mode 100644 index 42ad4667d88..00000000000 --- a/c/nla-digbench-scaling/prod4br_valuebound1.c +++ /dev/null @@ -1,59 +0,0 @@ -/* algorithm for computing the product of two natural numbers */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int x, y; - int a, b, p, q; - - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=1); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=1); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - - while (1) { - __VERIFIER_assert(q + a * b * p == x * y); - - if (!(a != 0 && b != 0)) - break; - - if (a % 2 == 0 && b % 2 == 0) { - a = a / 2; - b = b / 2; - p = 4 * p; - } else if (a % 2 == 1 && b % 2 == 0) { - a = a - 1; - q = q + b * p; - } else if (a % 2 == 0 && b % 2 == 1) { - b = b - 1; - q = q + a * p; - } else { - a = a - 1; - b = b - 1; - q = q + (a + b + 1) * p; /*fix a bug here--- was (a+b-1)*/ - } - } - - __VERIFIER_assert(q == x * y); - __VERIFIER_assert(a * b == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/prod4br_valuebound1.yml b/c/nla-digbench-scaling/prod4br_valuebound1.yml deleted file mode 100644 index 7623740fedd..00000000000 --- a/c/nla-digbench-scaling/prod4br_valuebound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'prod4br_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/prod4br_valuebound10.c b/c/nla-digbench-scaling/prod4br_valuebound10.c deleted file mode 100644 index a49f2ea46fa..00000000000 --- a/c/nla-digbench-scaling/prod4br_valuebound10.c +++ /dev/null @@ -1,59 +0,0 @@ -/* algorithm for computing the product of two natural numbers */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int x, y; - int a, b, p, q; - - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=10); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=10); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - - while (1) { - __VERIFIER_assert(q + a * b * p == x * y); - - if (!(a != 0 && b != 0)) - break; - - if (a % 2 == 0 && b % 2 == 0) { - a = a / 2; - b = b / 2; - p = 4 * p; - } else if (a % 2 == 1 && b % 2 == 0) { - a = a - 1; - q = q + b * p; - } else if (a % 2 == 0 && b % 2 == 1) { - b = b - 1; - q = q + a * p; - } else { - a = a - 1; - b = b - 1; - q = q + (a + b + 1) * p; /*fix a bug here--- was (a+b-1)*/ - } - } - - __VERIFIER_assert(q == x * y); - __VERIFIER_assert(a * b == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/prod4br_valuebound10.yml b/c/nla-digbench-scaling/prod4br_valuebound10.yml deleted file mode 100644 index 5956a686bc7..00000000000 --- a/c/nla-digbench-scaling/prod4br_valuebound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'prod4br_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/prod4br_valuebound100.c b/c/nla-digbench-scaling/prod4br_valuebound100.c deleted file mode 100644 index 99ea4f48c5f..00000000000 --- a/c/nla-digbench-scaling/prod4br_valuebound100.c +++ /dev/null @@ -1,59 +0,0 @@ -/* algorithm for computing the product of two natural numbers */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int x, y; - int a, b, p, q; - - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=100); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=100); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - - while (1) { - __VERIFIER_assert(q + a * b * p == x * y); - - if (!(a != 0 && b != 0)) - break; - - if (a % 2 == 0 && b % 2 == 0) { - a = a / 2; - b = b / 2; - p = 4 * p; - } else if (a % 2 == 1 && b % 2 == 0) { - a = a - 1; - q = q + b * p; - } else if (a % 2 == 0 && b % 2 == 1) { - b = b - 1; - q = q + a * p; - } else { - a = a - 1; - b = b - 1; - q = q + (a + b + 1) * p; /*fix a bug here--- was (a+b-1)*/ - } - } - - __VERIFIER_assert(q == x * y); - __VERIFIER_assert(a * b == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/prod4br_valuebound100.yml b/c/nla-digbench-scaling/prod4br_valuebound100.yml deleted file mode 100644 index 67f14779cb0..00000000000 --- a/c/nla-digbench-scaling/prod4br_valuebound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'prod4br_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/prod4br_valuebound2.c b/c/nla-digbench-scaling/prod4br_valuebound2.c deleted file mode 100644 index 286065197cd..00000000000 --- a/c/nla-digbench-scaling/prod4br_valuebound2.c +++ /dev/null @@ -1,59 +0,0 @@ -/* algorithm for computing the product of two natural numbers */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int x, y; - int a, b, p, q; - - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=2); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=2); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - - while (1) { - __VERIFIER_assert(q + a * b * p == x * y); - - if (!(a != 0 && b != 0)) - break; - - if (a % 2 == 0 && b % 2 == 0) { - a = a / 2; - b = b / 2; - p = 4 * p; - } else if (a % 2 == 1 && b % 2 == 0) { - a = a - 1; - q = q + b * p; - } else if (a % 2 == 0 && b % 2 == 1) { - b = b - 1; - q = q + a * p; - } else { - a = a - 1; - b = b - 1; - q = q + (a + b + 1) * p; /*fix a bug here--- was (a+b-1)*/ - } - } - - __VERIFIER_assert(q == x * y); - __VERIFIER_assert(a * b == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/prod4br_valuebound2.yml b/c/nla-digbench-scaling/prod4br_valuebound2.yml deleted file mode 100644 index fece55f157a..00000000000 --- a/c/nla-digbench-scaling/prod4br_valuebound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'prod4br_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/prod4br_valuebound20.c b/c/nla-digbench-scaling/prod4br_valuebound20.c deleted file mode 100644 index a3d53d14841..00000000000 --- a/c/nla-digbench-scaling/prod4br_valuebound20.c +++ /dev/null @@ -1,59 +0,0 @@ -/* algorithm for computing the product of two natural numbers */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int x, y; - int a, b, p, q; - - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=20); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=20); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - - while (1) { - __VERIFIER_assert(q + a * b * p == x * y); - - if (!(a != 0 && b != 0)) - break; - - if (a % 2 == 0 && b % 2 == 0) { - a = a / 2; - b = b / 2; - p = 4 * p; - } else if (a % 2 == 1 && b % 2 == 0) { - a = a - 1; - q = q + b * p; - } else if (a % 2 == 0 && b % 2 == 1) { - b = b - 1; - q = q + a * p; - } else { - a = a - 1; - b = b - 1; - q = q + (a + b + 1) * p; /*fix a bug here--- was (a+b-1)*/ - } - } - - __VERIFIER_assert(q == x * y); - __VERIFIER_assert(a * b == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/prod4br_valuebound20.yml b/c/nla-digbench-scaling/prod4br_valuebound20.yml deleted file mode 100644 index 3a8c7c854bf..00000000000 --- a/c/nla-digbench-scaling/prod4br_valuebound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'prod4br_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/prod4br_valuebound5.c b/c/nla-digbench-scaling/prod4br_valuebound5.c deleted file mode 100644 index a53bb51df10..00000000000 --- a/c/nla-digbench-scaling/prod4br_valuebound5.c +++ /dev/null @@ -1,59 +0,0 @@ -/* algorithm for computing the product of two natural numbers */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int x, y; - int a, b, p, q; - - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=5); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=5); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - - while (1) { - __VERIFIER_assert(q + a * b * p == x * y); - - if (!(a != 0 && b != 0)) - break; - - if (a % 2 == 0 && b % 2 == 0) { - a = a / 2; - b = b / 2; - p = 4 * p; - } else if (a % 2 == 1 && b % 2 == 0) { - a = a - 1; - q = q + b * p; - } else if (a % 2 == 0 && b % 2 == 1) { - b = b - 1; - q = q + a * p; - } else { - a = a - 1; - b = b - 1; - q = q + (a + b + 1) * p; /*fix a bug here--- was (a+b-1)*/ - } - } - - __VERIFIER_assert(q == x * y); - __VERIFIER_assert(a * b == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/prod4br_valuebound5.yml b/c/nla-digbench-scaling/prod4br_valuebound5.yml deleted file mode 100644 index 2b5b76fedaa..00000000000 --- a/c/nla-digbench-scaling/prod4br_valuebound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'prod4br_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/prod4br_valuebound50.c b/c/nla-digbench-scaling/prod4br_valuebound50.c deleted file mode 100644 index 68afeaaa559..00000000000 --- a/c/nla-digbench-scaling/prod4br_valuebound50.c +++ /dev/null @@ -1,59 +0,0 @@ -/* algorithm for computing the product of two natural numbers */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int x, y; - int a, b, p, q; - - x = __VERIFIER_nondet_int(); - assume_abort_if_not(x>0 && x<=50); - y = __VERIFIER_nondet_int(); - assume_abort_if_not(y>0 && y<=50); - assume_abort_if_not(y >= 1); - - a = x; - b = y; - p = 1; - q = 0; - - while (1) { - __VERIFIER_assert(q + a * b * p == x * y); - - if (!(a != 0 && b != 0)) - break; - - if (a % 2 == 0 && b % 2 == 0) { - a = a / 2; - b = b / 2; - p = 4 * p; - } else if (a % 2 == 1 && b % 2 == 0) { - a = a - 1; - q = q + b * p; - } else if (a % 2 == 0 && b % 2 == 1) { - b = b - 1; - q = q + a * p; - } else { - a = a - 1; - b = b - 1; - q = q + (a + b + 1) * p; /*fix a bug here--- was (a+b-1)*/ - } - } - - __VERIFIER_assert(q == x * y); - __VERIFIER_assert(a * b == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/prod4br_valuebound50.yml b/c/nla-digbench-scaling/prod4br_valuebound50.yml deleted file mode 100644 index de84e3844e3..00000000000 --- a/c/nla-digbench-scaling/prod4br_valuebound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'prod4br_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/prodbin-ll_unwindbound1.c b/c/nla-digbench-scaling/prodbin-ll_unwindbound1.c new file mode 100644 index 00000000000..4066d478d63 --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_unwindbound1.c @@ -0,0 +1,48 @@ +/* shift_add algorithm for computing the + product of two natural numbers +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "prodbin-ll.c", 6, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int a, b; + long long x, y, z; + + a = __VERIFIER_nondet_int(); + b = __VERIFIER_nondet_int(); + assume_abort_if_not(b >= 1); + + x = a; + y = b; + z = 0; + + while (counter++<1) { + __VERIFIER_assert(z + x * y == (long long) a * b); + if (!(y != 0)) + break; + + if (y % 2 == 1) { + z = z + x; + y = y - 1; + } + x = 2 * x; + y = y / 2; + } + __VERIFIER_assert(z == (long long) a * b); + + return 0; +} diff --git a/c/nla-digbench-scaling/prodbin-ll_unwindbound1.yml b/c/nla-digbench-scaling/prodbin-ll_unwindbound1.yml new file mode 100644 index 00000000000..7b4731aee07 --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_unwindbound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'prodbin-ll_unwindbound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/prodbin-ll_unwindbound10.c b/c/nla-digbench-scaling/prodbin-ll_unwindbound10.c new file mode 100644 index 00000000000..de1d85a0e1a --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_unwindbound10.c @@ -0,0 +1,48 @@ +/* shift_add algorithm for computing the + product of two natural numbers +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "prodbin-ll.c", 6, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int a, b; + long long x, y, z; + + a = __VERIFIER_nondet_int(); + b = __VERIFIER_nondet_int(); + assume_abort_if_not(b >= 1); + + x = a; + y = b; + z = 0; + + while (counter++<10) { + __VERIFIER_assert(z + x * y == (long long) a * b); + if (!(y != 0)) + break; + + if (y % 2 == 1) { + z = z + x; + y = y - 1; + } + x = 2 * x; + y = y / 2; + } + __VERIFIER_assert(z == (long long) a * b); + + return 0; +} diff --git a/c/nla-digbench-scaling/prodbin-ll_unwindbound10.yml b/c/nla-digbench-scaling/prodbin-ll_unwindbound10.yml new file mode 100644 index 00000000000..540998f9873 --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_unwindbound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'prodbin-ll_unwindbound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/prodbin-ll_unwindbound100.c b/c/nla-digbench-scaling/prodbin-ll_unwindbound100.c new file mode 100644 index 00000000000..d9f1099bffa --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_unwindbound100.c @@ -0,0 +1,48 @@ +/* shift_add algorithm for computing the + product of two natural numbers +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "prodbin-ll.c", 6, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int a, b; + long long x, y, z; + + a = __VERIFIER_nondet_int(); + b = __VERIFIER_nondet_int(); + assume_abort_if_not(b >= 1); + + x = a; + y = b; + z = 0; + + while (counter++<100) { + __VERIFIER_assert(z + x * y == (long long) a * b); + if (!(y != 0)) + break; + + if (y % 2 == 1) { + z = z + x; + y = y - 1; + } + x = 2 * x; + y = y / 2; + } + __VERIFIER_assert(z == (long long) a * b); + + return 0; +} diff --git a/c/nla-digbench-scaling/prodbin-ll_unwindbound100.yml b/c/nla-digbench-scaling/prodbin-ll_unwindbound100.yml new file mode 100644 index 00000000000..b32b5a02412 --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_unwindbound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'prodbin-ll_unwindbound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/prodbin-ll_unwindbound2.c b/c/nla-digbench-scaling/prodbin-ll_unwindbound2.c new file mode 100644 index 00000000000..fadc69f31b1 --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_unwindbound2.c @@ -0,0 +1,48 @@ +/* shift_add algorithm for computing the + product of two natural numbers +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "prodbin-ll.c", 6, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int a, b; + long long x, y, z; + + a = __VERIFIER_nondet_int(); + b = __VERIFIER_nondet_int(); + assume_abort_if_not(b >= 1); + + x = a; + y = b; + z = 0; + + while (counter++<2) { + __VERIFIER_assert(z + x * y == (long long) a * b); + if (!(y != 0)) + break; + + if (y % 2 == 1) { + z = z + x; + y = y - 1; + } + x = 2 * x; + y = y / 2; + } + __VERIFIER_assert(z == (long long) a * b); + + return 0; +} diff --git a/c/nla-digbench-scaling/prodbin-ll_unwindbound2.yml b/c/nla-digbench-scaling/prodbin-ll_unwindbound2.yml new file mode 100644 index 00000000000..47a0c1bab2f --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_unwindbound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'prodbin-ll_unwindbound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/prodbin-ll_unwindbound20.c b/c/nla-digbench-scaling/prodbin-ll_unwindbound20.c new file mode 100644 index 00000000000..c23c4071db2 --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_unwindbound20.c @@ -0,0 +1,48 @@ +/* shift_add algorithm for computing the + product of two natural numbers +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "prodbin-ll.c", 6, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int a, b; + long long x, y, z; + + a = __VERIFIER_nondet_int(); + b = __VERIFIER_nondet_int(); + assume_abort_if_not(b >= 1); + + x = a; + y = b; + z = 0; + + while (counter++<20) { + __VERIFIER_assert(z + x * y == (long long) a * b); + if (!(y != 0)) + break; + + if (y % 2 == 1) { + z = z + x; + y = y - 1; + } + x = 2 * x; + y = y / 2; + } + __VERIFIER_assert(z == (long long) a * b); + + return 0; +} diff --git a/c/nla-digbench-scaling/prodbin-ll_unwindbound20.yml b/c/nla-digbench-scaling/prodbin-ll_unwindbound20.yml new file mode 100644 index 00000000000..15c43f66215 --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_unwindbound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'prodbin-ll_unwindbound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/prodbin-ll_unwindbound5.c b/c/nla-digbench-scaling/prodbin-ll_unwindbound5.c new file mode 100644 index 00000000000..a20a3ff89f4 --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_unwindbound5.c @@ -0,0 +1,48 @@ +/* shift_add algorithm for computing the + product of two natural numbers +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "prodbin-ll.c", 6, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int a, b; + long long x, y, z; + + a = __VERIFIER_nondet_int(); + b = __VERIFIER_nondet_int(); + assume_abort_if_not(b >= 1); + + x = a; + y = b; + z = 0; + + while (counter++<5) { + __VERIFIER_assert(z + x * y == (long long) a * b); + if (!(y != 0)) + break; + + if (y % 2 == 1) { + z = z + x; + y = y - 1; + } + x = 2 * x; + y = y / 2; + } + __VERIFIER_assert(z == (long long) a * b); + + return 0; +} diff --git a/c/nla-digbench-scaling/prodbin-ll_unwindbound5.yml b/c/nla-digbench-scaling/prodbin-ll_unwindbound5.yml new file mode 100644 index 00000000000..88d2439ffcd --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_unwindbound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'prodbin-ll_unwindbound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/prodbin-ll_unwindbound50.c b/c/nla-digbench-scaling/prodbin-ll_unwindbound50.c new file mode 100644 index 00000000000..de1c48bc59c --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_unwindbound50.c @@ -0,0 +1,48 @@ +/* shift_add algorithm for computing the + product of two natural numbers +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "prodbin-ll.c", 6, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int a, b; + long long x, y, z; + + a = __VERIFIER_nondet_int(); + b = __VERIFIER_nondet_int(); + assume_abort_if_not(b >= 1); + + x = a; + y = b; + z = 0; + + while (counter++<50) { + __VERIFIER_assert(z + x * y == (long long) a * b); + if (!(y != 0)) + break; + + if (y % 2 == 1) { + z = z + x; + y = y - 1; + } + x = 2 * x; + y = y / 2; + } + __VERIFIER_assert(z == (long long) a * b); + + return 0; +} diff --git a/c/nla-digbench-scaling/prodbin-ll_unwindbound50.yml b/c/nla-digbench-scaling/prodbin-ll_unwindbound50.yml new file mode 100644 index 00000000000..8b598c29dee --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_unwindbound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'prodbin-ll_unwindbound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/prodbin-ll_valuebound1.c b/c/nla-digbench-scaling/prodbin-ll_valuebound1.c new file mode 100644 index 00000000000..7a93619861d --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_valuebound1.c @@ -0,0 +1,49 @@ +/* shift_add algorithm for computing the + product of two natural numbers +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "prodbin-ll.c", 6, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int a, b; + long long x, y, z; + + a = __VERIFIER_nondet_int(); + assume_abort_if_not(a>=0 && a<=1); + b = __VERIFIER_nondet_int(); + assume_abort_if_not(b>=0 && b<=1); + assume_abort_if_not(b >= 1); + + x = a; + y = b; + z = 0; + + while (1) { + __VERIFIER_assert(z + x * y == (long long) a * b); + if (!(y != 0)) + break; + + if (y % 2 == 1) { + z = z + x; + y = y - 1; + } + x = 2 * x; + y = y / 2; + } + __VERIFIER_assert(z == (long long) a * b); + + return 0; +} diff --git a/c/nla-digbench-scaling/prodbin-ll_valuebound1.yml b/c/nla-digbench-scaling/prodbin-ll_valuebound1.yml new file mode 100644 index 00000000000..f6c573c92c6 --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_valuebound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'prodbin-ll_valuebound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/prodbin-ll_valuebound10.c b/c/nla-digbench-scaling/prodbin-ll_valuebound10.c new file mode 100644 index 00000000000..6ff57ac7ae6 --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_valuebound10.c @@ -0,0 +1,49 @@ +/* shift_add algorithm for computing the + product of two natural numbers +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "prodbin-ll.c", 6, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int a, b; + long long x, y, z; + + a = __VERIFIER_nondet_int(); + assume_abort_if_not(a>=0 && a<=10); + b = __VERIFIER_nondet_int(); + assume_abort_if_not(b>=0 && b<=10); + assume_abort_if_not(b >= 1); + + x = a; + y = b; + z = 0; + + while (1) { + __VERIFIER_assert(z + x * y == (long long) a * b); + if (!(y != 0)) + break; + + if (y % 2 == 1) { + z = z + x; + y = y - 1; + } + x = 2 * x; + y = y / 2; + } + __VERIFIER_assert(z == (long long) a * b); + + return 0; +} diff --git a/c/nla-digbench-scaling/prodbin-ll_valuebound10.yml b/c/nla-digbench-scaling/prodbin-ll_valuebound10.yml new file mode 100644 index 00000000000..7fae9901b82 --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_valuebound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'prodbin-ll_valuebound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/prodbin-ll_valuebound100.c b/c/nla-digbench-scaling/prodbin-ll_valuebound100.c new file mode 100644 index 00000000000..7f6326e88c0 --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_valuebound100.c @@ -0,0 +1,49 @@ +/* shift_add algorithm for computing the + product of two natural numbers +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "prodbin-ll.c", 6, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int a, b; + long long x, y, z; + + a = __VERIFIER_nondet_int(); + assume_abort_if_not(a>=0 && a<=100); + b = __VERIFIER_nondet_int(); + assume_abort_if_not(b>=0 && b<=100); + assume_abort_if_not(b >= 1); + + x = a; + y = b; + z = 0; + + while (1) { + __VERIFIER_assert(z + x * y == (long long) a * b); + if (!(y != 0)) + break; + + if (y % 2 == 1) { + z = z + x; + y = y - 1; + } + x = 2 * x; + y = y / 2; + } + __VERIFIER_assert(z == (long long) a * b); + + return 0; +} diff --git a/c/nla-digbench-scaling/prodbin-ll_valuebound100.yml b/c/nla-digbench-scaling/prodbin-ll_valuebound100.yml new file mode 100644 index 00000000000..9305482d428 --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_valuebound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'prodbin-ll_valuebound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/prodbin-ll_valuebound2.c b/c/nla-digbench-scaling/prodbin-ll_valuebound2.c new file mode 100644 index 00000000000..275a62f2fd0 --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_valuebound2.c @@ -0,0 +1,49 @@ +/* shift_add algorithm for computing the + product of two natural numbers +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "prodbin-ll.c", 6, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int a, b; + long long x, y, z; + + a = __VERIFIER_nondet_int(); + assume_abort_if_not(a>=0 && a<=2); + b = __VERIFIER_nondet_int(); + assume_abort_if_not(b>=0 && b<=2); + assume_abort_if_not(b >= 1); + + x = a; + y = b; + z = 0; + + while (1) { + __VERIFIER_assert(z + x * y == (long long) a * b); + if (!(y != 0)) + break; + + if (y % 2 == 1) { + z = z + x; + y = y - 1; + } + x = 2 * x; + y = y / 2; + } + __VERIFIER_assert(z == (long long) a * b); + + return 0; +} diff --git a/c/nla-digbench-scaling/prodbin-ll_valuebound2.yml b/c/nla-digbench-scaling/prodbin-ll_valuebound2.yml new file mode 100644 index 00000000000..5faa1ade681 --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_valuebound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'prodbin-ll_valuebound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/prodbin-ll_valuebound20.c b/c/nla-digbench-scaling/prodbin-ll_valuebound20.c new file mode 100644 index 00000000000..38932c85eb7 --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_valuebound20.c @@ -0,0 +1,49 @@ +/* shift_add algorithm for computing the + product of two natural numbers +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "prodbin-ll.c", 6, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int a, b; + long long x, y, z; + + a = __VERIFIER_nondet_int(); + assume_abort_if_not(a>=0 && a<=20); + b = __VERIFIER_nondet_int(); + assume_abort_if_not(b>=0 && b<=20); + assume_abort_if_not(b >= 1); + + x = a; + y = b; + z = 0; + + while (1) { + __VERIFIER_assert(z + x * y == (long long) a * b); + if (!(y != 0)) + break; + + if (y % 2 == 1) { + z = z + x; + y = y - 1; + } + x = 2 * x; + y = y / 2; + } + __VERIFIER_assert(z == (long long) a * b); + + return 0; +} diff --git a/c/nla-digbench-scaling/prodbin-ll_valuebound20.yml b/c/nla-digbench-scaling/prodbin-ll_valuebound20.yml new file mode 100644 index 00000000000..e7ed5920d26 --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_valuebound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'prodbin-ll_valuebound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/prodbin-ll_valuebound5.c b/c/nla-digbench-scaling/prodbin-ll_valuebound5.c new file mode 100644 index 00000000000..15f1904bbd0 --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_valuebound5.c @@ -0,0 +1,49 @@ +/* shift_add algorithm for computing the + product of two natural numbers +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "prodbin-ll.c", 6, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int a, b; + long long x, y, z; + + a = __VERIFIER_nondet_int(); + assume_abort_if_not(a>=0 && a<=5); + b = __VERIFIER_nondet_int(); + assume_abort_if_not(b>=0 && b<=5); + assume_abort_if_not(b >= 1); + + x = a; + y = b; + z = 0; + + while (1) { + __VERIFIER_assert(z + x * y == (long long) a * b); + if (!(y != 0)) + break; + + if (y % 2 == 1) { + z = z + x; + y = y - 1; + } + x = 2 * x; + y = y / 2; + } + __VERIFIER_assert(z == (long long) a * b); + + return 0; +} diff --git a/c/nla-digbench-scaling/prodbin-ll_valuebound5.yml b/c/nla-digbench-scaling/prodbin-ll_valuebound5.yml new file mode 100644 index 00000000000..cd8386a844c --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_valuebound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'prodbin-ll_valuebound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/prodbin-ll_valuebound50.c b/c/nla-digbench-scaling/prodbin-ll_valuebound50.c new file mode 100644 index 00000000000..a523b2754fd --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_valuebound50.c @@ -0,0 +1,49 @@ +/* shift_add algorithm for computing the + product of two natural numbers +*/ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "prodbin-ll.c", 6, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int a, b; + long long x, y, z; + + a = __VERIFIER_nondet_int(); + assume_abort_if_not(a>=0 && a<=50); + b = __VERIFIER_nondet_int(); + assume_abort_if_not(b>=0 && b<=50); + assume_abort_if_not(b >= 1); + + x = a; + y = b; + z = 0; + + while (1) { + __VERIFIER_assert(z + x * y == (long long) a * b); + if (!(y != 0)) + break; + + if (y % 2 == 1) { + z = z + x; + y = y - 1; + } + x = 2 * x; + y = y / 2; + } + __VERIFIER_assert(z == (long long) a * b); + + return 0; +} diff --git a/c/nla-digbench-scaling/prodbin-ll_valuebound50.yml b/c/nla-digbench-scaling/prodbin-ll_valuebound50.yml new file mode 100644 index 00000000000..909830350d7 --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_valuebound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'prodbin-ll_valuebound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/prodbin_unwindbound1.c b/c/nla-digbench-scaling/prodbin_unwindbound1.c deleted file mode 100644 index 57813447f0f..00000000000 --- a/c/nla-digbench-scaling/prodbin_unwindbound1.c +++ /dev/null @@ -1,47 +0,0 @@ -/* shift_add algorithm for computing the - product of two natural numbers -*/ -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int a, b; - int x, y, z; - - a = __VERIFIER_nondet_double(); - b = __VERIFIER_nondet_double(); - assume_abort_if_not(b >= 1); - - x = a; - y = b; - z = 0; - - while (counter++<1) { - __VERIFIER_assert(z + x * y == a * b); - if (!(y != 0)) - break; - - if (y % 2 == 1) { - z = z + x; - y = y - 1; - } - x = 2 * x; - y = y / 2; - } - __VERIFIER_assert(z == a * b); - - return 0; -} diff --git a/c/nla-digbench-scaling/prodbin_unwindbound1.yml b/c/nla-digbench-scaling/prodbin_unwindbound1.yml deleted file mode 100644 index 09d4297ba4b..00000000000 --- a/c/nla-digbench-scaling/prodbin_unwindbound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'prodbin_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/prodbin_unwindbound10.c b/c/nla-digbench-scaling/prodbin_unwindbound10.c deleted file mode 100644 index 67fc0ed6039..00000000000 --- a/c/nla-digbench-scaling/prodbin_unwindbound10.c +++ /dev/null @@ -1,47 +0,0 @@ -/* shift_add algorithm for computing the - product of two natural numbers -*/ -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int a, b; - int x, y, z; - - a = __VERIFIER_nondet_double(); - b = __VERIFIER_nondet_double(); - assume_abort_if_not(b >= 1); - - x = a; - y = b; - z = 0; - - while (counter++<10) { - __VERIFIER_assert(z + x * y == a * b); - if (!(y != 0)) - break; - - if (y % 2 == 1) { - z = z + x; - y = y - 1; - } - x = 2 * x; - y = y / 2; - } - __VERIFIER_assert(z == a * b); - - return 0; -} diff --git a/c/nla-digbench-scaling/prodbin_unwindbound10.yml b/c/nla-digbench-scaling/prodbin_unwindbound10.yml deleted file mode 100644 index ebd7e9f9813..00000000000 --- a/c/nla-digbench-scaling/prodbin_unwindbound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'prodbin_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/prodbin_unwindbound100.c b/c/nla-digbench-scaling/prodbin_unwindbound100.c deleted file mode 100644 index 9150398d8ea..00000000000 --- a/c/nla-digbench-scaling/prodbin_unwindbound100.c +++ /dev/null @@ -1,47 +0,0 @@ -/* shift_add algorithm for computing the - product of two natural numbers -*/ -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int a, b; - int x, y, z; - - a = __VERIFIER_nondet_double(); - b = __VERIFIER_nondet_double(); - assume_abort_if_not(b >= 1); - - x = a; - y = b; - z = 0; - - while (counter++<100) { - __VERIFIER_assert(z + x * y == a * b); - if (!(y != 0)) - break; - - if (y % 2 == 1) { - z = z + x; - y = y - 1; - } - x = 2 * x; - y = y / 2; - } - __VERIFIER_assert(z == a * b); - - return 0; -} diff --git a/c/nla-digbench-scaling/prodbin_unwindbound100.yml b/c/nla-digbench-scaling/prodbin_unwindbound100.yml deleted file mode 100644 index 4a157c27d3d..00000000000 --- a/c/nla-digbench-scaling/prodbin_unwindbound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'prodbin_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/prodbin_unwindbound2.c b/c/nla-digbench-scaling/prodbin_unwindbound2.c deleted file mode 100644 index 8dc2fdbe83c..00000000000 --- a/c/nla-digbench-scaling/prodbin_unwindbound2.c +++ /dev/null @@ -1,47 +0,0 @@ -/* shift_add algorithm for computing the - product of two natural numbers -*/ -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int a, b; - int x, y, z; - - a = __VERIFIER_nondet_double(); - b = __VERIFIER_nondet_double(); - assume_abort_if_not(b >= 1); - - x = a; - y = b; - z = 0; - - while (counter++<2) { - __VERIFIER_assert(z + x * y == a * b); - if (!(y != 0)) - break; - - if (y % 2 == 1) { - z = z + x; - y = y - 1; - } - x = 2 * x; - y = y / 2; - } - __VERIFIER_assert(z == a * b); - - return 0; -} diff --git a/c/nla-digbench-scaling/prodbin_unwindbound2.yml b/c/nla-digbench-scaling/prodbin_unwindbound2.yml deleted file mode 100644 index dec1c3c5b55..00000000000 --- a/c/nla-digbench-scaling/prodbin_unwindbound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'prodbin_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/prodbin_unwindbound20.c b/c/nla-digbench-scaling/prodbin_unwindbound20.c deleted file mode 100644 index 08a5bdfc523..00000000000 --- a/c/nla-digbench-scaling/prodbin_unwindbound20.c +++ /dev/null @@ -1,47 +0,0 @@ -/* shift_add algorithm for computing the - product of two natural numbers -*/ -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int a, b; - int x, y, z; - - a = __VERIFIER_nondet_double(); - b = __VERIFIER_nondet_double(); - assume_abort_if_not(b >= 1); - - x = a; - y = b; - z = 0; - - while (counter++<20) { - __VERIFIER_assert(z + x * y == a * b); - if (!(y != 0)) - break; - - if (y % 2 == 1) { - z = z + x; - y = y - 1; - } - x = 2 * x; - y = y / 2; - } - __VERIFIER_assert(z == a * b); - - return 0; -} diff --git a/c/nla-digbench-scaling/prodbin_unwindbound20.yml b/c/nla-digbench-scaling/prodbin_unwindbound20.yml deleted file mode 100644 index a82846b8cae..00000000000 --- a/c/nla-digbench-scaling/prodbin_unwindbound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'prodbin_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/prodbin_unwindbound5.c b/c/nla-digbench-scaling/prodbin_unwindbound5.c deleted file mode 100644 index 627e0b4eb9c..00000000000 --- a/c/nla-digbench-scaling/prodbin_unwindbound5.c +++ /dev/null @@ -1,47 +0,0 @@ -/* shift_add algorithm for computing the - product of two natural numbers -*/ -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int a, b; - int x, y, z; - - a = __VERIFIER_nondet_double(); - b = __VERIFIER_nondet_double(); - assume_abort_if_not(b >= 1); - - x = a; - y = b; - z = 0; - - while (counter++<5) { - __VERIFIER_assert(z + x * y == a * b); - if (!(y != 0)) - break; - - if (y % 2 == 1) { - z = z + x; - y = y - 1; - } - x = 2 * x; - y = y / 2; - } - __VERIFIER_assert(z == a * b); - - return 0; -} diff --git a/c/nla-digbench-scaling/prodbin_unwindbound5.yml b/c/nla-digbench-scaling/prodbin_unwindbound5.yml deleted file mode 100644 index fc9b55cff6f..00000000000 --- a/c/nla-digbench-scaling/prodbin_unwindbound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'prodbin_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/prodbin_unwindbound50.c b/c/nla-digbench-scaling/prodbin_unwindbound50.c deleted file mode 100644 index 2172d92b457..00000000000 --- a/c/nla-digbench-scaling/prodbin_unwindbound50.c +++ /dev/null @@ -1,47 +0,0 @@ -/* shift_add algorithm for computing the - product of two natural numbers -*/ -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int a, b; - int x, y, z; - - a = __VERIFIER_nondet_double(); - b = __VERIFIER_nondet_double(); - assume_abort_if_not(b >= 1); - - x = a; - y = b; - z = 0; - - while (counter++<50) { - __VERIFIER_assert(z + x * y == a * b); - if (!(y != 0)) - break; - - if (y % 2 == 1) { - z = z + x; - y = y - 1; - } - x = 2 * x; - y = y / 2; - } - __VERIFIER_assert(z == a * b); - - return 0; -} diff --git a/c/nla-digbench-scaling/prodbin_unwindbound50.yml b/c/nla-digbench-scaling/prodbin_unwindbound50.yml deleted file mode 100644 index ff9754f3e2c..00000000000 --- a/c/nla-digbench-scaling/prodbin_unwindbound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'prodbin_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/prodbin_valuebound1.c b/c/nla-digbench-scaling/prodbin_valuebound1.c deleted file mode 100644 index 81315d34e09..00000000000 --- a/c/nla-digbench-scaling/prodbin_valuebound1.c +++ /dev/null @@ -1,48 +0,0 @@ -/* shift_add algorithm for computing the - product of two natural numbers -*/ -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int a, b; - int x, y, z; - - a = __VERIFIER_nondet_double(); - assume_abort_if_not(a>0 && a<=1); - b = __VERIFIER_nondet_double(); - assume_abort_if_not(b>0 && b<=1); - assume_abort_if_not(b >= 1); - - x = a; - y = b; - z = 0; - - while (1) { - __VERIFIER_assert(z + x * y == a * b); - if (!(y != 0)) - break; - - if (y % 2 == 1) { - z = z + x; - y = y - 1; - } - x = 2 * x; - y = y / 2; - } - __VERIFIER_assert(z == a * b); - - return 0; -} diff --git a/c/nla-digbench-scaling/prodbin_valuebound1.yml b/c/nla-digbench-scaling/prodbin_valuebound1.yml deleted file mode 100644 index 599e1742578..00000000000 --- a/c/nla-digbench-scaling/prodbin_valuebound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'prodbin_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/prodbin_valuebound10.c b/c/nla-digbench-scaling/prodbin_valuebound10.c deleted file mode 100644 index 1a3af6486c9..00000000000 --- a/c/nla-digbench-scaling/prodbin_valuebound10.c +++ /dev/null @@ -1,48 +0,0 @@ -/* shift_add algorithm for computing the - product of two natural numbers -*/ -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int a, b; - int x, y, z; - - a = __VERIFIER_nondet_double(); - assume_abort_if_not(a>0 && a<=10); - b = __VERIFIER_nondet_double(); - assume_abort_if_not(b>0 && b<=10); - assume_abort_if_not(b >= 1); - - x = a; - y = b; - z = 0; - - while (1) { - __VERIFIER_assert(z + x * y == a * b); - if (!(y != 0)) - break; - - if (y % 2 == 1) { - z = z + x; - y = y - 1; - } - x = 2 * x; - y = y / 2; - } - __VERIFIER_assert(z == a * b); - - return 0; -} diff --git a/c/nla-digbench-scaling/prodbin_valuebound10.yml b/c/nla-digbench-scaling/prodbin_valuebound10.yml deleted file mode 100644 index 1550ff881a1..00000000000 --- a/c/nla-digbench-scaling/prodbin_valuebound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'prodbin_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/prodbin_valuebound100.c b/c/nla-digbench-scaling/prodbin_valuebound100.c deleted file mode 100644 index 7f0c1f0ccb9..00000000000 --- a/c/nla-digbench-scaling/prodbin_valuebound100.c +++ /dev/null @@ -1,48 +0,0 @@ -/* shift_add algorithm for computing the - product of two natural numbers -*/ -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int a, b; - int x, y, z; - - a = __VERIFIER_nondet_double(); - assume_abort_if_not(a>0 && a<=100); - b = __VERIFIER_nondet_double(); - assume_abort_if_not(b>0 && b<=100); - assume_abort_if_not(b >= 1); - - x = a; - y = b; - z = 0; - - while (1) { - __VERIFIER_assert(z + x * y == a * b); - if (!(y != 0)) - break; - - if (y % 2 == 1) { - z = z + x; - y = y - 1; - } - x = 2 * x; - y = y / 2; - } - __VERIFIER_assert(z == a * b); - - return 0; -} diff --git a/c/nla-digbench-scaling/prodbin_valuebound100.yml b/c/nla-digbench-scaling/prodbin_valuebound100.yml deleted file mode 100644 index 6abd8079d18..00000000000 --- a/c/nla-digbench-scaling/prodbin_valuebound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'prodbin_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/prodbin_valuebound2.c b/c/nla-digbench-scaling/prodbin_valuebound2.c deleted file mode 100644 index b8daf5942f5..00000000000 --- a/c/nla-digbench-scaling/prodbin_valuebound2.c +++ /dev/null @@ -1,48 +0,0 @@ -/* shift_add algorithm for computing the - product of two natural numbers -*/ -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int a, b; - int x, y, z; - - a = __VERIFIER_nondet_double(); - assume_abort_if_not(a>0 && a<=2); - b = __VERIFIER_nondet_double(); - assume_abort_if_not(b>0 && b<=2); - assume_abort_if_not(b >= 1); - - x = a; - y = b; - z = 0; - - while (1) { - __VERIFIER_assert(z + x * y == a * b); - if (!(y != 0)) - break; - - if (y % 2 == 1) { - z = z + x; - y = y - 1; - } - x = 2 * x; - y = y / 2; - } - __VERIFIER_assert(z == a * b); - - return 0; -} diff --git a/c/nla-digbench-scaling/prodbin_valuebound2.yml b/c/nla-digbench-scaling/prodbin_valuebound2.yml deleted file mode 100644 index 69aea2ff20e..00000000000 --- a/c/nla-digbench-scaling/prodbin_valuebound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'prodbin_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/prodbin_valuebound20.c b/c/nla-digbench-scaling/prodbin_valuebound20.c deleted file mode 100644 index 1d94807497a..00000000000 --- a/c/nla-digbench-scaling/prodbin_valuebound20.c +++ /dev/null @@ -1,48 +0,0 @@ -/* shift_add algorithm for computing the - product of two natural numbers -*/ -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int a, b; - int x, y, z; - - a = __VERIFIER_nondet_double(); - assume_abort_if_not(a>0 && a<=20); - b = __VERIFIER_nondet_double(); - assume_abort_if_not(b>0 && b<=20); - assume_abort_if_not(b >= 1); - - x = a; - y = b; - z = 0; - - while (1) { - __VERIFIER_assert(z + x * y == a * b); - if (!(y != 0)) - break; - - if (y % 2 == 1) { - z = z + x; - y = y - 1; - } - x = 2 * x; - y = y / 2; - } - __VERIFIER_assert(z == a * b); - - return 0; -} diff --git a/c/nla-digbench-scaling/prodbin_valuebound20.yml b/c/nla-digbench-scaling/prodbin_valuebound20.yml deleted file mode 100644 index 1ed65f5ce19..00000000000 --- a/c/nla-digbench-scaling/prodbin_valuebound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'prodbin_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/prodbin_valuebound5.c b/c/nla-digbench-scaling/prodbin_valuebound5.c deleted file mode 100644 index b80109115d8..00000000000 --- a/c/nla-digbench-scaling/prodbin_valuebound5.c +++ /dev/null @@ -1,48 +0,0 @@ -/* shift_add algorithm for computing the - product of two natural numbers -*/ -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int a, b; - int x, y, z; - - a = __VERIFIER_nondet_double(); - assume_abort_if_not(a>0 && a<=5); - b = __VERIFIER_nondet_double(); - assume_abort_if_not(b>0 && b<=5); - assume_abort_if_not(b >= 1); - - x = a; - y = b; - z = 0; - - while (1) { - __VERIFIER_assert(z + x * y == a * b); - if (!(y != 0)) - break; - - if (y % 2 == 1) { - z = z + x; - y = y - 1; - } - x = 2 * x; - y = y / 2; - } - __VERIFIER_assert(z == a * b); - - return 0; -} diff --git a/c/nla-digbench-scaling/prodbin_valuebound5.yml b/c/nla-digbench-scaling/prodbin_valuebound5.yml deleted file mode 100644 index ef974a0f19f..00000000000 --- a/c/nla-digbench-scaling/prodbin_valuebound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'prodbin_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/prodbin_valuebound50.c b/c/nla-digbench-scaling/prodbin_valuebound50.c deleted file mode 100644 index 7691bff6b65..00000000000 --- a/c/nla-digbench-scaling/prodbin_valuebound50.c +++ /dev/null @@ -1,48 +0,0 @@ -/* shift_add algorithm for computing the - product of two natural numbers -*/ -extern void abort(void); -void reach_error(){} -extern double __VERIFIER_nondet_double(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int a, b; - int x, y, z; - - a = __VERIFIER_nondet_double(); - assume_abort_if_not(a>0 && a<=50); - b = __VERIFIER_nondet_double(); - assume_abort_if_not(b>0 && b<=50); - assume_abort_if_not(b >= 1); - - x = a; - y = b; - z = 0; - - while (1) { - __VERIFIER_assert(z + x * y == a * b); - if (!(y != 0)) - break; - - if (y % 2 == 1) { - z = z + x; - y = y - 1; - } - x = 2 * x; - y = y / 2; - } - __VERIFIER_assert(z == a * b); - - return 0; -} diff --git a/c/nla-digbench-scaling/prodbin_valuebound50.yml b/c/nla-digbench-scaling/prodbin_valuebound50.yml deleted file mode 100644 index d10918c9ed5..00000000000 --- a/c/nla-digbench-scaling/prodbin_valuebound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'prodbin_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps2-ll_unwindbound1.c b/c/nla-digbench-scaling/ps2-ll_unwindbound1.c new file mode 100644 index 00000000000..478761d1cb3 --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_unwindbound1.c @@ -0,0 +1,40 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps2-ll.c", 3, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int k; + long long y, x, c; + k = __VERIFIER_nondet_int(); + + y = 0; + x = 0; + c = 0; + + while (counter++<1) { + __VERIFIER_assert((y * y) - 2 * x + y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y + x; + } + __VERIFIER_assert((y*y) - 2*x + y == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/ps2-ll_unwindbound1.yml b/c/nla-digbench-scaling/ps2-ll_unwindbound1.yml new file mode 100644 index 00000000000..4c458ff2295 --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_unwindbound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps2-ll_unwindbound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps2-ll_unwindbound10.c b/c/nla-digbench-scaling/ps2-ll_unwindbound10.c new file mode 100644 index 00000000000..018e7047a71 --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_unwindbound10.c @@ -0,0 +1,40 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps2-ll.c", 3, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int k; + long long y, x, c; + k = __VERIFIER_nondet_int(); + + y = 0; + x = 0; + c = 0; + + while (counter++<10) { + __VERIFIER_assert((y * y) - 2 * x + y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y + x; + } + __VERIFIER_assert((y*y) - 2*x + y == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/ps2-ll_unwindbound10.yml b/c/nla-digbench-scaling/ps2-ll_unwindbound10.yml new file mode 100644 index 00000000000..f248fcdb25c --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_unwindbound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps2-ll_unwindbound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps2-ll_unwindbound100.c b/c/nla-digbench-scaling/ps2-ll_unwindbound100.c new file mode 100644 index 00000000000..bb880e1888a --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_unwindbound100.c @@ -0,0 +1,40 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps2-ll.c", 3, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int k; + long long y, x, c; + k = __VERIFIER_nondet_int(); + + y = 0; + x = 0; + c = 0; + + while (counter++<100) { + __VERIFIER_assert((y * y) - 2 * x + y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y + x; + } + __VERIFIER_assert((y*y) - 2*x + y == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/ps2-ll_unwindbound100.yml b/c/nla-digbench-scaling/ps2-ll_unwindbound100.yml new file mode 100644 index 00000000000..4ac06b15f6b --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_unwindbound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps2-ll_unwindbound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps2-ll_unwindbound2.c b/c/nla-digbench-scaling/ps2-ll_unwindbound2.c new file mode 100644 index 00000000000..d858a01d0e0 --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_unwindbound2.c @@ -0,0 +1,40 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps2-ll.c", 3, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int k; + long long y, x, c; + k = __VERIFIER_nondet_int(); + + y = 0; + x = 0; + c = 0; + + while (counter++<2) { + __VERIFIER_assert((y * y) - 2 * x + y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y + x; + } + __VERIFIER_assert((y*y) - 2*x + y == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/ps2-ll_unwindbound2.yml b/c/nla-digbench-scaling/ps2-ll_unwindbound2.yml new file mode 100644 index 00000000000..775d2d6b574 --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_unwindbound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps2-ll_unwindbound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps2-ll_unwindbound20.c b/c/nla-digbench-scaling/ps2-ll_unwindbound20.c new file mode 100644 index 00000000000..81db1b00709 --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_unwindbound20.c @@ -0,0 +1,40 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps2-ll.c", 3, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int k; + long long y, x, c; + k = __VERIFIER_nondet_int(); + + y = 0; + x = 0; + c = 0; + + while (counter++<20) { + __VERIFIER_assert((y * y) - 2 * x + y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y + x; + } + __VERIFIER_assert((y*y) - 2*x + y == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/ps2-ll_unwindbound20.yml b/c/nla-digbench-scaling/ps2-ll_unwindbound20.yml new file mode 100644 index 00000000000..d4a38f45efb --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_unwindbound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps2-ll_unwindbound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps2-ll_unwindbound5.c b/c/nla-digbench-scaling/ps2-ll_unwindbound5.c new file mode 100644 index 00000000000..8ba2e358a7e --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_unwindbound5.c @@ -0,0 +1,40 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps2-ll.c", 3, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int k; + long long y, x, c; + k = __VERIFIER_nondet_int(); + + y = 0; + x = 0; + c = 0; + + while (counter++<5) { + __VERIFIER_assert((y * y) - 2 * x + y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y + x; + } + __VERIFIER_assert((y*y) - 2*x + y == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/ps2-ll_unwindbound5.yml b/c/nla-digbench-scaling/ps2-ll_unwindbound5.yml new file mode 100644 index 00000000000..2e2cde5c43b --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_unwindbound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps2-ll_unwindbound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps2-ll_unwindbound50.c b/c/nla-digbench-scaling/ps2-ll_unwindbound50.c new file mode 100644 index 00000000000..3d2327d8f26 --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_unwindbound50.c @@ -0,0 +1,40 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps2-ll.c", 3, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + int k; + long long y, x, c; + k = __VERIFIER_nondet_int(); + + y = 0; + x = 0; + c = 0; + + while (counter++<50) { + __VERIFIER_assert((y * y) - 2 * x + y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y + x; + } + __VERIFIER_assert((y*y) - 2*x + y == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/ps2-ll_unwindbound50.yml b/c/nla-digbench-scaling/ps2-ll_unwindbound50.yml new file mode 100644 index 00000000000..5b58081ce92 --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_unwindbound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps2-ll_unwindbound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps2-ll_valuebound1.c b/c/nla-digbench-scaling/ps2-ll_valuebound1.c new file mode 100644 index 00000000000..0d37139627f --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_valuebound1.c @@ -0,0 +1,40 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps2-ll.c", 3, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int k; + long long y, x, c; + k = __VERIFIER_nondet_int(); + assume_abort_if_not(k>=0 && k<=1); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert((y * y) - 2 * x + y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y + x; + } + __VERIFIER_assert((y*y) - 2*x + y == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/ps2-ll_valuebound1.yml b/c/nla-digbench-scaling/ps2-ll_valuebound1.yml new file mode 100644 index 00000000000..2c2778c6b32 --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_valuebound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps2-ll_valuebound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps2-ll_valuebound10.c b/c/nla-digbench-scaling/ps2-ll_valuebound10.c new file mode 100644 index 00000000000..5e134f4478c --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_valuebound10.c @@ -0,0 +1,40 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps2-ll.c", 3, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int k; + long long y, x, c; + k = __VERIFIER_nondet_int(); + assume_abort_if_not(k>=0 && k<=10); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert((y * y) - 2 * x + y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y + x; + } + __VERIFIER_assert((y*y) - 2*x + y == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/ps2-ll_valuebound10.yml b/c/nla-digbench-scaling/ps2-ll_valuebound10.yml new file mode 100644 index 00000000000..17f68b8c389 --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_valuebound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps2-ll_valuebound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps2-ll_valuebound100.c b/c/nla-digbench-scaling/ps2-ll_valuebound100.c new file mode 100644 index 00000000000..4b1ed7551b6 --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_valuebound100.c @@ -0,0 +1,40 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps2-ll.c", 3, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int k; + long long y, x, c; + k = __VERIFIER_nondet_int(); + assume_abort_if_not(k>=0 && k<=100); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert((y * y) - 2 * x + y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y + x; + } + __VERIFIER_assert((y*y) - 2*x + y == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/ps2-ll_valuebound100.yml b/c/nla-digbench-scaling/ps2-ll_valuebound100.yml new file mode 100644 index 00000000000..f3f05e0c6da --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_valuebound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps2-ll_valuebound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps2-ll_valuebound2.c b/c/nla-digbench-scaling/ps2-ll_valuebound2.c new file mode 100644 index 00000000000..4b03c090046 --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_valuebound2.c @@ -0,0 +1,40 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps2-ll.c", 3, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int k; + long long y, x, c; + k = __VERIFIER_nondet_int(); + assume_abort_if_not(k>=0 && k<=2); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert((y * y) - 2 * x + y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y + x; + } + __VERIFIER_assert((y*y) - 2*x + y == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/ps2-ll_valuebound2.yml b/c/nla-digbench-scaling/ps2-ll_valuebound2.yml new file mode 100644 index 00000000000..d93cdda429c --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_valuebound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps2-ll_valuebound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps2-ll_valuebound20.c b/c/nla-digbench-scaling/ps2-ll_valuebound20.c new file mode 100644 index 00000000000..964b7bff25e --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_valuebound20.c @@ -0,0 +1,40 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps2-ll.c", 3, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int k; + long long y, x, c; + k = __VERIFIER_nondet_int(); + assume_abort_if_not(k>=0 && k<=20); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert((y * y) - 2 * x + y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y + x; + } + __VERIFIER_assert((y*y) - 2*x + y == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/ps2-ll_valuebound20.yml b/c/nla-digbench-scaling/ps2-ll_valuebound20.yml new file mode 100644 index 00000000000..18e0990f666 --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_valuebound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps2-ll_valuebound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps2-ll_valuebound5.c b/c/nla-digbench-scaling/ps2-ll_valuebound5.c new file mode 100644 index 00000000000..070605c23c1 --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_valuebound5.c @@ -0,0 +1,40 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps2-ll.c", 3, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int k; + long long y, x, c; + k = __VERIFIER_nondet_int(); + assume_abort_if_not(k>=0 && k<=5); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert((y * y) - 2 * x + y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y + x; + } + __VERIFIER_assert((y*y) - 2*x + y == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/ps2-ll_valuebound5.yml b/c/nla-digbench-scaling/ps2-ll_valuebound5.yml new file mode 100644 index 00000000000..3d18a59e0a5 --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_valuebound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps2-ll_valuebound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps2-ll_valuebound50.c b/c/nla-digbench-scaling/ps2-ll_valuebound50.c new file mode 100644 index 00000000000..57aa36ebb50 --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_valuebound50.c @@ -0,0 +1,40 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps2-ll.c", 3, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + int k; + long long y, x, c; + k = __VERIFIER_nondet_int(); + assume_abort_if_not(k>=0 && k<=50); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert((y * y) - 2 * x + y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y + x; + } + __VERIFIER_assert((y*y) - 2*x + y == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/ps2-ll_valuebound50.yml b/c/nla-digbench-scaling/ps2-ll_valuebound50.yml new file mode 100644 index 00000000000..d000a8ec17f --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_valuebound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps2-ll_valuebound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps2_unwindbound1.c b/c/nla-digbench-scaling/ps2_unwindbound1.c deleted file mode 100644 index 7a92716fda8..00000000000 --- a/c/nla-digbench-scaling/ps2_unwindbound1.c +++ /dev/null @@ -1,38 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<1) { - __VERIFIER_assert((y * y) - 2 * x + y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y + x; - } - __VERIFIER_assert((y*y) - 2*x + y == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/ps2_unwindbound1.yml b/c/nla-digbench-scaling/ps2_unwindbound1.yml deleted file mode 100644 index fba28e36635..00000000000 --- a/c/nla-digbench-scaling/ps2_unwindbound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps2_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps2_unwindbound10.c b/c/nla-digbench-scaling/ps2_unwindbound10.c deleted file mode 100644 index ddb5035ab72..00000000000 --- a/c/nla-digbench-scaling/ps2_unwindbound10.c +++ /dev/null @@ -1,38 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<10) { - __VERIFIER_assert((y * y) - 2 * x + y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y + x; - } - __VERIFIER_assert((y*y) - 2*x + y == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/ps2_unwindbound10.yml b/c/nla-digbench-scaling/ps2_unwindbound10.yml deleted file mode 100644 index 2b30644136e..00000000000 --- a/c/nla-digbench-scaling/ps2_unwindbound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps2_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps2_unwindbound100.c b/c/nla-digbench-scaling/ps2_unwindbound100.c deleted file mode 100644 index 4ff09372f93..00000000000 --- a/c/nla-digbench-scaling/ps2_unwindbound100.c +++ /dev/null @@ -1,38 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<100) { - __VERIFIER_assert((y * y) - 2 * x + y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y + x; - } - __VERIFIER_assert((y*y) - 2*x + y == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/ps2_unwindbound100.yml b/c/nla-digbench-scaling/ps2_unwindbound100.yml deleted file mode 100644 index 3ec5243b0ea..00000000000 --- a/c/nla-digbench-scaling/ps2_unwindbound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps2_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps2_unwindbound2.c b/c/nla-digbench-scaling/ps2_unwindbound2.c deleted file mode 100644 index b5ca6370fea..00000000000 --- a/c/nla-digbench-scaling/ps2_unwindbound2.c +++ /dev/null @@ -1,38 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<2) { - __VERIFIER_assert((y * y) - 2 * x + y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y + x; - } - __VERIFIER_assert((y*y) - 2*x + y == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/ps2_unwindbound2.yml b/c/nla-digbench-scaling/ps2_unwindbound2.yml deleted file mode 100644 index 7d5a4703959..00000000000 --- a/c/nla-digbench-scaling/ps2_unwindbound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps2_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps2_unwindbound20.c b/c/nla-digbench-scaling/ps2_unwindbound20.c deleted file mode 100644 index 316eef9d26c..00000000000 --- a/c/nla-digbench-scaling/ps2_unwindbound20.c +++ /dev/null @@ -1,38 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<20) { - __VERIFIER_assert((y * y) - 2 * x + y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y + x; - } - __VERIFIER_assert((y*y) - 2*x + y == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/ps2_unwindbound20.yml b/c/nla-digbench-scaling/ps2_unwindbound20.yml deleted file mode 100644 index cc06c4a982a..00000000000 --- a/c/nla-digbench-scaling/ps2_unwindbound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps2_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps2_unwindbound5.c b/c/nla-digbench-scaling/ps2_unwindbound5.c deleted file mode 100644 index e361dc7ea0d..00000000000 --- a/c/nla-digbench-scaling/ps2_unwindbound5.c +++ /dev/null @@ -1,38 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<5) { - __VERIFIER_assert((y * y) - 2 * x + y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y + x; - } - __VERIFIER_assert((y*y) - 2*x + y == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/ps2_unwindbound5.yml b/c/nla-digbench-scaling/ps2_unwindbound5.yml deleted file mode 100644 index 87930c81a0e..00000000000 --- a/c/nla-digbench-scaling/ps2_unwindbound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps2_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps2_unwindbound50.c b/c/nla-digbench-scaling/ps2_unwindbound50.c deleted file mode 100644 index 2f135f1afaf..00000000000 --- a/c/nla-digbench-scaling/ps2_unwindbound50.c +++ /dev/null @@ -1,38 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<50) { - __VERIFIER_assert((y * y) - 2 * x + y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y + x; - } - __VERIFIER_assert((y*y) - 2*x + y == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/ps2_unwindbound50.yml b/c/nla-digbench-scaling/ps2_unwindbound50.yml deleted file mode 100644 index 5ac57968e7f..00000000000 --- a/c/nla-digbench-scaling/ps2_unwindbound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps2_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps2_valuebound1.c b/c/nla-digbench-scaling/ps2_valuebound1.c deleted file mode 100644 index 9e8d5c0f01b..00000000000 --- a/c/nla-digbench-scaling/ps2_valuebound1.c +++ /dev/null @@ -1,38 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=1); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert((y * y) - 2 * x + y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y + x; - } - __VERIFIER_assert((y*y) - 2*x + y == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/ps2_valuebound1.yml b/c/nla-digbench-scaling/ps2_valuebound1.yml deleted file mode 100644 index 382fa0d6332..00000000000 --- a/c/nla-digbench-scaling/ps2_valuebound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps2_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps2_valuebound10.c b/c/nla-digbench-scaling/ps2_valuebound10.c deleted file mode 100644 index 8482d1d7e45..00000000000 --- a/c/nla-digbench-scaling/ps2_valuebound10.c +++ /dev/null @@ -1,38 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=10); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert((y * y) - 2 * x + y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y + x; - } - __VERIFIER_assert((y*y) - 2*x + y == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/ps2_valuebound10.yml b/c/nla-digbench-scaling/ps2_valuebound10.yml deleted file mode 100644 index 0b880e5e87c..00000000000 --- a/c/nla-digbench-scaling/ps2_valuebound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps2_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps2_valuebound100.c b/c/nla-digbench-scaling/ps2_valuebound100.c deleted file mode 100644 index 1f0de056695..00000000000 --- a/c/nla-digbench-scaling/ps2_valuebound100.c +++ /dev/null @@ -1,38 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=100); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert((y * y) - 2 * x + y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y + x; - } - __VERIFIER_assert((y*y) - 2*x + y == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/ps2_valuebound100.yml b/c/nla-digbench-scaling/ps2_valuebound100.yml deleted file mode 100644 index d96ba39acd7..00000000000 --- a/c/nla-digbench-scaling/ps2_valuebound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps2_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps2_valuebound2.c b/c/nla-digbench-scaling/ps2_valuebound2.c deleted file mode 100644 index ef0d5a7af88..00000000000 --- a/c/nla-digbench-scaling/ps2_valuebound2.c +++ /dev/null @@ -1,38 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=2); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert((y * y) - 2 * x + y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y + x; - } - __VERIFIER_assert((y*y) - 2*x + y == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/ps2_valuebound2.yml b/c/nla-digbench-scaling/ps2_valuebound2.yml deleted file mode 100644 index 9210029d544..00000000000 --- a/c/nla-digbench-scaling/ps2_valuebound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps2_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps2_valuebound20.c b/c/nla-digbench-scaling/ps2_valuebound20.c deleted file mode 100644 index bf675c447e4..00000000000 --- a/c/nla-digbench-scaling/ps2_valuebound20.c +++ /dev/null @@ -1,38 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=20); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert((y * y) - 2 * x + y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y + x; - } - __VERIFIER_assert((y*y) - 2*x + y == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/ps2_valuebound20.yml b/c/nla-digbench-scaling/ps2_valuebound20.yml deleted file mode 100644 index ba338fcec81..00000000000 --- a/c/nla-digbench-scaling/ps2_valuebound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps2_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps2_valuebound5.c b/c/nla-digbench-scaling/ps2_valuebound5.c deleted file mode 100644 index 7098a57c31b..00000000000 --- a/c/nla-digbench-scaling/ps2_valuebound5.c +++ /dev/null @@ -1,38 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=5); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert((y * y) - 2 * x + y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y + x; - } - __VERIFIER_assert((y*y) - 2*x + y == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/ps2_valuebound5.yml b/c/nla-digbench-scaling/ps2_valuebound5.yml deleted file mode 100644 index 362fda17c65..00000000000 --- a/c/nla-digbench-scaling/ps2_valuebound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps2_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps2_valuebound50.c b/c/nla-digbench-scaling/ps2_valuebound50.c deleted file mode 100644 index 41a5c6778cc..00000000000 --- a/c/nla-digbench-scaling/ps2_valuebound50.c +++ /dev/null @@ -1,38 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=50); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert((y * y) - 2 * x + y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y + x; - } - __VERIFIER_assert((y*y) - 2*x + y == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/ps2_valuebound50.yml b/c/nla-digbench-scaling/ps2_valuebound50.yml deleted file mode 100644 index 2a7714821b0..00000000000 --- a/c/nla-digbench-scaling/ps2_valuebound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps2_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps3-ll_unwindbound1.c b/c/nla-digbench-scaling/ps3-ll_unwindbound1.c new file mode 100644 index 00000000000..614cd7c4f19 --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_unwindbound1.c @@ -0,0 +1,39 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps3-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + + y = 0; + x = 0; + c = 0; + + while (counter++<1) { + __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y + x; + } + __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/ps3-ll_unwindbound1.yml b/c/nla-digbench-scaling/ps3-ll_unwindbound1.yml new file mode 100644 index 00000000000..e8d714eac7b --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_unwindbound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps3-ll_unwindbound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps3-ll_unwindbound10.c b/c/nla-digbench-scaling/ps3-ll_unwindbound10.c new file mode 100644 index 00000000000..8c5c7727440 --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_unwindbound10.c @@ -0,0 +1,39 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps3-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + + y = 0; + x = 0; + c = 0; + + while (counter++<10) { + __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y + x; + } + __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/ps3-ll_unwindbound10.yml b/c/nla-digbench-scaling/ps3-ll_unwindbound10.yml new file mode 100644 index 00000000000..40343d4f568 --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_unwindbound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps3-ll_unwindbound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps3-ll_unwindbound100.c b/c/nla-digbench-scaling/ps3-ll_unwindbound100.c new file mode 100644 index 00000000000..8406679471e --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_unwindbound100.c @@ -0,0 +1,39 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps3-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + + y = 0; + x = 0; + c = 0; + + while (counter++<100) { + __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y + x; + } + __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/ps3-ll_unwindbound100.yml b/c/nla-digbench-scaling/ps3-ll_unwindbound100.yml new file mode 100644 index 00000000000..8f5de42d0eb --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_unwindbound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps3-ll_unwindbound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps3-ll_unwindbound2.c b/c/nla-digbench-scaling/ps3-ll_unwindbound2.c new file mode 100644 index 00000000000..3926d01328e --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_unwindbound2.c @@ -0,0 +1,39 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps3-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + + y = 0; + x = 0; + c = 0; + + while (counter++<2) { + __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y + x; + } + __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/ps3-ll_unwindbound2.yml b/c/nla-digbench-scaling/ps3-ll_unwindbound2.yml new file mode 100644 index 00000000000..e61a31575e7 --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_unwindbound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps3-ll_unwindbound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps3-ll_unwindbound20.c b/c/nla-digbench-scaling/ps3-ll_unwindbound20.c new file mode 100644 index 00000000000..9a260cefaa5 --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_unwindbound20.c @@ -0,0 +1,39 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps3-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + + y = 0; + x = 0; + c = 0; + + while (counter++<20) { + __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y + x; + } + __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/ps3-ll_unwindbound20.yml b/c/nla-digbench-scaling/ps3-ll_unwindbound20.yml new file mode 100644 index 00000000000..2e27e7a7eee --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_unwindbound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps3-ll_unwindbound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps3-ll_unwindbound5.c b/c/nla-digbench-scaling/ps3-ll_unwindbound5.c new file mode 100644 index 00000000000..4dddcd3ca84 --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_unwindbound5.c @@ -0,0 +1,39 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps3-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + + y = 0; + x = 0; + c = 0; + + while (counter++<5) { + __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y + x; + } + __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/ps3-ll_unwindbound5.yml b/c/nla-digbench-scaling/ps3-ll_unwindbound5.yml new file mode 100644 index 00000000000..363e948d170 --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_unwindbound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps3-ll_unwindbound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps3-ll_unwindbound50.c b/c/nla-digbench-scaling/ps3-ll_unwindbound50.c new file mode 100644 index 00000000000..eaaadd3c312 --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_unwindbound50.c @@ -0,0 +1,39 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps3-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + + y = 0; + x = 0; + c = 0; + + while (counter++<50) { + __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y + x; + } + __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/ps3-ll_unwindbound50.yml b/c/nla-digbench-scaling/ps3-ll_unwindbound50.yml new file mode 100644 index 00000000000..f2426c16394 --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_unwindbound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps3-ll_unwindbound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps3-ll_valuebound1.c b/c/nla-digbench-scaling/ps3-ll_valuebound1.c new file mode 100644 index 00000000000..2071ecb74b0 --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_valuebound1.c @@ -0,0 +1,39 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps3-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k>=0 && k<=1); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y + x; + } + __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/ps3-ll_valuebound1.yml b/c/nla-digbench-scaling/ps3-ll_valuebound1.yml new file mode 100644 index 00000000000..b690bb766b3 --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_valuebound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps3-ll_valuebound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps3-ll_valuebound10.c b/c/nla-digbench-scaling/ps3-ll_valuebound10.c new file mode 100644 index 00000000000..def95e40a52 --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_valuebound10.c @@ -0,0 +1,39 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps3-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k>=0 && k<=10); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y + x; + } + __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/ps3-ll_valuebound10.yml b/c/nla-digbench-scaling/ps3-ll_valuebound10.yml new file mode 100644 index 00000000000..7fe43ac80ee --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_valuebound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps3-ll_valuebound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps3-ll_valuebound100.c b/c/nla-digbench-scaling/ps3-ll_valuebound100.c new file mode 100644 index 00000000000..bf42d2291ac --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_valuebound100.c @@ -0,0 +1,39 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps3-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k>=0 && k<=100); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y + x; + } + __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/ps3-ll_valuebound100.yml b/c/nla-digbench-scaling/ps3-ll_valuebound100.yml new file mode 100644 index 00000000000..b13c89fa24c --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_valuebound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps3-ll_valuebound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps3-ll_valuebound2.c b/c/nla-digbench-scaling/ps3-ll_valuebound2.c new file mode 100644 index 00000000000..bebc970ef9e --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_valuebound2.c @@ -0,0 +1,39 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps3-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k>=0 && k<=2); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y + x; + } + __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/ps3-ll_valuebound2.yml b/c/nla-digbench-scaling/ps3-ll_valuebound2.yml new file mode 100644 index 00000000000..434b4cface7 --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_valuebound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps3-ll_valuebound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps3-ll_valuebound20.c b/c/nla-digbench-scaling/ps3-ll_valuebound20.c new file mode 100644 index 00000000000..ee5290f4cd5 --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_valuebound20.c @@ -0,0 +1,39 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps3-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k>=0 && k<=20); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y + x; + } + __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/ps3-ll_valuebound20.yml b/c/nla-digbench-scaling/ps3-ll_valuebound20.yml new file mode 100644 index 00000000000..f9c59c01ff6 --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_valuebound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps3-ll_valuebound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps3-ll_valuebound5.c b/c/nla-digbench-scaling/ps3-ll_valuebound5.c new file mode 100644 index 00000000000..24b9ae63ffd --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_valuebound5.c @@ -0,0 +1,39 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps3-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k>=0 && k<=5); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y + x; + } + __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/ps3-ll_valuebound5.yml b/c/nla-digbench-scaling/ps3-ll_valuebound5.yml new file mode 100644 index 00000000000..aa528334da7 --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_valuebound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps3-ll_valuebound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps3-ll_valuebound50.c b/c/nla-digbench-scaling/ps3-ll_valuebound50.c new file mode 100644 index 00000000000..d171da4dd8e --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_valuebound50.c @@ -0,0 +1,39 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps3-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k>=0 && k<=50); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y + x; + } + __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/ps3-ll_valuebound50.yml b/c/nla-digbench-scaling/ps3-ll_valuebound50.yml new file mode 100644 index 00000000000..1f43cfb7137 --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_valuebound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps3-ll_valuebound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps3_unwindbound1.c b/c/nla-digbench-scaling/ps3_unwindbound1.c deleted file mode 100644 index 9280dda82da..00000000000 --- a/c/nla-digbench-scaling/ps3_unwindbound1.c +++ /dev/null @@ -1,37 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<1) { - __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y + x; - } - __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/ps3_unwindbound1.yml b/c/nla-digbench-scaling/ps3_unwindbound1.yml deleted file mode 100644 index 7668ad8171b..00000000000 --- a/c/nla-digbench-scaling/ps3_unwindbound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps3_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps3_unwindbound10.c b/c/nla-digbench-scaling/ps3_unwindbound10.c deleted file mode 100644 index e0082d1b4bf..00000000000 --- a/c/nla-digbench-scaling/ps3_unwindbound10.c +++ /dev/null @@ -1,37 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<10) { - __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y + x; - } - __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/ps3_unwindbound10.yml b/c/nla-digbench-scaling/ps3_unwindbound10.yml deleted file mode 100644 index f9ec9502d57..00000000000 --- a/c/nla-digbench-scaling/ps3_unwindbound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps3_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps3_unwindbound100.c b/c/nla-digbench-scaling/ps3_unwindbound100.c deleted file mode 100644 index 68d9bc359dc..00000000000 --- a/c/nla-digbench-scaling/ps3_unwindbound100.c +++ /dev/null @@ -1,37 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<100) { - __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y + x; - } - __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/ps3_unwindbound100.yml b/c/nla-digbench-scaling/ps3_unwindbound100.yml deleted file mode 100644 index e0005e347fa..00000000000 --- a/c/nla-digbench-scaling/ps3_unwindbound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps3_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps3_unwindbound2.c b/c/nla-digbench-scaling/ps3_unwindbound2.c deleted file mode 100644 index 4bd94ef9461..00000000000 --- a/c/nla-digbench-scaling/ps3_unwindbound2.c +++ /dev/null @@ -1,37 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<2) { - __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y + x; - } - __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/ps3_unwindbound2.yml b/c/nla-digbench-scaling/ps3_unwindbound2.yml deleted file mode 100644 index 77b2a0cdf0f..00000000000 --- a/c/nla-digbench-scaling/ps3_unwindbound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps3_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps3_unwindbound20.c b/c/nla-digbench-scaling/ps3_unwindbound20.c deleted file mode 100644 index 606e387f8a5..00000000000 --- a/c/nla-digbench-scaling/ps3_unwindbound20.c +++ /dev/null @@ -1,37 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<20) { - __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y + x; - } - __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/ps3_unwindbound20.yml b/c/nla-digbench-scaling/ps3_unwindbound20.yml deleted file mode 100644 index e961363c9eb..00000000000 --- a/c/nla-digbench-scaling/ps3_unwindbound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps3_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps3_unwindbound5.c b/c/nla-digbench-scaling/ps3_unwindbound5.c deleted file mode 100644 index 84f6f892349..00000000000 --- a/c/nla-digbench-scaling/ps3_unwindbound5.c +++ /dev/null @@ -1,37 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<5) { - __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y + x; - } - __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/ps3_unwindbound5.yml b/c/nla-digbench-scaling/ps3_unwindbound5.yml deleted file mode 100644 index 0a52d1fc946..00000000000 --- a/c/nla-digbench-scaling/ps3_unwindbound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps3_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps3_unwindbound50.c b/c/nla-digbench-scaling/ps3_unwindbound50.c deleted file mode 100644 index cb5c9f6400f..00000000000 --- a/c/nla-digbench-scaling/ps3_unwindbound50.c +++ /dev/null @@ -1,37 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<50) { - __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y + x; - } - __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/ps3_unwindbound50.yml b/c/nla-digbench-scaling/ps3_unwindbound50.yml deleted file mode 100644 index 77da6ac0486..00000000000 --- a/c/nla-digbench-scaling/ps3_unwindbound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps3_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps3_valuebound1.c b/c/nla-digbench-scaling/ps3_valuebound1.c deleted file mode 100644 index 8acdde77a2b..00000000000 --- a/c/nla-digbench-scaling/ps3_valuebound1.c +++ /dev/null @@ -1,37 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=1); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y + x; - } - __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/ps3_valuebound1.yml b/c/nla-digbench-scaling/ps3_valuebound1.yml deleted file mode 100644 index e58f5bceebc..00000000000 --- a/c/nla-digbench-scaling/ps3_valuebound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps3_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps3_valuebound10.c b/c/nla-digbench-scaling/ps3_valuebound10.c deleted file mode 100644 index d45c9b1c730..00000000000 --- a/c/nla-digbench-scaling/ps3_valuebound10.c +++ /dev/null @@ -1,37 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=10); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y + x; - } - __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/ps3_valuebound10.yml b/c/nla-digbench-scaling/ps3_valuebound10.yml deleted file mode 100644 index 98e7da2a08f..00000000000 --- a/c/nla-digbench-scaling/ps3_valuebound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps3_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps3_valuebound100.c b/c/nla-digbench-scaling/ps3_valuebound100.c deleted file mode 100644 index aacb681558f..00000000000 --- a/c/nla-digbench-scaling/ps3_valuebound100.c +++ /dev/null @@ -1,37 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=100); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y + x; - } - __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/ps3_valuebound100.yml b/c/nla-digbench-scaling/ps3_valuebound100.yml deleted file mode 100644 index bd173ba105e..00000000000 --- a/c/nla-digbench-scaling/ps3_valuebound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps3_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps3_valuebound2.c b/c/nla-digbench-scaling/ps3_valuebound2.c deleted file mode 100644 index 55785c0ad58..00000000000 --- a/c/nla-digbench-scaling/ps3_valuebound2.c +++ /dev/null @@ -1,37 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=2); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y + x; - } - __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/ps3_valuebound2.yml b/c/nla-digbench-scaling/ps3_valuebound2.yml deleted file mode 100644 index 0495b18c3e6..00000000000 --- a/c/nla-digbench-scaling/ps3_valuebound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps3_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps3_valuebound20.c b/c/nla-digbench-scaling/ps3_valuebound20.c deleted file mode 100644 index 7779cbbbadf..00000000000 --- a/c/nla-digbench-scaling/ps3_valuebound20.c +++ /dev/null @@ -1,37 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=20); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y + x; - } - __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/ps3_valuebound20.yml b/c/nla-digbench-scaling/ps3_valuebound20.yml deleted file mode 100644 index 4f7d13b6500..00000000000 --- a/c/nla-digbench-scaling/ps3_valuebound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps3_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps3_valuebound5.c b/c/nla-digbench-scaling/ps3_valuebound5.c deleted file mode 100644 index c0ef88f4dfb..00000000000 --- a/c/nla-digbench-scaling/ps3_valuebound5.c +++ /dev/null @@ -1,37 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=5); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y + x; - } - __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/ps3_valuebound5.yml b/c/nla-digbench-scaling/ps3_valuebound5.yml deleted file mode 100644 index 3967307d51d..00000000000 --- a/c/nla-digbench-scaling/ps3_valuebound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps3_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps3_valuebound50.c b/c/nla-digbench-scaling/ps3_valuebound50.c deleted file mode 100644 index 8e0207317f7..00000000000 --- a/c/nla-digbench-scaling/ps3_valuebound50.c +++ /dev/null @@ -1,37 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=50); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y + x; - } - __VERIFIER_assert(6*x - 2*y*y*y - 3*y*y - y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/ps3_valuebound50.yml b/c/nla-digbench-scaling/ps3_valuebound50.yml deleted file mode 100644 index 0e1b36a8f17..00000000000 --- a/c/nla-digbench-scaling/ps3_valuebound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps3_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps4-ll_unwindbound1.c b/c/nla-digbench-scaling/ps4-ll_unwindbound1.c new file mode 100644 index 00000000000..4722f457186 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_unwindbound1.c @@ -0,0 +1,40 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps4-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + + y = 0; + x = 0; + c = 0; + + while (counter++<1) { + __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y + x; + } + __VERIFIER_assert(k*y - (y*y) == 0); + __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/ps4-ll_unwindbound1.yml b/c/nla-digbench-scaling/ps4-ll_unwindbound1.yml new file mode 100644 index 00000000000..dc58b61fb03 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_unwindbound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps4-ll_unwindbound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps4-ll_unwindbound10.c b/c/nla-digbench-scaling/ps4-ll_unwindbound10.c new file mode 100644 index 00000000000..0ad91825e22 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_unwindbound10.c @@ -0,0 +1,40 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps4-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + + y = 0; + x = 0; + c = 0; + + while (counter++<10) { + __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y + x; + } + __VERIFIER_assert(k*y - (y*y) == 0); + __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/ps4-ll_unwindbound10.yml b/c/nla-digbench-scaling/ps4-ll_unwindbound10.yml new file mode 100644 index 00000000000..d7ea133d008 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_unwindbound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps4-ll_unwindbound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps4-ll_unwindbound100.c b/c/nla-digbench-scaling/ps4-ll_unwindbound100.c new file mode 100644 index 00000000000..e0dfa5066f1 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_unwindbound100.c @@ -0,0 +1,40 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps4-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + + y = 0; + x = 0; + c = 0; + + while (counter++<100) { + __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y + x; + } + __VERIFIER_assert(k*y - (y*y) == 0); + __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/ps4-ll_unwindbound100.yml b/c/nla-digbench-scaling/ps4-ll_unwindbound100.yml new file mode 100644 index 00000000000..48a6877121e --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_unwindbound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps4-ll_unwindbound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps4-ll_unwindbound2.c b/c/nla-digbench-scaling/ps4-ll_unwindbound2.c new file mode 100644 index 00000000000..ca4ef3e2bd8 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_unwindbound2.c @@ -0,0 +1,40 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps4-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + + y = 0; + x = 0; + c = 0; + + while (counter++<2) { + __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y + x; + } + __VERIFIER_assert(k*y - (y*y) == 0); + __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/ps4-ll_unwindbound2.yml b/c/nla-digbench-scaling/ps4-ll_unwindbound2.yml new file mode 100644 index 00000000000..28413eae88d --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_unwindbound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps4-ll_unwindbound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps4-ll_unwindbound20.c b/c/nla-digbench-scaling/ps4-ll_unwindbound20.c new file mode 100644 index 00000000000..ebfef0e2f49 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_unwindbound20.c @@ -0,0 +1,40 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps4-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + + y = 0; + x = 0; + c = 0; + + while (counter++<20) { + __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y + x; + } + __VERIFIER_assert(k*y - (y*y) == 0); + __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/ps4-ll_unwindbound20.yml b/c/nla-digbench-scaling/ps4-ll_unwindbound20.yml new file mode 100644 index 00000000000..7fd8f7e1dcf --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_unwindbound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps4-ll_unwindbound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps4-ll_unwindbound5.c b/c/nla-digbench-scaling/ps4-ll_unwindbound5.c new file mode 100644 index 00000000000..4a60f30911c --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_unwindbound5.c @@ -0,0 +1,40 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps4-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + + y = 0; + x = 0; + c = 0; + + while (counter++<5) { + __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y + x; + } + __VERIFIER_assert(k*y - (y*y) == 0); + __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/ps4-ll_unwindbound5.yml b/c/nla-digbench-scaling/ps4-ll_unwindbound5.yml new file mode 100644 index 00000000000..3405560fb2d --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_unwindbound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps4-ll_unwindbound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps4-ll_unwindbound50.c b/c/nla-digbench-scaling/ps4-ll_unwindbound50.c new file mode 100644 index 00000000000..cb310e8bb14 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_unwindbound50.c @@ -0,0 +1,40 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps4-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + + y = 0; + x = 0; + c = 0; + + while (counter++<50) { + __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y + x; + } + __VERIFIER_assert(k*y - (y*y) == 0); + __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/ps4-ll_unwindbound50.yml b/c/nla-digbench-scaling/ps4-ll_unwindbound50.yml new file mode 100644 index 00000000000..4b311a5a652 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_unwindbound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps4-ll_unwindbound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps4-ll_valuebound1.c b/c/nla-digbench-scaling/ps4-ll_valuebound1.c new file mode 100644 index 00000000000..0b53d1422d2 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_valuebound1.c @@ -0,0 +1,40 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps4-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k>=0 && k<=1); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y + x; + } + __VERIFIER_assert(k*y - (y*y) == 0); + __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/ps4-ll_valuebound1.yml b/c/nla-digbench-scaling/ps4-ll_valuebound1.yml new file mode 100644 index 00000000000..e7af5c0afd2 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_valuebound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps4-ll_valuebound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps4-ll_valuebound10.c b/c/nla-digbench-scaling/ps4-ll_valuebound10.c new file mode 100644 index 00000000000..f43b1c063a5 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_valuebound10.c @@ -0,0 +1,40 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps4-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k>=0 && k<=10); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y + x; + } + __VERIFIER_assert(k*y - (y*y) == 0); + __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/ps4-ll_valuebound10.yml b/c/nla-digbench-scaling/ps4-ll_valuebound10.yml new file mode 100644 index 00000000000..bbc3e71a4fe --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_valuebound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps4-ll_valuebound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps4-ll_valuebound100.c b/c/nla-digbench-scaling/ps4-ll_valuebound100.c new file mode 100644 index 00000000000..645a5f55b71 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_valuebound100.c @@ -0,0 +1,40 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps4-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k>=0 && k<=100); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y + x; + } + __VERIFIER_assert(k*y - (y*y) == 0); + __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/ps4-ll_valuebound100.yml b/c/nla-digbench-scaling/ps4-ll_valuebound100.yml new file mode 100644 index 00000000000..dfc04854b86 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_valuebound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps4-ll_valuebound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps4-ll_valuebound2.c b/c/nla-digbench-scaling/ps4-ll_valuebound2.c new file mode 100644 index 00000000000..4d7c3fb791d --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_valuebound2.c @@ -0,0 +1,40 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps4-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k>=0 && k<=2); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y + x; + } + __VERIFIER_assert(k*y - (y*y) == 0); + __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/ps4-ll_valuebound2.yml b/c/nla-digbench-scaling/ps4-ll_valuebound2.yml new file mode 100644 index 00000000000..623e6a54f88 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_valuebound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps4-ll_valuebound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps4-ll_valuebound20.c b/c/nla-digbench-scaling/ps4-ll_valuebound20.c new file mode 100644 index 00000000000..ad7478d7d30 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_valuebound20.c @@ -0,0 +1,40 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps4-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k>=0 && k<=20); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y + x; + } + __VERIFIER_assert(k*y - (y*y) == 0); + __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/ps4-ll_valuebound20.yml b/c/nla-digbench-scaling/ps4-ll_valuebound20.yml new file mode 100644 index 00000000000..ff1c0b73b30 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_valuebound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps4-ll_valuebound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps4-ll_valuebound5.c b/c/nla-digbench-scaling/ps4-ll_valuebound5.c new file mode 100644 index 00000000000..fcc45d53edf --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_valuebound5.c @@ -0,0 +1,40 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps4-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k>=0 && k<=5); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y + x; + } + __VERIFIER_assert(k*y - (y*y) == 0); + __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/ps4-ll_valuebound5.yml b/c/nla-digbench-scaling/ps4-ll_valuebound5.yml new file mode 100644 index 00000000000..d3b6d3e98da --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_valuebound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps4-ll_valuebound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps4-ll_valuebound50.c b/c/nla-digbench-scaling/ps4-ll_valuebound50.c new file mode 100644 index 00000000000..5f3a6f1a7a7 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_valuebound50.c @@ -0,0 +1,40 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps4-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k>=0 && k<=50); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y + x; + } + __VERIFIER_assert(k*y - (y*y) == 0); + __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); + return 0; +} diff --git a/c/nla-digbench-scaling/ps4-ll_valuebound50.yml b/c/nla-digbench-scaling/ps4-ll_valuebound50.yml new file mode 100644 index 00000000000..16c15c3bc69 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_valuebound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps4-ll_valuebound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps4_unwindbound1.c b/c/nla-digbench-scaling/ps4_unwindbound1.c deleted file mode 100644 index eb99fc0aef4..00000000000 --- a/c/nla-digbench-scaling/ps4_unwindbound1.c +++ /dev/null @@ -1,38 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<1) { - __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y + x; - } - __VERIFIER_assert(k*y - (y*y) == 0); - __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/ps4_unwindbound1.yml b/c/nla-digbench-scaling/ps4_unwindbound1.yml deleted file mode 100644 index 3a038237d9a..00000000000 --- a/c/nla-digbench-scaling/ps4_unwindbound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps4_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps4_unwindbound10.c b/c/nla-digbench-scaling/ps4_unwindbound10.c deleted file mode 100644 index deac701dae8..00000000000 --- a/c/nla-digbench-scaling/ps4_unwindbound10.c +++ /dev/null @@ -1,38 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<10) { - __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y + x; - } - __VERIFIER_assert(k*y - (y*y) == 0); - __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/ps4_unwindbound10.yml b/c/nla-digbench-scaling/ps4_unwindbound10.yml deleted file mode 100644 index 39dc4a50fd6..00000000000 --- a/c/nla-digbench-scaling/ps4_unwindbound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps4_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps4_unwindbound100.c b/c/nla-digbench-scaling/ps4_unwindbound100.c deleted file mode 100644 index c5825153cc1..00000000000 --- a/c/nla-digbench-scaling/ps4_unwindbound100.c +++ /dev/null @@ -1,38 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<100) { - __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y + x; - } - __VERIFIER_assert(k*y - (y*y) == 0); - __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/ps4_unwindbound100.yml b/c/nla-digbench-scaling/ps4_unwindbound100.yml deleted file mode 100644 index de05f7dce8b..00000000000 --- a/c/nla-digbench-scaling/ps4_unwindbound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps4_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps4_unwindbound2.c b/c/nla-digbench-scaling/ps4_unwindbound2.c deleted file mode 100644 index 879ac15e796..00000000000 --- a/c/nla-digbench-scaling/ps4_unwindbound2.c +++ /dev/null @@ -1,38 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<2) { - __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y + x; - } - __VERIFIER_assert(k*y - (y*y) == 0); - __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/ps4_unwindbound2.yml b/c/nla-digbench-scaling/ps4_unwindbound2.yml deleted file mode 100644 index 5100fe21136..00000000000 --- a/c/nla-digbench-scaling/ps4_unwindbound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps4_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps4_unwindbound20.c b/c/nla-digbench-scaling/ps4_unwindbound20.c deleted file mode 100644 index ec3e247ddfb..00000000000 --- a/c/nla-digbench-scaling/ps4_unwindbound20.c +++ /dev/null @@ -1,38 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<20) { - __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y + x; - } - __VERIFIER_assert(k*y - (y*y) == 0); - __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/ps4_unwindbound20.yml b/c/nla-digbench-scaling/ps4_unwindbound20.yml deleted file mode 100644 index 2d2a53f7eaa..00000000000 --- a/c/nla-digbench-scaling/ps4_unwindbound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps4_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps4_unwindbound5.c b/c/nla-digbench-scaling/ps4_unwindbound5.c deleted file mode 100644 index 52c0c260ec9..00000000000 --- a/c/nla-digbench-scaling/ps4_unwindbound5.c +++ /dev/null @@ -1,38 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<5) { - __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y + x; - } - __VERIFIER_assert(k*y - (y*y) == 0); - __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/ps4_unwindbound5.yml b/c/nla-digbench-scaling/ps4_unwindbound5.yml deleted file mode 100644 index b90b23f1837..00000000000 --- a/c/nla-digbench-scaling/ps4_unwindbound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps4_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps4_unwindbound50.c b/c/nla-digbench-scaling/ps4_unwindbound50.c deleted file mode 100644 index 68fdff3edfc..00000000000 --- a/c/nla-digbench-scaling/ps4_unwindbound50.c +++ /dev/null @@ -1,38 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<50) { - __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y + x; - } - __VERIFIER_assert(k*y - (y*y) == 0); - __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/ps4_unwindbound50.yml b/c/nla-digbench-scaling/ps4_unwindbound50.yml deleted file mode 100644 index d0bbb98bcc9..00000000000 --- a/c/nla-digbench-scaling/ps4_unwindbound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps4_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps4_valuebound1.c b/c/nla-digbench-scaling/ps4_valuebound1.c deleted file mode 100644 index de5ea889135..00000000000 --- a/c/nla-digbench-scaling/ps4_valuebound1.c +++ /dev/null @@ -1,38 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=1); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y + x; - } - __VERIFIER_assert(k*y - (y*y) == 0); - __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/ps4_valuebound1.yml b/c/nla-digbench-scaling/ps4_valuebound1.yml deleted file mode 100644 index d867e6d714c..00000000000 --- a/c/nla-digbench-scaling/ps4_valuebound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps4_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps4_valuebound10.c b/c/nla-digbench-scaling/ps4_valuebound10.c deleted file mode 100644 index 4009ee93957..00000000000 --- a/c/nla-digbench-scaling/ps4_valuebound10.c +++ /dev/null @@ -1,38 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=10); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y + x; - } - __VERIFIER_assert(k*y - (y*y) == 0); - __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/ps4_valuebound10.yml b/c/nla-digbench-scaling/ps4_valuebound10.yml deleted file mode 100644 index 7aacd15277c..00000000000 --- a/c/nla-digbench-scaling/ps4_valuebound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps4_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps4_valuebound100.c b/c/nla-digbench-scaling/ps4_valuebound100.c deleted file mode 100644 index ffe24e616a1..00000000000 --- a/c/nla-digbench-scaling/ps4_valuebound100.c +++ /dev/null @@ -1,38 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=100); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y + x; - } - __VERIFIER_assert(k*y - (y*y) == 0); - __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/ps4_valuebound100.yml b/c/nla-digbench-scaling/ps4_valuebound100.yml deleted file mode 100644 index efb02d1789f..00000000000 --- a/c/nla-digbench-scaling/ps4_valuebound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps4_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps4_valuebound2.c b/c/nla-digbench-scaling/ps4_valuebound2.c deleted file mode 100644 index e9611ffc951..00000000000 --- a/c/nla-digbench-scaling/ps4_valuebound2.c +++ /dev/null @@ -1,38 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=2); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y + x; - } - __VERIFIER_assert(k*y - (y*y) == 0); - __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/ps4_valuebound2.yml b/c/nla-digbench-scaling/ps4_valuebound2.yml deleted file mode 100644 index 42062700d55..00000000000 --- a/c/nla-digbench-scaling/ps4_valuebound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps4_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps4_valuebound20.c b/c/nla-digbench-scaling/ps4_valuebound20.c deleted file mode 100644 index 2a99686a6b6..00000000000 --- a/c/nla-digbench-scaling/ps4_valuebound20.c +++ /dev/null @@ -1,38 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=20); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y + x; - } - __VERIFIER_assert(k*y - (y*y) == 0); - __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/ps4_valuebound20.yml b/c/nla-digbench-scaling/ps4_valuebound20.yml deleted file mode 100644 index e3d785e2923..00000000000 --- a/c/nla-digbench-scaling/ps4_valuebound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps4_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps4_valuebound5.c b/c/nla-digbench-scaling/ps4_valuebound5.c deleted file mode 100644 index 5ba9bba9ee0..00000000000 --- a/c/nla-digbench-scaling/ps4_valuebound5.c +++ /dev/null @@ -1,38 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=5); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y + x; - } - __VERIFIER_assert(k*y - (y*y) == 0); - __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/ps4_valuebound5.yml b/c/nla-digbench-scaling/ps4_valuebound5.yml deleted file mode 100644 index dae95cd2caa..00000000000 --- a/c/nla-digbench-scaling/ps4_valuebound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps4_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps4_valuebound50.c b/c/nla-digbench-scaling/ps4_valuebound50.c deleted file mode 100644 index d60ee6660ee..00000000000 --- a/c/nla-digbench-scaling/ps4_valuebound50.c +++ /dev/null @@ -1,38 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=50); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y + x; - } - __VERIFIER_assert(k*y - (y*y) == 0); - __VERIFIER_assert(4*x - y*y*y*y - 2*y*y*y - y*y == 0); - return 0; -} diff --git a/c/nla-digbench-scaling/ps4_valuebound50.yml b/c/nla-digbench-scaling/ps4_valuebound50.yml deleted file mode 100644 index e2aa6b05ac7..00000000000 --- a/c/nla-digbench-scaling/ps4_valuebound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps4_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps5-ll_unwindbound1.c b/c/nla-digbench-scaling/ps5-ll_unwindbound1.c new file mode 100644 index 00000000000..2847bb0e9f3 --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_unwindbound1.c @@ -0,0 +1,42 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps5-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k <= 256); + + y = 0; + x = 0; + c = 0; + + while (counter++<1) { + __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y * y + x; + } + + __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); + __VERIFIER_assert(k*y == y*y); + return 0; +} diff --git a/c/nla-digbench-scaling/ps5-ll_unwindbound1.yml b/c/nla-digbench-scaling/ps5-ll_unwindbound1.yml new file mode 100644 index 00000000000..21708af1adc --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_unwindbound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps5-ll_unwindbound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps5-ll_unwindbound10.c b/c/nla-digbench-scaling/ps5-ll_unwindbound10.c new file mode 100644 index 00000000000..f2ef1da559b --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_unwindbound10.c @@ -0,0 +1,42 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps5-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k <= 256); + + y = 0; + x = 0; + c = 0; + + while (counter++<10) { + __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y * y + x; + } + + __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); + __VERIFIER_assert(k*y == y*y); + return 0; +} diff --git a/c/nla-digbench-scaling/ps5-ll_unwindbound10.yml b/c/nla-digbench-scaling/ps5-ll_unwindbound10.yml new file mode 100644 index 00000000000..ea5e6be2c38 --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_unwindbound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps5-ll_unwindbound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps5-ll_unwindbound100.c b/c/nla-digbench-scaling/ps5-ll_unwindbound100.c new file mode 100644 index 00000000000..7605b769e1d --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_unwindbound100.c @@ -0,0 +1,42 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps5-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k <= 256); + + y = 0; + x = 0; + c = 0; + + while (counter++<100) { + __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y * y + x; + } + + __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); + __VERIFIER_assert(k*y == y*y); + return 0; +} diff --git a/c/nla-digbench-scaling/ps5-ll_unwindbound100.yml b/c/nla-digbench-scaling/ps5-ll_unwindbound100.yml new file mode 100644 index 00000000000..fd0189161f1 --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_unwindbound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps5-ll_unwindbound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps5-ll_unwindbound2.c b/c/nla-digbench-scaling/ps5-ll_unwindbound2.c new file mode 100644 index 00000000000..0389c3f0ead --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_unwindbound2.c @@ -0,0 +1,42 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps5-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k <= 256); + + y = 0; + x = 0; + c = 0; + + while (counter++<2) { + __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y * y + x; + } + + __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); + __VERIFIER_assert(k*y == y*y); + return 0; +} diff --git a/c/nla-digbench-scaling/ps5-ll_unwindbound2.yml b/c/nla-digbench-scaling/ps5-ll_unwindbound2.yml new file mode 100644 index 00000000000..8adb8c0f933 --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_unwindbound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps5-ll_unwindbound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps5-ll_unwindbound20.c b/c/nla-digbench-scaling/ps5-ll_unwindbound20.c new file mode 100644 index 00000000000..215c31e4214 --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_unwindbound20.c @@ -0,0 +1,42 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps5-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k <= 256); + + y = 0; + x = 0; + c = 0; + + while (counter++<20) { + __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y * y + x; + } + + __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); + __VERIFIER_assert(k*y == y*y); + return 0; +} diff --git a/c/nla-digbench-scaling/ps5-ll_unwindbound20.yml b/c/nla-digbench-scaling/ps5-ll_unwindbound20.yml new file mode 100644 index 00000000000..db6ee7967f9 --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_unwindbound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps5-ll_unwindbound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps5-ll_unwindbound5.c b/c/nla-digbench-scaling/ps5-ll_unwindbound5.c new file mode 100644 index 00000000000..3eef481d9f9 --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_unwindbound5.c @@ -0,0 +1,42 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps5-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k <= 256); + + y = 0; + x = 0; + c = 0; + + while (counter++<5) { + __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y * y + x; + } + + __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); + __VERIFIER_assert(k*y == y*y); + return 0; +} diff --git a/c/nla-digbench-scaling/ps5-ll_unwindbound5.yml b/c/nla-digbench-scaling/ps5-ll_unwindbound5.yml new file mode 100644 index 00000000000..d8c34158528 --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_unwindbound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps5-ll_unwindbound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps5-ll_unwindbound50.c b/c/nla-digbench-scaling/ps5-ll_unwindbound50.c new file mode 100644 index 00000000000..1a501827c06 --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_unwindbound50.c @@ -0,0 +1,42 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps5-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k <= 256); + + y = 0; + x = 0; + c = 0; + + while (counter++<50) { + __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y * y + x; + } + + __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); + __VERIFIER_assert(k*y == y*y); + return 0; +} diff --git a/c/nla-digbench-scaling/ps5-ll_unwindbound50.yml b/c/nla-digbench-scaling/ps5-ll_unwindbound50.yml new file mode 100644 index 00000000000..a7cdfedce3c --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_unwindbound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps5-ll_unwindbound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps5-ll_valuebound1.c b/c/nla-digbench-scaling/ps5-ll_valuebound1.c new file mode 100644 index 00000000000..5ba2553e58a --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_valuebound1.c @@ -0,0 +1,42 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps5-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k>=0 && k<=1); + assume_abort_if_not(k <= 256); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y * y + x; + } + + __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); + __VERIFIER_assert(k*y == y*y); + return 0; +} diff --git a/c/nla-digbench-scaling/ps5-ll_valuebound1.yml b/c/nla-digbench-scaling/ps5-ll_valuebound1.yml new file mode 100644 index 00000000000..1126976aef9 --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_valuebound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps5-ll_valuebound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps5-ll_valuebound10.c b/c/nla-digbench-scaling/ps5-ll_valuebound10.c new file mode 100644 index 00000000000..ecea19780dd --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_valuebound10.c @@ -0,0 +1,42 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps5-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k>=0 && k<=10); + assume_abort_if_not(k <= 256); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y * y + x; + } + + __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); + __VERIFIER_assert(k*y == y*y); + return 0; +} diff --git a/c/nla-digbench-scaling/ps5-ll_valuebound10.yml b/c/nla-digbench-scaling/ps5-ll_valuebound10.yml new file mode 100644 index 00000000000..76b3e8cef2c --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_valuebound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps5-ll_valuebound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps5-ll_valuebound100.c b/c/nla-digbench-scaling/ps5-ll_valuebound100.c new file mode 100644 index 00000000000..0757d8bbb6a --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_valuebound100.c @@ -0,0 +1,42 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps5-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k>=0 && k<=100); + assume_abort_if_not(k <= 256); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y * y + x; + } + + __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); + __VERIFIER_assert(k*y == y*y); + return 0; +} diff --git a/c/nla-digbench-scaling/ps5-ll_valuebound100.yml b/c/nla-digbench-scaling/ps5-ll_valuebound100.yml new file mode 100644 index 00000000000..758cee140fa --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_valuebound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps5-ll_valuebound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps5-ll_valuebound2.c b/c/nla-digbench-scaling/ps5-ll_valuebound2.c new file mode 100644 index 00000000000..eebf62a2618 --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_valuebound2.c @@ -0,0 +1,42 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps5-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k>=0 && k<=2); + assume_abort_if_not(k <= 256); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y * y + x; + } + + __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); + __VERIFIER_assert(k*y == y*y); + return 0; +} diff --git a/c/nla-digbench-scaling/ps5-ll_valuebound2.yml b/c/nla-digbench-scaling/ps5-ll_valuebound2.yml new file mode 100644 index 00000000000..d6109642aaa --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_valuebound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps5-ll_valuebound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps5-ll_valuebound20.c b/c/nla-digbench-scaling/ps5-ll_valuebound20.c new file mode 100644 index 00000000000..8c42de178af --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_valuebound20.c @@ -0,0 +1,42 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps5-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k>=0 && k<=20); + assume_abort_if_not(k <= 256); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y * y + x; + } + + __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); + __VERIFIER_assert(k*y == y*y); + return 0; +} diff --git a/c/nla-digbench-scaling/ps5-ll_valuebound20.yml b/c/nla-digbench-scaling/ps5-ll_valuebound20.yml new file mode 100644 index 00000000000..d47f4310712 --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_valuebound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps5-ll_valuebound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps5-ll_valuebound5.c b/c/nla-digbench-scaling/ps5-ll_valuebound5.c new file mode 100644 index 00000000000..20e3eb25152 --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_valuebound5.c @@ -0,0 +1,42 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps5-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k>=0 && k<=5); + assume_abort_if_not(k <= 256); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y * y + x; + } + + __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); + __VERIFIER_assert(k*y == y*y); + return 0; +} diff --git a/c/nla-digbench-scaling/ps5-ll_valuebound5.yml b/c/nla-digbench-scaling/ps5-ll_valuebound5.yml new file mode 100644 index 00000000000..d6e609cd116 --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_valuebound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps5-ll_valuebound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps5-ll_valuebound50.c b/c/nla-digbench-scaling/ps5-ll_valuebound50.c new file mode 100644 index 00000000000..292cb8fa1c9 --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_valuebound50.c @@ -0,0 +1,42 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps5-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k>=0 && k<=50); + assume_abort_if_not(k <= 256); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y * y + x; + } + + __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); + __VERIFIER_assert(k*y == y*y); + return 0; +} diff --git a/c/nla-digbench-scaling/ps5-ll_valuebound50.yml b/c/nla-digbench-scaling/ps5-ll_valuebound50.yml new file mode 100644 index 00000000000..2994eb8c626 --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_valuebound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps5-ll_valuebound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps5_unwindbound1.c b/c/nla-digbench-scaling/ps5_unwindbound1.c deleted file mode 100644 index f2d22d8f4aa..00000000000 --- a/c/nla-digbench-scaling/ps5_unwindbound1.c +++ /dev/null @@ -1,39 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<1) { - __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y * y + x; - } - - __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); - __VERIFIER_assert(k*y == y*y); - return 0; -} diff --git a/c/nla-digbench-scaling/ps5_unwindbound1.yml b/c/nla-digbench-scaling/ps5_unwindbound1.yml deleted file mode 100644 index 6b9e53c53af..00000000000 --- a/c/nla-digbench-scaling/ps5_unwindbound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps5_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps5_unwindbound10.c b/c/nla-digbench-scaling/ps5_unwindbound10.c deleted file mode 100644 index 8e6dd6888c9..00000000000 --- a/c/nla-digbench-scaling/ps5_unwindbound10.c +++ /dev/null @@ -1,39 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<10) { - __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y * y + x; - } - - __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); - __VERIFIER_assert(k*y == y*y); - return 0; -} diff --git a/c/nla-digbench-scaling/ps5_unwindbound10.yml b/c/nla-digbench-scaling/ps5_unwindbound10.yml deleted file mode 100644 index 9de67a76f29..00000000000 --- a/c/nla-digbench-scaling/ps5_unwindbound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps5_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps5_unwindbound100.c b/c/nla-digbench-scaling/ps5_unwindbound100.c deleted file mode 100644 index 240d38f1637..00000000000 --- a/c/nla-digbench-scaling/ps5_unwindbound100.c +++ /dev/null @@ -1,39 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<100) { - __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y * y + x; - } - - __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); - __VERIFIER_assert(k*y == y*y); - return 0; -} diff --git a/c/nla-digbench-scaling/ps5_unwindbound100.yml b/c/nla-digbench-scaling/ps5_unwindbound100.yml deleted file mode 100644 index ac85233394f..00000000000 --- a/c/nla-digbench-scaling/ps5_unwindbound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps5_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps5_unwindbound2.c b/c/nla-digbench-scaling/ps5_unwindbound2.c deleted file mode 100644 index 5d01a1816b1..00000000000 --- a/c/nla-digbench-scaling/ps5_unwindbound2.c +++ /dev/null @@ -1,39 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<2) { - __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y * y + x; - } - - __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); - __VERIFIER_assert(k*y == y*y); - return 0; -} diff --git a/c/nla-digbench-scaling/ps5_unwindbound2.yml b/c/nla-digbench-scaling/ps5_unwindbound2.yml deleted file mode 100644 index ec1c37d56e7..00000000000 --- a/c/nla-digbench-scaling/ps5_unwindbound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps5_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps5_unwindbound20.c b/c/nla-digbench-scaling/ps5_unwindbound20.c deleted file mode 100644 index ca26f37de8c..00000000000 --- a/c/nla-digbench-scaling/ps5_unwindbound20.c +++ /dev/null @@ -1,39 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<20) { - __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y * y + x; - } - - __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); - __VERIFIER_assert(k*y == y*y); - return 0; -} diff --git a/c/nla-digbench-scaling/ps5_unwindbound20.yml b/c/nla-digbench-scaling/ps5_unwindbound20.yml deleted file mode 100644 index b31e23eba40..00000000000 --- a/c/nla-digbench-scaling/ps5_unwindbound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps5_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps5_unwindbound5.c b/c/nla-digbench-scaling/ps5_unwindbound5.c deleted file mode 100644 index 936275b3325..00000000000 --- a/c/nla-digbench-scaling/ps5_unwindbound5.c +++ /dev/null @@ -1,39 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<5) { - __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y * y + x; - } - - __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); - __VERIFIER_assert(k*y == y*y); - return 0; -} diff --git a/c/nla-digbench-scaling/ps5_unwindbound5.yml b/c/nla-digbench-scaling/ps5_unwindbound5.yml deleted file mode 100644 index bac115f68b1..00000000000 --- a/c/nla-digbench-scaling/ps5_unwindbound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps5_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps5_unwindbound50.c b/c/nla-digbench-scaling/ps5_unwindbound50.c deleted file mode 100644 index 6dc003c958c..00000000000 --- a/c/nla-digbench-scaling/ps5_unwindbound50.c +++ /dev/null @@ -1,39 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<50) { - __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y * y + x; - } - - __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); - __VERIFIER_assert(k*y == y*y); - return 0; -} diff --git a/c/nla-digbench-scaling/ps5_unwindbound50.yml b/c/nla-digbench-scaling/ps5_unwindbound50.yml deleted file mode 100644 index 576b5c73910..00000000000 --- a/c/nla-digbench-scaling/ps5_unwindbound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps5_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps5_valuebound1.c b/c/nla-digbench-scaling/ps5_valuebound1.c deleted file mode 100644 index 009db7871ed..00000000000 --- a/c/nla-digbench-scaling/ps5_valuebound1.c +++ /dev/null @@ -1,39 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=1); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y * y + x; - } - - __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); - __VERIFIER_assert(k*y == y*y); - return 0; -} diff --git a/c/nla-digbench-scaling/ps5_valuebound1.yml b/c/nla-digbench-scaling/ps5_valuebound1.yml deleted file mode 100644 index 222829ac835..00000000000 --- a/c/nla-digbench-scaling/ps5_valuebound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps5_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps5_valuebound10.c b/c/nla-digbench-scaling/ps5_valuebound10.c deleted file mode 100644 index a18a19b86c2..00000000000 --- a/c/nla-digbench-scaling/ps5_valuebound10.c +++ /dev/null @@ -1,39 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=10); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y * y + x; - } - - __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); - __VERIFIER_assert(k*y == y*y); - return 0; -} diff --git a/c/nla-digbench-scaling/ps5_valuebound10.yml b/c/nla-digbench-scaling/ps5_valuebound10.yml deleted file mode 100644 index 4ac3f0c5adf..00000000000 --- a/c/nla-digbench-scaling/ps5_valuebound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps5_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps5_valuebound100.c b/c/nla-digbench-scaling/ps5_valuebound100.c deleted file mode 100644 index 2fab6dbac7d..00000000000 --- a/c/nla-digbench-scaling/ps5_valuebound100.c +++ /dev/null @@ -1,39 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=100); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y * y + x; - } - - __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); - __VERIFIER_assert(k*y == y*y); - return 0; -} diff --git a/c/nla-digbench-scaling/ps5_valuebound100.yml b/c/nla-digbench-scaling/ps5_valuebound100.yml deleted file mode 100644 index e921f734e4b..00000000000 --- a/c/nla-digbench-scaling/ps5_valuebound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps5_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps5_valuebound2.c b/c/nla-digbench-scaling/ps5_valuebound2.c deleted file mode 100644 index dfccf0c8694..00000000000 --- a/c/nla-digbench-scaling/ps5_valuebound2.c +++ /dev/null @@ -1,39 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=2); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y * y + x; - } - - __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); - __VERIFIER_assert(k*y == y*y); - return 0; -} diff --git a/c/nla-digbench-scaling/ps5_valuebound2.yml b/c/nla-digbench-scaling/ps5_valuebound2.yml deleted file mode 100644 index 5513872d2df..00000000000 --- a/c/nla-digbench-scaling/ps5_valuebound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps5_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps5_valuebound20.c b/c/nla-digbench-scaling/ps5_valuebound20.c deleted file mode 100644 index fa1b7a53fff..00000000000 --- a/c/nla-digbench-scaling/ps5_valuebound20.c +++ /dev/null @@ -1,39 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=20); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y * y + x; - } - - __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); - __VERIFIER_assert(k*y == y*y); - return 0; -} diff --git a/c/nla-digbench-scaling/ps5_valuebound20.yml b/c/nla-digbench-scaling/ps5_valuebound20.yml deleted file mode 100644 index ff5aa807896..00000000000 --- a/c/nla-digbench-scaling/ps5_valuebound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps5_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps5_valuebound5.c b/c/nla-digbench-scaling/ps5_valuebound5.c deleted file mode 100644 index a63073fd240..00000000000 --- a/c/nla-digbench-scaling/ps5_valuebound5.c +++ /dev/null @@ -1,39 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=5); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y * y + x; - } - - __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); - __VERIFIER_assert(k*y == y*y); - return 0; -} diff --git a/c/nla-digbench-scaling/ps5_valuebound5.yml b/c/nla-digbench-scaling/ps5_valuebound5.yml deleted file mode 100644 index c0254c69fae..00000000000 --- a/c/nla-digbench-scaling/ps5_valuebound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps5_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps5_valuebound50.c b/c/nla-digbench-scaling/ps5_valuebound50.c deleted file mode 100644 index 430b73d1210..00000000000 --- a/c/nla-digbench-scaling/ps5_valuebound50.c +++ /dev/null @@ -1,39 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=50); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y * y + x; - } - - __VERIFIER_assert(6*y*y*y*y*y + 15*y*y*y*y + 10*y*y*y - 30*x - y == 0); - __VERIFIER_assert(k*y == y*y); - return 0; -} diff --git a/c/nla-digbench-scaling/ps5_valuebound50.yml b/c/nla-digbench-scaling/ps5_valuebound50.yml deleted file mode 100644 index a9c06d09a56..00000000000 --- a/c/nla-digbench-scaling/ps5_valuebound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps5_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps6-ll_unwindbound1.c b/c/nla-digbench-scaling/ps6-ll_unwindbound1.c new file mode 100644 index 00000000000..7e55477e45e --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_unwindbound1.c @@ -0,0 +1,42 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps6-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k <= 256); + + y = 0; + x = 0; + c = 0; + + while (counter++<1) { + __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y * y * y + x; + } + + __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); + __VERIFIER_assert(k*y == y*y); + return 0; +} diff --git a/c/nla-digbench-scaling/ps6-ll_unwindbound1.yml b/c/nla-digbench-scaling/ps6-ll_unwindbound1.yml new file mode 100644 index 00000000000..6fb28ed165b --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_unwindbound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps6-ll_unwindbound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps6-ll_unwindbound10.c b/c/nla-digbench-scaling/ps6-ll_unwindbound10.c new file mode 100644 index 00000000000..2a73014167c --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_unwindbound10.c @@ -0,0 +1,42 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps6-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k <= 256); + + y = 0; + x = 0; + c = 0; + + while (counter++<10) { + __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y * y * y + x; + } + + __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); + __VERIFIER_assert(k*y == y*y); + return 0; +} diff --git a/c/nla-digbench-scaling/ps6-ll_unwindbound10.yml b/c/nla-digbench-scaling/ps6-ll_unwindbound10.yml new file mode 100644 index 00000000000..1ab08af3d73 --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_unwindbound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps6-ll_unwindbound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps6-ll_unwindbound100.c b/c/nla-digbench-scaling/ps6-ll_unwindbound100.c new file mode 100644 index 00000000000..c8fd523af15 --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_unwindbound100.c @@ -0,0 +1,42 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps6-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k <= 256); + + y = 0; + x = 0; + c = 0; + + while (counter++<100) { + __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y * y * y + x; + } + + __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); + __VERIFIER_assert(k*y == y*y); + return 0; +} diff --git a/c/nla-digbench-scaling/ps6-ll_unwindbound100.yml b/c/nla-digbench-scaling/ps6-ll_unwindbound100.yml new file mode 100644 index 00000000000..351e24e7b84 --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_unwindbound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps6-ll_unwindbound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps6-ll_unwindbound2.c b/c/nla-digbench-scaling/ps6-ll_unwindbound2.c new file mode 100644 index 00000000000..361beab7427 --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_unwindbound2.c @@ -0,0 +1,42 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps6-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k <= 256); + + y = 0; + x = 0; + c = 0; + + while (counter++<2) { + __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y * y * y + x; + } + + __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); + __VERIFIER_assert(k*y == y*y); + return 0; +} diff --git a/c/nla-digbench-scaling/ps6-ll_unwindbound2.yml b/c/nla-digbench-scaling/ps6-ll_unwindbound2.yml new file mode 100644 index 00000000000..33724d14816 --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_unwindbound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps6-ll_unwindbound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps6-ll_unwindbound20.c b/c/nla-digbench-scaling/ps6-ll_unwindbound20.c new file mode 100644 index 00000000000..37535168d37 --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_unwindbound20.c @@ -0,0 +1,42 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps6-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k <= 256); + + y = 0; + x = 0; + c = 0; + + while (counter++<20) { + __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y * y * y + x; + } + + __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); + __VERIFIER_assert(k*y == y*y); + return 0; +} diff --git a/c/nla-digbench-scaling/ps6-ll_unwindbound20.yml b/c/nla-digbench-scaling/ps6-ll_unwindbound20.yml new file mode 100644 index 00000000000..d7508655b78 --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_unwindbound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps6-ll_unwindbound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps6-ll_unwindbound5.c b/c/nla-digbench-scaling/ps6-ll_unwindbound5.c new file mode 100644 index 00000000000..86c59ee5f13 --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_unwindbound5.c @@ -0,0 +1,42 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps6-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k <= 256); + + y = 0; + x = 0; + c = 0; + + while (counter++<5) { + __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y * y * y + x; + } + + __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); + __VERIFIER_assert(k*y == y*y); + return 0; +} diff --git a/c/nla-digbench-scaling/ps6-ll_unwindbound5.yml b/c/nla-digbench-scaling/ps6-ll_unwindbound5.yml new file mode 100644 index 00000000000..636743aa968 --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_unwindbound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps6-ll_unwindbound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps6-ll_unwindbound50.c b/c/nla-digbench-scaling/ps6-ll_unwindbound50.c new file mode 100644 index 00000000000..7c7aab07210 --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_unwindbound50.c @@ -0,0 +1,42 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps6-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int counter = 0; +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k <= 256); + + y = 0; + x = 0; + c = 0; + + while (counter++<50) { + __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y * y * y + x; + } + + __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); + __VERIFIER_assert(k*y == y*y); + return 0; +} diff --git a/c/nla-digbench-scaling/ps6-ll_unwindbound50.yml b/c/nla-digbench-scaling/ps6-ll_unwindbound50.yml new file mode 100644 index 00000000000..34fea262ae7 --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_unwindbound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps6-ll_unwindbound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps6-ll_valuebound1.c b/c/nla-digbench-scaling/ps6-ll_valuebound1.c new file mode 100644 index 00000000000..726c4fd44df --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_valuebound1.c @@ -0,0 +1,42 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps6-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k>=0 && k<=1); + assume_abort_if_not(k <= 256); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y * y * y + x; + } + + __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); + __VERIFIER_assert(k*y == y*y); + return 0; +} diff --git a/c/nla-digbench-scaling/ps6-ll_valuebound1.yml b/c/nla-digbench-scaling/ps6-ll_valuebound1.yml new file mode 100644 index 00000000000..5928f5d2744 --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_valuebound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps6-ll_valuebound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps6-ll_valuebound10.c b/c/nla-digbench-scaling/ps6-ll_valuebound10.c new file mode 100644 index 00000000000..e23f7f794d1 --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_valuebound10.c @@ -0,0 +1,42 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps6-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k>=0 && k<=10); + assume_abort_if_not(k <= 256); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y * y * y + x; + } + + __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); + __VERIFIER_assert(k*y == y*y); + return 0; +} diff --git a/c/nla-digbench-scaling/ps6-ll_valuebound10.yml b/c/nla-digbench-scaling/ps6-ll_valuebound10.yml new file mode 100644 index 00000000000..64c3d40b5c1 --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_valuebound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps6-ll_valuebound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps6-ll_valuebound100.c b/c/nla-digbench-scaling/ps6-ll_valuebound100.c new file mode 100644 index 00000000000..c1f55addf93 --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_valuebound100.c @@ -0,0 +1,42 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps6-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k>=0 && k<=100); + assume_abort_if_not(k <= 256); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y * y * y + x; + } + + __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); + __VERIFIER_assert(k*y == y*y); + return 0; +} diff --git a/c/nla-digbench-scaling/ps6-ll_valuebound100.yml b/c/nla-digbench-scaling/ps6-ll_valuebound100.yml new file mode 100644 index 00000000000..a3478ff00aa --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_valuebound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps6-ll_valuebound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps6-ll_valuebound2.c b/c/nla-digbench-scaling/ps6-ll_valuebound2.c new file mode 100644 index 00000000000..29e1cd0072d --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_valuebound2.c @@ -0,0 +1,42 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps6-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k>=0 && k<=2); + assume_abort_if_not(k <= 256); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y * y * y + x; + } + + __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); + __VERIFIER_assert(k*y == y*y); + return 0; +} diff --git a/c/nla-digbench-scaling/ps6-ll_valuebound2.yml b/c/nla-digbench-scaling/ps6-ll_valuebound2.yml new file mode 100644 index 00000000000..3e995450715 --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_valuebound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps6-ll_valuebound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps6-ll_valuebound20.c b/c/nla-digbench-scaling/ps6-ll_valuebound20.c new file mode 100644 index 00000000000..2a99f171393 --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_valuebound20.c @@ -0,0 +1,42 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps6-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k>=0 && k<=20); + assume_abort_if_not(k <= 256); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y * y * y + x; + } + + __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); + __VERIFIER_assert(k*y == y*y); + return 0; +} diff --git a/c/nla-digbench-scaling/ps6-ll_valuebound20.yml b/c/nla-digbench-scaling/ps6-ll_valuebound20.yml new file mode 100644 index 00000000000..cf30d434f46 --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_valuebound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps6-ll_valuebound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps6-ll_valuebound5.c b/c/nla-digbench-scaling/ps6-ll_valuebound5.c new file mode 100644 index 00000000000..3059c490c75 --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_valuebound5.c @@ -0,0 +1,42 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps6-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k>=0 && k<=5); + assume_abort_if_not(k <= 256); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y * y * y + x; + } + + __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); + __VERIFIER_assert(k*y == y*y); + return 0; +} diff --git a/c/nla-digbench-scaling/ps6-ll_valuebound5.yml b/c/nla-digbench-scaling/ps6-ll_valuebound5.yml new file mode 100644 index 00000000000..b802e2f292b --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_valuebound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps6-ll_valuebound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps6-ll_valuebound50.c b/c/nla-digbench-scaling/ps6-ll_valuebound50.c new file mode 100644 index 00000000000..c44af557592 --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_valuebound50.c @@ -0,0 +1,42 @@ +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "ps6-ll.c", 3, "reach_error"); } +extern short __VERIFIER_nondet_short(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + +int main() { + short k; + long long y, x, c; + k = __VERIFIER_nondet_short(); + assume_abort_if_not(k>=0 && k<=50); + assume_abort_if_not(k <= 256); + + y = 0; + x = 0; + c = 0; + + while (1) { + __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); + + if (!(c < k)) + break; + + c = c + 1; + y = y + 1; + x = y * y * y * y * y + x; + } + + __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); + __VERIFIER_assert(k*y == y*y); + return 0; +} diff --git a/c/nla-digbench-scaling/ps6-ll_valuebound50.yml b/c/nla-digbench-scaling/ps6-ll_valuebound50.yml new file mode 100644 index 00000000000..06a6358daee --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_valuebound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'ps6-ll_valuebound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps6_unwindbound1.c b/c/nla-digbench-scaling/ps6_unwindbound1.c deleted file mode 100644 index 15772fde763..00000000000 --- a/c/nla-digbench-scaling/ps6_unwindbound1.c +++ /dev/null @@ -1,39 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<1) { - __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y * y * y + x; - } - - __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); - __VERIFIER_assert(k*y == y*y); - return 0; -} diff --git a/c/nla-digbench-scaling/ps6_unwindbound1.yml b/c/nla-digbench-scaling/ps6_unwindbound1.yml deleted file mode 100644 index faaea76431b..00000000000 --- a/c/nla-digbench-scaling/ps6_unwindbound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps6_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps6_unwindbound10.c b/c/nla-digbench-scaling/ps6_unwindbound10.c deleted file mode 100644 index 144d22d2ccf..00000000000 --- a/c/nla-digbench-scaling/ps6_unwindbound10.c +++ /dev/null @@ -1,39 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<10) { - __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y * y * y + x; - } - - __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); - __VERIFIER_assert(k*y == y*y); - return 0; -} diff --git a/c/nla-digbench-scaling/ps6_unwindbound10.yml b/c/nla-digbench-scaling/ps6_unwindbound10.yml deleted file mode 100644 index 9660222b8c8..00000000000 --- a/c/nla-digbench-scaling/ps6_unwindbound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps6_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps6_unwindbound100.c b/c/nla-digbench-scaling/ps6_unwindbound100.c deleted file mode 100644 index a4f4690f29a..00000000000 --- a/c/nla-digbench-scaling/ps6_unwindbound100.c +++ /dev/null @@ -1,39 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<100) { - __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y * y * y + x; - } - - __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); - __VERIFIER_assert(k*y == y*y); - return 0; -} diff --git a/c/nla-digbench-scaling/ps6_unwindbound100.yml b/c/nla-digbench-scaling/ps6_unwindbound100.yml deleted file mode 100644 index 85414cd040d..00000000000 --- a/c/nla-digbench-scaling/ps6_unwindbound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps6_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps6_unwindbound2.c b/c/nla-digbench-scaling/ps6_unwindbound2.c deleted file mode 100644 index 9a743e4874b..00000000000 --- a/c/nla-digbench-scaling/ps6_unwindbound2.c +++ /dev/null @@ -1,39 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<2) { - __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y * y * y + x; - } - - __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); - __VERIFIER_assert(k*y == y*y); - return 0; -} diff --git a/c/nla-digbench-scaling/ps6_unwindbound2.yml b/c/nla-digbench-scaling/ps6_unwindbound2.yml deleted file mode 100644 index 84e08d49061..00000000000 --- a/c/nla-digbench-scaling/ps6_unwindbound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps6_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps6_unwindbound20.c b/c/nla-digbench-scaling/ps6_unwindbound20.c deleted file mode 100644 index d39b744c5da..00000000000 --- a/c/nla-digbench-scaling/ps6_unwindbound20.c +++ /dev/null @@ -1,39 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<20) { - __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y * y * y + x; - } - - __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); - __VERIFIER_assert(k*y == y*y); - return 0; -} diff --git a/c/nla-digbench-scaling/ps6_unwindbound20.yml b/c/nla-digbench-scaling/ps6_unwindbound20.yml deleted file mode 100644 index 23f873cf4dc..00000000000 --- a/c/nla-digbench-scaling/ps6_unwindbound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps6_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps6_unwindbound5.c b/c/nla-digbench-scaling/ps6_unwindbound5.c deleted file mode 100644 index 4199948d35e..00000000000 --- a/c/nla-digbench-scaling/ps6_unwindbound5.c +++ /dev/null @@ -1,39 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<5) { - __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y * y * y + x; - } - - __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); - __VERIFIER_assert(k*y == y*y); - return 0; -} diff --git a/c/nla-digbench-scaling/ps6_unwindbound5.yml b/c/nla-digbench-scaling/ps6_unwindbound5.yml deleted file mode 100644 index c0a26a25d4d..00000000000 --- a/c/nla-digbench-scaling/ps6_unwindbound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps6_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps6_unwindbound50.c b/c/nla-digbench-scaling/ps6_unwindbound50.c deleted file mode 100644 index a0368a5d7c9..00000000000 --- a/c/nla-digbench-scaling/ps6_unwindbound50.c +++ /dev/null @@ -1,39 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int counter = 0; -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - - y = 0; - x = 0; - c = 0; - - while (counter++<50) { - __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y * y * y + x; - } - - __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); - __VERIFIER_assert(k*y == y*y); - return 0; -} diff --git a/c/nla-digbench-scaling/ps6_unwindbound50.yml b/c/nla-digbench-scaling/ps6_unwindbound50.yml deleted file mode 100644 index ce5957121b8..00000000000 --- a/c/nla-digbench-scaling/ps6_unwindbound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps6_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps6_valuebound1.c b/c/nla-digbench-scaling/ps6_valuebound1.c deleted file mode 100644 index 720f9a21c7d..00000000000 --- a/c/nla-digbench-scaling/ps6_valuebound1.c +++ /dev/null @@ -1,39 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=1); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y * y * y + x; - } - - __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); - __VERIFIER_assert(k*y == y*y); - return 0; -} diff --git a/c/nla-digbench-scaling/ps6_valuebound1.yml b/c/nla-digbench-scaling/ps6_valuebound1.yml deleted file mode 100644 index 3f39a602ce7..00000000000 --- a/c/nla-digbench-scaling/ps6_valuebound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps6_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps6_valuebound10.c b/c/nla-digbench-scaling/ps6_valuebound10.c deleted file mode 100644 index 2442545f1d5..00000000000 --- a/c/nla-digbench-scaling/ps6_valuebound10.c +++ /dev/null @@ -1,39 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=10); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y * y * y + x; - } - - __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); - __VERIFIER_assert(k*y == y*y); - return 0; -} diff --git a/c/nla-digbench-scaling/ps6_valuebound10.yml b/c/nla-digbench-scaling/ps6_valuebound10.yml deleted file mode 100644 index a31a670bce4..00000000000 --- a/c/nla-digbench-scaling/ps6_valuebound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps6_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps6_valuebound100.c b/c/nla-digbench-scaling/ps6_valuebound100.c deleted file mode 100644 index 35698b73cdc..00000000000 --- a/c/nla-digbench-scaling/ps6_valuebound100.c +++ /dev/null @@ -1,39 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=100); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y * y * y + x; - } - - __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); - __VERIFIER_assert(k*y == y*y); - return 0; -} diff --git a/c/nla-digbench-scaling/ps6_valuebound100.yml b/c/nla-digbench-scaling/ps6_valuebound100.yml deleted file mode 100644 index 73fa678f094..00000000000 --- a/c/nla-digbench-scaling/ps6_valuebound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps6_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps6_valuebound2.c b/c/nla-digbench-scaling/ps6_valuebound2.c deleted file mode 100644 index 3e4de50148b..00000000000 --- a/c/nla-digbench-scaling/ps6_valuebound2.c +++ /dev/null @@ -1,39 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=2); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y * y * y + x; - } - - __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); - __VERIFIER_assert(k*y == y*y); - return 0; -} diff --git a/c/nla-digbench-scaling/ps6_valuebound2.yml b/c/nla-digbench-scaling/ps6_valuebound2.yml deleted file mode 100644 index 5268cdd89c7..00000000000 --- a/c/nla-digbench-scaling/ps6_valuebound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps6_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps6_valuebound20.c b/c/nla-digbench-scaling/ps6_valuebound20.c deleted file mode 100644 index e8a4e7c2a00..00000000000 --- a/c/nla-digbench-scaling/ps6_valuebound20.c +++ /dev/null @@ -1,39 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=20); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y * y * y + x; - } - - __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); - __VERIFIER_assert(k*y == y*y); - return 0; -} diff --git a/c/nla-digbench-scaling/ps6_valuebound20.yml b/c/nla-digbench-scaling/ps6_valuebound20.yml deleted file mode 100644 index 6b5861c1d01..00000000000 --- a/c/nla-digbench-scaling/ps6_valuebound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps6_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps6_valuebound5.c b/c/nla-digbench-scaling/ps6_valuebound5.c deleted file mode 100644 index b95302090c6..00000000000 --- a/c/nla-digbench-scaling/ps6_valuebound5.c +++ /dev/null @@ -1,39 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=5); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y * y * y + x; - } - - __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); - __VERIFIER_assert(k*y == y*y); - return 0; -} diff --git a/c/nla-digbench-scaling/ps6_valuebound5.yml b/c/nla-digbench-scaling/ps6_valuebound5.yml deleted file mode 100644 index 43b4e1f14cd..00000000000 --- a/c/nla-digbench-scaling/ps6_valuebound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps6_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/ps6_valuebound50.c b/c/nla-digbench-scaling/ps6_valuebound50.c deleted file mode 100644 index ad3d9745be6..00000000000 --- a/c/nla-digbench-scaling/ps6_valuebound50.c +++ /dev/null @@ -1,39 +0,0 @@ -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - -int main() { - int k, y, x, c; - k = __VERIFIER_nondet_int(); - assume_abort_if_not(k>0 && k<=50); - - y = 0; - x = 0; - c = 0; - - while (1) { - __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); - - if (!(c < k)) - break; - - c = c + 1; - y = y + 1; - x = y * y * y * y * y + x; - } - - __VERIFIER_assert(-2*y*y*y*y*y*y - 6 * y*y*y*y*y - 5 * y*y*y*y + y*y + 12*x == 0); - __VERIFIER_assert(k*y == y*y); - return 0; -} diff --git a/c/nla-digbench-scaling/ps6_valuebound50.yml b/c/nla-digbench-scaling/ps6_valuebound50.yml deleted file mode 100644 index 739d55a118a..00000000000 --- a/c/nla-digbench-scaling/ps6_valuebound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'ps6_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/sqrt1-ll_unwindbound1.c b/c/nla-digbench-scaling/sqrt1-ll_unwindbound1.c new file mode 100644 index 00000000000..0266e8aea9f --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_unwindbound1.c @@ -0,0 +1,49 @@ +/* Compute the floor of the square root of a natural number */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "sqrt1-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + + +int counter = 0; +int main() { + int n; + long long a, s, t; + n = __VERIFIER_nondet_int(); + + a = 0; + s = 1; + t = 1; + + while (counter++<1) { + __VERIFIER_assert(t == 2*a + 1); + __VERIFIER_assert(s == (a + 1) * (a + 1)); + __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); + // the above 2 should be equiv to + + if (!(s <= n)) + break; + + a = a + 1; + t = t + 2; + s = s + t; + } + + __VERIFIER_assert(t == 2 * a + 1); + __VERIFIER_assert(s == (a + 1) * (a + 1)); + __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/sqrt1-ll_unwindbound1.yml b/c/nla-digbench-scaling/sqrt1-ll_unwindbound1.yml new file mode 100644 index 00000000000..950ca3423ed --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_unwindbound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'sqrt1-ll_unwindbound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/sqrt1-ll_unwindbound10.c b/c/nla-digbench-scaling/sqrt1-ll_unwindbound10.c new file mode 100644 index 00000000000..4ecdd8430f7 --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_unwindbound10.c @@ -0,0 +1,49 @@ +/* Compute the floor of the square root of a natural number */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "sqrt1-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + + +int counter = 0; +int main() { + int n; + long long a, s, t; + n = __VERIFIER_nondet_int(); + + a = 0; + s = 1; + t = 1; + + while (counter++<10) { + __VERIFIER_assert(t == 2*a + 1); + __VERIFIER_assert(s == (a + 1) * (a + 1)); + __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); + // the above 2 should be equiv to + + if (!(s <= n)) + break; + + a = a + 1; + t = t + 2; + s = s + t; + } + + __VERIFIER_assert(t == 2 * a + 1); + __VERIFIER_assert(s == (a + 1) * (a + 1)); + __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/sqrt1-ll_unwindbound10.yml b/c/nla-digbench-scaling/sqrt1-ll_unwindbound10.yml new file mode 100644 index 00000000000..0f08e94948a --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_unwindbound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'sqrt1-ll_unwindbound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/sqrt1-ll_unwindbound100.c b/c/nla-digbench-scaling/sqrt1-ll_unwindbound100.c new file mode 100644 index 00000000000..c8fbfbe0feb --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_unwindbound100.c @@ -0,0 +1,49 @@ +/* Compute the floor of the square root of a natural number */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "sqrt1-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + + +int counter = 0; +int main() { + int n; + long long a, s, t; + n = __VERIFIER_nondet_int(); + + a = 0; + s = 1; + t = 1; + + while (counter++<100) { + __VERIFIER_assert(t == 2*a + 1); + __VERIFIER_assert(s == (a + 1) * (a + 1)); + __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); + // the above 2 should be equiv to + + if (!(s <= n)) + break; + + a = a + 1; + t = t + 2; + s = s + t; + } + + __VERIFIER_assert(t == 2 * a + 1); + __VERIFIER_assert(s == (a + 1) * (a + 1)); + __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/sqrt1-ll_unwindbound100.yml b/c/nla-digbench-scaling/sqrt1-ll_unwindbound100.yml new file mode 100644 index 00000000000..ecd7f1d8a9e --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_unwindbound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'sqrt1-ll_unwindbound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/sqrt1-ll_unwindbound2.c b/c/nla-digbench-scaling/sqrt1-ll_unwindbound2.c new file mode 100644 index 00000000000..28e32ffc1d6 --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_unwindbound2.c @@ -0,0 +1,49 @@ +/* Compute the floor of the square root of a natural number */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "sqrt1-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + + +int counter = 0; +int main() { + int n; + long long a, s, t; + n = __VERIFIER_nondet_int(); + + a = 0; + s = 1; + t = 1; + + while (counter++<2) { + __VERIFIER_assert(t == 2*a + 1); + __VERIFIER_assert(s == (a + 1) * (a + 1)); + __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); + // the above 2 should be equiv to + + if (!(s <= n)) + break; + + a = a + 1; + t = t + 2; + s = s + t; + } + + __VERIFIER_assert(t == 2 * a + 1); + __VERIFIER_assert(s == (a + 1) * (a + 1)); + __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/sqrt1-ll_unwindbound2.yml b/c/nla-digbench-scaling/sqrt1-ll_unwindbound2.yml new file mode 100644 index 00000000000..0895d9adc78 --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_unwindbound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'sqrt1-ll_unwindbound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/sqrt1-ll_unwindbound20.c b/c/nla-digbench-scaling/sqrt1-ll_unwindbound20.c new file mode 100644 index 00000000000..c608a6d928c --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_unwindbound20.c @@ -0,0 +1,49 @@ +/* Compute the floor of the square root of a natural number */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "sqrt1-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + + +int counter = 0; +int main() { + int n; + long long a, s, t; + n = __VERIFIER_nondet_int(); + + a = 0; + s = 1; + t = 1; + + while (counter++<20) { + __VERIFIER_assert(t == 2*a + 1); + __VERIFIER_assert(s == (a + 1) * (a + 1)); + __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); + // the above 2 should be equiv to + + if (!(s <= n)) + break; + + a = a + 1; + t = t + 2; + s = s + t; + } + + __VERIFIER_assert(t == 2 * a + 1); + __VERIFIER_assert(s == (a + 1) * (a + 1)); + __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/sqrt1-ll_unwindbound20.yml b/c/nla-digbench-scaling/sqrt1-ll_unwindbound20.yml new file mode 100644 index 00000000000..a1dac53d9ae --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_unwindbound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'sqrt1-ll_unwindbound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/sqrt1-ll_unwindbound5.c b/c/nla-digbench-scaling/sqrt1-ll_unwindbound5.c new file mode 100644 index 00000000000..1c160673640 --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_unwindbound5.c @@ -0,0 +1,49 @@ +/* Compute the floor of the square root of a natural number */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "sqrt1-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + + +int counter = 0; +int main() { + int n; + long long a, s, t; + n = __VERIFIER_nondet_int(); + + a = 0; + s = 1; + t = 1; + + while (counter++<5) { + __VERIFIER_assert(t == 2*a + 1); + __VERIFIER_assert(s == (a + 1) * (a + 1)); + __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); + // the above 2 should be equiv to + + if (!(s <= n)) + break; + + a = a + 1; + t = t + 2; + s = s + t; + } + + __VERIFIER_assert(t == 2 * a + 1); + __VERIFIER_assert(s == (a + 1) * (a + 1)); + __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/sqrt1-ll_unwindbound5.yml b/c/nla-digbench-scaling/sqrt1-ll_unwindbound5.yml new file mode 100644 index 00000000000..7c8fe5e3195 --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_unwindbound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'sqrt1-ll_unwindbound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/sqrt1-ll_unwindbound50.c b/c/nla-digbench-scaling/sqrt1-ll_unwindbound50.c new file mode 100644 index 00000000000..a059c4d134a --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_unwindbound50.c @@ -0,0 +1,49 @@ +/* Compute the floor of the square root of a natural number */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "sqrt1-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + + +int counter = 0; +int main() { + int n; + long long a, s, t; + n = __VERIFIER_nondet_int(); + + a = 0; + s = 1; + t = 1; + + while (counter++<50) { + __VERIFIER_assert(t == 2*a + 1); + __VERIFIER_assert(s == (a + 1) * (a + 1)); + __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); + // the above 2 should be equiv to + + if (!(s <= n)) + break; + + a = a + 1; + t = t + 2; + s = s + t; + } + + __VERIFIER_assert(t == 2 * a + 1); + __VERIFIER_assert(s == (a + 1) * (a + 1)); + __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/sqrt1-ll_unwindbound50.yml b/c/nla-digbench-scaling/sqrt1-ll_unwindbound50.yml new file mode 100644 index 00000000000..0219a547153 --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_unwindbound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'sqrt1-ll_unwindbound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/sqrt1-ll_valuebound1.c b/c/nla-digbench-scaling/sqrt1-ll_valuebound1.c new file mode 100644 index 00000000000..32f177c1ad8 --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_valuebound1.c @@ -0,0 +1,49 @@ +/* Compute the floor of the square root of a natural number */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "sqrt1-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + + +int main() { + int n; + long long a, s, t; + n = __VERIFIER_nondet_int(); + assume_abort_if_not(n>=0 && n<=1); + + a = 0; + s = 1; + t = 1; + + while (1) { + __VERIFIER_assert(t == 2*a + 1); + __VERIFIER_assert(s == (a + 1) * (a + 1)); + __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); + // the above 2 should be equiv to + + if (!(s <= n)) + break; + + a = a + 1; + t = t + 2; + s = s + t; + } + + __VERIFIER_assert(t == 2 * a + 1); + __VERIFIER_assert(s == (a + 1) * (a + 1)); + __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/sqrt1-ll_valuebound1.yml b/c/nla-digbench-scaling/sqrt1-ll_valuebound1.yml new file mode 100644 index 00000000000..ccb61a2038c --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_valuebound1.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'sqrt1-ll_valuebound1.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/sqrt1-ll_valuebound10.c b/c/nla-digbench-scaling/sqrt1-ll_valuebound10.c new file mode 100644 index 00000000000..85edec53284 --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_valuebound10.c @@ -0,0 +1,49 @@ +/* Compute the floor of the square root of a natural number */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "sqrt1-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + + +int main() { + int n; + long long a, s, t; + n = __VERIFIER_nondet_int(); + assume_abort_if_not(n>=0 && n<=10); + + a = 0; + s = 1; + t = 1; + + while (1) { + __VERIFIER_assert(t == 2*a + 1); + __VERIFIER_assert(s == (a + 1) * (a + 1)); + __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); + // the above 2 should be equiv to + + if (!(s <= n)) + break; + + a = a + 1; + t = t + 2; + s = s + t; + } + + __VERIFIER_assert(t == 2 * a + 1); + __VERIFIER_assert(s == (a + 1) * (a + 1)); + __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/sqrt1-ll_valuebound10.yml b/c/nla-digbench-scaling/sqrt1-ll_valuebound10.yml new file mode 100644 index 00000000000..4e1f27cbc87 --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_valuebound10.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'sqrt1-ll_valuebound10.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/sqrt1-ll_valuebound100.c b/c/nla-digbench-scaling/sqrt1-ll_valuebound100.c new file mode 100644 index 00000000000..02e06fbd4bf --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_valuebound100.c @@ -0,0 +1,49 @@ +/* Compute the floor of the square root of a natural number */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "sqrt1-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + + +int main() { + int n; + long long a, s, t; + n = __VERIFIER_nondet_int(); + assume_abort_if_not(n>=0 && n<=100); + + a = 0; + s = 1; + t = 1; + + while (1) { + __VERIFIER_assert(t == 2*a + 1); + __VERIFIER_assert(s == (a + 1) * (a + 1)); + __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); + // the above 2 should be equiv to + + if (!(s <= n)) + break; + + a = a + 1; + t = t + 2; + s = s + t; + } + + __VERIFIER_assert(t == 2 * a + 1); + __VERIFIER_assert(s == (a + 1) * (a + 1)); + __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/sqrt1-ll_valuebound100.yml b/c/nla-digbench-scaling/sqrt1-ll_valuebound100.yml new file mode 100644 index 00000000000..bd7f55ae9a7 --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_valuebound100.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'sqrt1-ll_valuebound100.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/sqrt1-ll_valuebound2.c b/c/nla-digbench-scaling/sqrt1-ll_valuebound2.c new file mode 100644 index 00000000000..1d35f1d5fdf --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_valuebound2.c @@ -0,0 +1,49 @@ +/* Compute the floor of the square root of a natural number */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "sqrt1-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + + +int main() { + int n; + long long a, s, t; + n = __VERIFIER_nondet_int(); + assume_abort_if_not(n>=0 && n<=2); + + a = 0; + s = 1; + t = 1; + + while (1) { + __VERIFIER_assert(t == 2*a + 1); + __VERIFIER_assert(s == (a + 1) * (a + 1)); + __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); + // the above 2 should be equiv to + + if (!(s <= n)) + break; + + a = a + 1; + t = t + 2; + s = s + t; + } + + __VERIFIER_assert(t == 2 * a + 1); + __VERIFIER_assert(s == (a + 1) * (a + 1)); + __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/sqrt1-ll_valuebound2.yml b/c/nla-digbench-scaling/sqrt1-ll_valuebound2.yml new file mode 100644 index 00000000000..5dee85c6c88 --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_valuebound2.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'sqrt1-ll_valuebound2.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/sqrt1-ll_valuebound20.c b/c/nla-digbench-scaling/sqrt1-ll_valuebound20.c new file mode 100644 index 00000000000..873ce6b1872 --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_valuebound20.c @@ -0,0 +1,49 @@ +/* Compute the floor of the square root of a natural number */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "sqrt1-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + + +int main() { + int n; + long long a, s, t; + n = __VERIFIER_nondet_int(); + assume_abort_if_not(n>=0 && n<=20); + + a = 0; + s = 1; + t = 1; + + while (1) { + __VERIFIER_assert(t == 2*a + 1); + __VERIFIER_assert(s == (a + 1) * (a + 1)); + __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); + // the above 2 should be equiv to + + if (!(s <= n)) + break; + + a = a + 1; + t = t + 2; + s = s + t; + } + + __VERIFIER_assert(t == 2 * a + 1); + __VERIFIER_assert(s == (a + 1) * (a + 1)); + __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/sqrt1-ll_valuebound20.yml b/c/nla-digbench-scaling/sqrt1-ll_valuebound20.yml new file mode 100644 index 00000000000..e4e227329c2 --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_valuebound20.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'sqrt1-ll_valuebound20.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/sqrt1-ll_valuebound5.c b/c/nla-digbench-scaling/sqrt1-ll_valuebound5.c new file mode 100644 index 00000000000..8625e0a30bf --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_valuebound5.c @@ -0,0 +1,49 @@ +/* Compute the floor of the square root of a natural number */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "sqrt1-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + + +int main() { + int n; + long long a, s, t; + n = __VERIFIER_nondet_int(); + assume_abort_if_not(n>=0 && n<=5); + + a = 0; + s = 1; + t = 1; + + while (1) { + __VERIFIER_assert(t == 2*a + 1); + __VERIFIER_assert(s == (a + 1) * (a + 1)); + __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); + // the above 2 should be equiv to + + if (!(s <= n)) + break; + + a = a + 1; + t = t + 2; + s = s + t; + } + + __VERIFIER_assert(t == 2 * a + 1); + __VERIFIER_assert(s == (a + 1) * (a + 1)); + __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/sqrt1-ll_valuebound5.yml b/c/nla-digbench-scaling/sqrt1-ll_valuebound5.yml new file mode 100644 index 00000000000..b437b1c32df --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_valuebound5.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'sqrt1-ll_valuebound5.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/sqrt1-ll_valuebound50.c b/c/nla-digbench-scaling/sqrt1-ll_valuebound50.c new file mode 100644 index 00000000000..aa62277cea2 --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_valuebound50.c @@ -0,0 +1,49 @@ +/* Compute the floor of the square root of a natural number */ + +extern void abort(void); +extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); +void reach_error() { __assert_fail("0", "sqrt1-ll.c", 5, "reach_error"); } +extern int __VERIFIER_nondet_int(void); +extern void abort(void); +void assume_abort_if_not(int cond) { + if(!cond) {abort();} +} +void __VERIFIER_assert(int cond) { + if (!(cond)) { + ERROR: + {reach_error();} + } + return; +} + + +int main() { + int n; + long long a, s, t; + n = __VERIFIER_nondet_int(); + assume_abort_if_not(n>=0 && n<=50); + + a = 0; + s = 1; + t = 1; + + while (1) { + __VERIFIER_assert(t == 2*a + 1); + __VERIFIER_assert(s == (a + 1) * (a + 1)); + __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); + // the above 2 should be equiv to + + if (!(s <= n)) + break; + + a = a + 1; + t = t + 2; + s = s + t; + } + + __VERIFIER_assert(t == 2 * a + 1); + __VERIFIER_assert(s == (a + 1) * (a + 1)); + __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); + + return 0; +} diff --git a/c/nla-digbench-scaling/sqrt1-ll_valuebound50.yml b/c/nla-digbench-scaling/sqrt1-ll_valuebound50.yml new file mode 100644 index 00000000000..e0c0158a028 --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_valuebound50.yml @@ -0,0 +1,11 @@ +format_version: '2.0' +input_files: 'sqrt1-ll_valuebound50.c' +properties: + - property_file: ../properties/unreach-call.prp + expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true + +options: + language: C + data_model: ILP32 diff --git a/c/nla-digbench-scaling/sqrt1_unwindbound1.c b/c/nla-digbench-scaling/sqrt1_unwindbound1.c deleted file mode 100644 index 7cea50c8c42..00000000000 --- a/c/nla-digbench-scaling/sqrt1_unwindbound1.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Compute the floor of the square root of a natural number */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - - -int counter = 0; -int main() { - int n, a, s, t; - n = __VERIFIER_nondet_int(); - - a = 0; - s = 1; - t = 1; - - while (counter++<1) { - __VERIFIER_assert(t == 2*a + 1); - __VERIFIER_assert(s == (a + 1) * (a + 1)); - __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); - // the above 2 should be equiv to - - if (!(s <= n)) - break; - - a = a + 1; - t = t + 2; - s = s + t; - } - - __VERIFIER_assert(t == 2 * a + 1); - __VERIFIER_assert(s == (a + 1) * (a + 1)); - __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/sqrt1_unwindbound1.yml b/c/nla-digbench-scaling/sqrt1_unwindbound1.yml deleted file mode 100644 index 9b0c1f13072..00000000000 --- a/c/nla-digbench-scaling/sqrt1_unwindbound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'sqrt1_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/sqrt1_unwindbound10.c b/c/nla-digbench-scaling/sqrt1_unwindbound10.c deleted file mode 100644 index 93d0df7eb78..00000000000 --- a/c/nla-digbench-scaling/sqrt1_unwindbound10.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Compute the floor of the square root of a natural number */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - - -int counter = 0; -int main() { - int n, a, s, t; - n = __VERIFIER_nondet_int(); - - a = 0; - s = 1; - t = 1; - - while (counter++<10) { - __VERIFIER_assert(t == 2*a + 1); - __VERIFIER_assert(s == (a + 1) * (a + 1)); - __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); - // the above 2 should be equiv to - - if (!(s <= n)) - break; - - a = a + 1; - t = t + 2; - s = s + t; - } - - __VERIFIER_assert(t == 2 * a + 1); - __VERIFIER_assert(s == (a + 1) * (a + 1)); - __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/sqrt1_unwindbound10.yml b/c/nla-digbench-scaling/sqrt1_unwindbound10.yml deleted file mode 100644 index 9f83b67c3bc..00000000000 --- a/c/nla-digbench-scaling/sqrt1_unwindbound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'sqrt1_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/sqrt1_unwindbound100.c b/c/nla-digbench-scaling/sqrt1_unwindbound100.c deleted file mode 100644 index 20072c55101..00000000000 --- a/c/nla-digbench-scaling/sqrt1_unwindbound100.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Compute the floor of the square root of a natural number */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - - -int counter = 0; -int main() { - int n, a, s, t; - n = __VERIFIER_nondet_int(); - - a = 0; - s = 1; - t = 1; - - while (counter++<100) { - __VERIFIER_assert(t == 2*a + 1); - __VERIFIER_assert(s == (a + 1) * (a + 1)); - __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); - // the above 2 should be equiv to - - if (!(s <= n)) - break; - - a = a + 1; - t = t + 2; - s = s + t; - } - - __VERIFIER_assert(t == 2 * a + 1); - __VERIFIER_assert(s == (a + 1) * (a + 1)); - __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/sqrt1_unwindbound100.yml b/c/nla-digbench-scaling/sqrt1_unwindbound100.yml deleted file mode 100644 index a0cb754d981..00000000000 --- a/c/nla-digbench-scaling/sqrt1_unwindbound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'sqrt1_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/sqrt1_unwindbound2.c b/c/nla-digbench-scaling/sqrt1_unwindbound2.c deleted file mode 100644 index d60f3efa9cb..00000000000 --- a/c/nla-digbench-scaling/sqrt1_unwindbound2.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Compute the floor of the square root of a natural number */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - - -int counter = 0; -int main() { - int n, a, s, t; - n = __VERIFIER_nondet_int(); - - a = 0; - s = 1; - t = 1; - - while (counter++<2) { - __VERIFIER_assert(t == 2*a + 1); - __VERIFIER_assert(s == (a + 1) * (a + 1)); - __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); - // the above 2 should be equiv to - - if (!(s <= n)) - break; - - a = a + 1; - t = t + 2; - s = s + t; - } - - __VERIFIER_assert(t == 2 * a + 1); - __VERIFIER_assert(s == (a + 1) * (a + 1)); - __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/sqrt1_unwindbound2.yml b/c/nla-digbench-scaling/sqrt1_unwindbound2.yml deleted file mode 100644 index dd45a22f4e0..00000000000 --- a/c/nla-digbench-scaling/sqrt1_unwindbound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'sqrt1_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/sqrt1_unwindbound20.c b/c/nla-digbench-scaling/sqrt1_unwindbound20.c deleted file mode 100644 index f407f813707..00000000000 --- a/c/nla-digbench-scaling/sqrt1_unwindbound20.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Compute the floor of the square root of a natural number */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - - -int counter = 0; -int main() { - int n, a, s, t; - n = __VERIFIER_nondet_int(); - - a = 0; - s = 1; - t = 1; - - while (counter++<20) { - __VERIFIER_assert(t == 2*a + 1); - __VERIFIER_assert(s == (a + 1) * (a + 1)); - __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); - // the above 2 should be equiv to - - if (!(s <= n)) - break; - - a = a + 1; - t = t + 2; - s = s + t; - } - - __VERIFIER_assert(t == 2 * a + 1); - __VERIFIER_assert(s == (a + 1) * (a + 1)); - __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/sqrt1_unwindbound20.yml b/c/nla-digbench-scaling/sqrt1_unwindbound20.yml deleted file mode 100644 index 5597cb948a4..00000000000 --- a/c/nla-digbench-scaling/sqrt1_unwindbound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'sqrt1_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/sqrt1_unwindbound5.c b/c/nla-digbench-scaling/sqrt1_unwindbound5.c deleted file mode 100644 index a928883db80..00000000000 --- a/c/nla-digbench-scaling/sqrt1_unwindbound5.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Compute the floor of the square root of a natural number */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - - -int counter = 0; -int main() { - int n, a, s, t; - n = __VERIFIER_nondet_int(); - - a = 0; - s = 1; - t = 1; - - while (counter++<5) { - __VERIFIER_assert(t == 2*a + 1); - __VERIFIER_assert(s == (a + 1) * (a + 1)); - __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); - // the above 2 should be equiv to - - if (!(s <= n)) - break; - - a = a + 1; - t = t + 2; - s = s + t; - } - - __VERIFIER_assert(t == 2 * a + 1); - __VERIFIER_assert(s == (a + 1) * (a + 1)); - __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/sqrt1_unwindbound5.yml b/c/nla-digbench-scaling/sqrt1_unwindbound5.yml deleted file mode 100644 index a179528ba32..00000000000 --- a/c/nla-digbench-scaling/sqrt1_unwindbound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'sqrt1_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/sqrt1_unwindbound50.c b/c/nla-digbench-scaling/sqrt1_unwindbound50.c deleted file mode 100644 index 5d66f0ab842..00000000000 --- a/c/nla-digbench-scaling/sqrt1_unwindbound50.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Compute the floor of the square root of a natural number */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - - -int counter = 0; -int main() { - int n, a, s, t; - n = __VERIFIER_nondet_int(); - - a = 0; - s = 1; - t = 1; - - while (counter++<50) { - __VERIFIER_assert(t == 2*a + 1); - __VERIFIER_assert(s == (a + 1) * (a + 1)); - __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); - // the above 2 should be equiv to - - if (!(s <= n)) - break; - - a = a + 1; - t = t + 2; - s = s + t; - } - - __VERIFIER_assert(t == 2 * a + 1); - __VERIFIER_assert(s == (a + 1) * (a + 1)); - __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/sqrt1_unwindbound50.yml b/c/nla-digbench-scaling/sqrt1_unwindbound50.yml deleted file mode 100644 index afc97a1113b..00000000000 --- a/c/nla-digbench-scaling/sqrt1_unwindbound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'sqrt1_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/sqrt1_valuebound1.c b/c/nla-digbench-scaling/sqrt1_valuebound1.c deleted file mode 100644 index 8e5a04b4f44..00000000000 --- a/c/nla-digbench-scaling/sqrt1_valuebound1.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Compute the floor of the square root of a natural number */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - - -int main() { - int n, a, s, t; - n = __VERIFIER_nondet_int(); - assume_abort_if_not(n>0 && n<=1); - - a = 0; - s = 1; - t = 1; - - while (1) { - __VERIFIER_assert(t == 2*a + 1); - __VERIFIER_assert(s == (a + 1) * (a + 1)); - __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); - // the above 2 should be equiv to - - if (!(s <= n)) - break; - - a = a + 1; - t = t + 2; - s = s + t; - } - - __VERIFIER_assert(t == 2 * a + 1); - __VERIFIER_assert(s == (a + 1) * (a + 1)); - __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/sqrt1_valuebound1.yml b/c/nla-digbench-scaling/sqrt1_valuebound1.yml deleted file mode 100644 index c82d5f75956..00000000000 --- a/c/nla-digbench-scaling/sqrt1_valuebound1.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'sqrt1_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/sqrt1_valuebound10.c b/c/nla-digbench-scaling/sqrt1_valuebound10.c deleted file mode 100644 index ad76c487238..00000000000 --- a/c/nla-digbench-scaling/sqrt1_valuebound10.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Compute the floor of the square root of a natural number */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - - -int main() { - int n, a, s, t; - n = __VERIFIER_nondet_int(); - assume_abort_if_not(n>0 && n<=10); - - a = 0; - s = 1; - t = 1; - - while (1) { - __VERIFIER_assert(t == 2*a + 1); - __VERIFIER_assert(s == (a + 1) * (a + 1)); - __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); - // the above 2 should be equiv to - - if (!(s <= n)) - break; - - a = a + 1; - t = t + 2; - s = s + t; - } - - __VERIFIER_assert(t == 2 * a + 1); - __VERIFIER_assert(s == (a + 1) * (a + 1)); - __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/sqrt1_valuebound10.yml b/c/nla-digbench-scaling/sqrt1_valuebound10.yml deleted file mode 100644 index f0d74e6d72a..00000000000 --- a/c/nla-digbench-scaling/sqrt1_valuebound10.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'sqrt1_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/sqrt1_valuebound100.c b/c/nla-digbench-scaling/sqrt1_valuebound100.c deleted file mode 100644 index bcc1a8dcea9..00000000000 --- a/c/nla-digbench-scaling/sqrt1_valuebound100.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Compute the floor of the square root of a natural number */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - - -int main() { - int n, a, s, t; - n = __VERIFIER_nondet_int(); - assume_abort_if_not(n>0 && n<=100); - - a = 0; - s = 1; - t = 1; - - while (1) { - __VERIFIER_assert(t == 2*a + 1); - __VERIFIER_assert(s == (a + 1) * (a + 1)); - __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); - // the above 2 should be equiv to - - if (!(s <= n)) - break; - - a = a + 1; - t = t + 2; - s = s + t; - } - - __VERIFIER_assert(t == 2 * a + 1); - __VERIFIER_assert(s == (a + 1) * (a + 1)); - __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/sqrt1_valuebound100.yml b/c/nla-digbench-scaling/sqrt1_valuebound100.yml deleted file mode 100644 index 9633a96173c..00000000000 --- a/c/nla-digbench-scaling/sqrt1_valuebound100.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'sqrt1_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/sqrt1_valuebound2.c b/c/nla-digbench-scaling/sqrt1_valuebound2.c deleted file mode 100644 index 7a0deab65a9..00000000000 --- a/c/nla-digbench-scaling/sqrt1_valuebound2.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Compute the floor of the square root of a natural number */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - - -int main() { - int n, a, s, t; - n = __VERIFIER_nondet_int(); - assume_abort_if_not(n>0 && n<=2); - - a = 0; - s = 1; - t = 1; - - while (1) { - __VERIFIER_assert(t == 2*a + 1); - __VERIFIER_assert(s == (a + 1) * (a + 1)); - __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); - // the above 2 should be equiv to - - if (!(s <= n)) - break; - - a = a + 1; - t = t + 2; - s = s + t; - } - - __VERIFIER_assert(t == 2 * a + 1); - __VERIFIER_assert(s == (a + 1) * (a + 1)); - __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/sqrt1_valuebound2.yml b/c/nla-digbench-scaling/sqrt1_valuebound2.yml deleted file mode 100644 index afcc5cad359..00000000000 --- a/c/nla-digbench-scaling/sqrt1_valuebound2.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'sqrt1_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/sqrt1_valuebound20.c b/c/nla-digbench-scaling/sqrt1_valuebound20.c deleted file mode 100644 index 1c9470a4229..00000000000 --- a/c/nla-digbench-scaling/sqrt1_valuebound20.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Compute the floor of the square root of a natural number */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - - -int main() { - int n, a, s, t; - n = __VERIFIER_nondet_int(); - assume_abort_if_not(n>0 && n<=20); - - a = 0; - s = 1; - t = 1; - - while (1) { - __VERIFIER_assert(t == 2*a + 1); - __VERIFIER_assert(s == (a + 1) * (a + 1)); - __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); - // the above 2 should be equiv to - - if (!(s <= n)) - break; - - a = a + 1; - t = t + 2; - s = s + t; - } - - __VERIFIER_assert(t == 2 * a + 1); - __VERIFIER_assert(s == (a + 1) * (a + 1)); - __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/sqrt1_valuebound20.yml b/c/nla-digbench-scaling/sqrt1_valuebound20.yml deleted file mode 100644 index 07c7ba30f06..00000000000 --- a/c/nla-digbench-scaling/sqrt1_valuebound20.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'sqrt1_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/sqrt1_valuebound5.c b/c/nla-digbench-scaling/sqrt1_valuebound5.c deleted file mode 100644 index 3501286dcbd..00000000000 --- a/c/nla-digbench-scaling/sqrt1_valuebound5.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Compute the floor of the square root of a natural number */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - - -int main() { - int n, a, s, t; - n = __VERIFIER_nondet_int(); - assume_abort_if_not(n>0 && n<=5); - - a = 0; - s = 1; - t = 1; - - while (1) { - __VERIFIER_assert(t == 2*a + 1); - __VERIFIER_assert(s == (a + 1) * (a + 1)); - __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); - // the above 2 should be equiv to - - if (!(s <= n)) - break; - - a = a + 1; - t = t + 2; - s = s + t; - } - - __VERIFIER_assert(t == 2 * a + 1); - __VERIFIER_assert(s == (a + 1) * (a + 1)); - __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/sqrt1_valuebound5.yml b/c/nla-digbench-scaling/sqrt1_valuebound5.yml deleted file mode 100644 index 87eba99f0da..00000000000 --- a/c/nla-digbench-scaling/sqrt1_valuebound5.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'sqrt1_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench-scaling/sqrt1_valuebound50.c b/c/nla-digbench-scaling/sqrt1_valuebound50.c deleted file mode 100644 index 718d92b6fc7..00000000000 --- a/c/nla-digbench-scaling/sqrt1_valuebound50.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Compute the floor of the square root of a natural number */ - -extern void abort(void); -void reach_error(){} -extern int __VERIFIER_nondet_int(void); -extern void abort(void); -void assume_abort_if_not(int cond) { - if(!cond) {abort();} -} -void __VERIFIER_assert(int cond) { - if (!(cond)) { - ERROR: - {reach_error();} - } - return; -} - - -int main() { - int n, a, s, t; - n = __VERIFIER_nondet_int(); - assume_abort_if_not(n>0 && n<=50); - - a = 0; - s = 1; - t = 1; - - while (1) { - __VERIFIER_assert(t == 2*a + 1); - __VERIFIER_assert(s == (a + 1) * (a + 1)); - __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); - // the above 2 should be equiv to - - if (!(s <= n)) - break; - - a = a + 1; - t = t + 2; - s = s + t; - } - - __VERIFIER_assert(t == 2 * a + 1); - __VERIFIER_assert(s == (a + 1) * (a + 1)); - __VERIFIER_assert(t*t - 4*s + 2*t + 1 == 0); - - return 0; -} diff --git a/c/nla-digbench-scaling/sqrt1_valuebound50.yml b/c/nla-digbench-scaling/sqrt1_valuebound50.yml deleted file mode 100644 index 3e92120a7a8..00000000000 --- a/c/nla-digbench-scaling/sqrt1_valuebound50.yml +++ /dev/null @@ -1,9 +0,0 @@ -format_version: '2.0' -input_files: 'sqrt1_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - -options: - language: C - data_model: ILP32 diff --git a/c/nla-digbench/divbin.yml b/c/nla-digbench/divbin.yml index 5c40ce41ec1..4731ade1ed9 100644 --- a/c/nla-digbench/divbin.yml +++ b/c/nla-digbench/divbin.yml @@ -3,6 +3,8 @@ input_files: 'divbin.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench/divbin2.yml b/c/nla-digbench/divbin2.yml index c6953f4ae47..b70dd599ff6 100644 --- a/c/nla-digbench/divbin2.yml +++ b/c/nla-digbench/divbin2.yml @@ -3,6 +3,8 @@ input_files: 'divbin2.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench/freire1.yml b/c/nla-digbench/freire1.yml index 734e97779a2..4e1625fa2e9 100644 --- a/c/nla-digbench/freire1.yml +++ b/c/nla-digbench/freire1.yml @@ -3,6 +3,8 @@ input_files: 'freire1.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench/freire2.yml b/c/nla-digbench/freire2.yml index 80ba90cfae4..20edc7c4f9f 100644 --- a/c/nla-digbench/freire2.yml +++ b/c/nla-digbench/freire2.yml @@ -3,6 +3,8 @@ input_files: 'freire2.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: false + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench/knuth.yml b/c/nla-digbench/knuth.yml index 049c9c030c3..9600143813b 100644 --- a/c/nla-digbench/knuth.yml +++ b/c/nla-digbench/knuth.yml @@ -3,6 +3,8 @@ input_files: 'knuth.i' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench/lcm1.yml b/c/nla-digbench/lcm1.yml index 15a30dfec2c..5fb35f49791 100644 --- a/c/nla-digbench/lcm1.yml +++ b/c/nla-digbench/lcm1.yml @@ -3,6 +3,8 @@ input_files: 'lcm1.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench/lcm2.yml b/c/nla-digbench/lcm2.yml index a4ce2f713e4..474ed2a7b2f 100644 --- a/c/nla-digbench/lcm2.yml +++ b/c/nla-digbench/lcm2.yml @@ -3,6 +3,8 @@ input_files: 'lcm2.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C diff --git a/c/nla-digbench/mannadiv.yml b/c/nla-digbench/mannadiv.yml index 99579108ae4..69b255b1d66 100644 --- a/c/nla-digbench/mannadiv.yml +++ b/c/nla-digbench/mannadiv.yml @@ -3,6 +3,8 @@ input_files: 'mannadiv.c' properties: - property_file: ../properties/unreach-call.prp expected_verdict: true + - property_file: ../properties/no-overflow.prp + expected_verdict: true options: language: C