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..e06fdfc8440 --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_unwindbound1.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..fbbb8ed749f --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_unwindbound10.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..e961e0f9eee --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_unwindbound100.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..6cbe701aaa8 --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_unwindbound2.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..a8bbf6677b7 --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_unwindbound20.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..bcd983d37f2 --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_unwindbound5.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..3d334f53904 --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_unwindbound50.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..30337a8d814 --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_valuebound1.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..36701107617 --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_valuebound10.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..50e5bf3ca83 --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_valuebound100.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..0e6c2e69f58 --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_valuebound2.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..7c85e0bc9f0 --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_valuebound20.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..4c9d1b8bde8 --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_valuebound5.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..859ac70fd41 --- /dev/null +++ b/c/nla-digbench-scaling/bresenham-ll_valuebound50.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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 7aa182f35d6..00000000000 --- a/c/nla-digbench-scaling/bresenham_unwindbound1.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'bresenham_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 e25f8963c6f..00000000000 --- a/c/nla-digbench-scaling/bresenham_unwindbound10.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'bresenham_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 e4befb69e6b..00000000000 --- a/c/nla-digbench-scaling/bresenham_unwindbound100.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'bresenham_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 3f551632e58..00000000000 --- a/c/nla-digbench-scaling/bresenham_unwindbound2.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'bresenham_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 446c3f4ea65..00000000000 --- a/c/nla-digbench-scaling/bresenham_unwindbound20.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'bresenham_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 cc70dfe507c..00000000000 --- a/c/nla-digbench-scaling/bresenham_unwindbound5.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'bresenham_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 8e9d4eabce6..00000000000 --- a/c/nla-digbench-scaling/bresenham_unwindbound50.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'bresenham_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 07d3b242603..00000000000 --- a/c/nla-digbench-scaling/bresenham_valuebound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'bresenham_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 f5b49c8577b..00000000000 --- a/c/nla-digbench-scaling/bresenham_valuebound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'bresenham_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 cce637f65b6..00000000000 --- a/c/nla-digbench-scaling/bresenham_valuebound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'bresenham_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 8fc168514c5..00000000000 --- a/c/nla-digbench-scaling/bresenham_valuebound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'bresenham_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 7e1b853f462..00000000000 --- a/c/nla-digbench-scaling/bresenham_valuebound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'bresenham_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 178d20e4c2f..00000000000 --- a/c/nla-digbench-scaling/bresenham_valuebound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'bresenham_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 ef98946e0f8..00000000000 --- a/c/nla-digbench-scaling/bresenham_valuebound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'bresenham_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 de6181982b2..00000000000 --- a/c/nla-digbench-scaling/cohencu_unwindbound1.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'cohencu_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 75c8ff50691..00000000000 --- a/c/nla-digbench-scaling/cohencu_unwindbound10.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'cohencu_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 571a42095f9..00000000000 --- a/c/nla-digbench-scaling/cohencu_unwindbound100.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'cohencu_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 a650db56f2e..00000000000 --- a/c/nla-digbench-scaling/cohencu_unwindbound2.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'cohencu_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 e4de5d84f86..00000000000 --- a/c/nla-digbench-scaling/cohencu_unwindbound20.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'cohencu_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 45f5be46477..00000000000 --- a/c/nla-digbench-scaling/cohencu_unwindbound5.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'cohencu_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 d749ccc1603..00000000000 --- a/c/nla-digbench-scaling/cohencu_unwindbound50.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'cohencu_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 6f1d948fd49..00000000000 --- a/c/nla-digbench-scaling/cohencu_valuebound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'cohencu_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 d18c4cdd78a..00000000000 --- a/c/nla-digbench-scaling/cohencu_valuebound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'cohencu_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 439ec43d0a7..00000000000 --- a/c/nla-digbench-scaling/cohencu_valuebound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'cohencu_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 368f4ca15aa..00000000000 --- a/c/nla-digbench-scaling/cohencu_valuebound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'cohencu_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 59e4b870552..00000000000 --- a/c/nla-digbench-scaling/cohencu_valuebound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'cohencu_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 5ba91cf6ef1..00000000000 --- a/c/nla-digbench-scaling/cohencu_valuebound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'cohencu_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 0be8a4d5557..00000000000 --- a/c/nla-digbench-scaling/cohencu_valuebound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'cohencu_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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..39ccdf69fdb --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_unwindbound1.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..da2b3cb19b6 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_unwindbound10.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..dfd37239a12 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_unwindbound100.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..e437caac217 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_unwindbound2.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..a99593168bd --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_unwindbound20.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..6b79867fee2 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_unwindbound5.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..98e61842d98 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_unwindbound50.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..43b6c74bef6 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_valuebound1.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..2791f4f76fd --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_valuebound10.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..63bc7360fa2 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_valuebound100.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..6d0e913eada --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_valuebound2.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..aa2fb54c4b7 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_valuebound20.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..999f9efa082 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_valuebound5.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..ad537b20409 --- /dev/null +++ b/c/nla-digbench-scaling/cohendiv-ll_valuebound50.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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 e2e01739120..00000000000 --- a/c/nla-digbench-scaling/cohendiv_unwindbound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'cohendiv_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 56a2548b3ef..00000000000 --- a/c/nla-digbench-scaling/cohendiv_unwindbound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'cohendiv_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 07fca3e02cf..00000000000 --- a/c/nla-digbench-scaling/cohendiv_unwindbound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'cohendiv_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 8843c62885b..00000000000 --- a/c/nla-digbench-scaling/cohendiv_unwindbound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'cohendiv_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 e4540236282..00000000000 --- a/c/nla-digbench-scaling/cohendiv_unwindbound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'cohendiv_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 5506ee1dca8..00000000000 --- a/c/nla-digbench-scaling/cohendiv_unwindbound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'cohendiv_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 039a525f031..00000000000 --- a/c/nla-digbench-scaling/cohendiv_unwindbound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'cohendiv_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 a6243fe1233..00000000000 --- a/c/nla-digbench-scaling/cohendiv_valuebound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'cohendiv_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 0b85aeb98cd..00000000000 --- a/c/nla-digbench-scaling/cohendiv_valuebound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'cohendiv_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 39063360139..00000000000 --- a/c/nla-digbench-scaling/cohendiv_valuebound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'cohendiv_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 29823230b0c..00000000000 --- a/c/nla-digbench-scaling/cohendiv_valuebound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'cohendiv_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 e5373186e5f..00000000000 --- a/c/nla-digbench-scaling/cohendiv_valuebound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'cohendiv_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 013fc0eecd7..00000000000 --- a/c/nla-digbench-scaling/cohendiv_valuebound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'cohendiv_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 42cbb994be9..00000000000 --- a/c/nla-digbench-scaling/cohendiv_valuebound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'cohendiv_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 39ab07e9c51..00000000000 --- a/c/nla-digbench-scaling/dijkstra_unwindbound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'dijkstra_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 d58b32c7427..00000000000 --- a/c/nla-digbench-scaling/dijkstra_unwindbound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'dijkstra_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 d19f57eff88..00000000000 --- a/c/nla-digbench-scaling/dijkstra_unwindbound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'dijkstra_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 1fc00aa6235..00000000000 --- a/c/nla-digbench-scaling/dijkstra_unwindbound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'dijkstra_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 e7c336af023..00000000000 --- a/c/nla-digbench-scaling/dijkstra_unwindbound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'dijkstra_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 ec2c435ec71..00000000000 --- a/c/nla-digbench-scaling/dijkstra_unwindbound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'dijkstra_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 b9baa6084a7..00000000000 --- a/c/nla-digbench-scaling/dijkstra_unwindbound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'dijkstra_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 22bc558d987..00000000000 --- a/c/nla-digbench-scaling/dijkstra_valuebound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'dijkstra_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 6d1533cad37..00000000000 --- a/c/nla-digbench-scaling/dijkstra_valuebound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'dijkstra_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 fdfabd791a8..00000000000 --- a/c/nla-digbench-scaling/dijkstra_valuebound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'dijkstra_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 17c0f8cab3c..00000000000 --- a/c/nla-digbench-scaling/dijkstra_valuebound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'dijkstra_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 fe492750e24..00000000000 --- a/c/nla-digbench-scaling/dijkstra_valuebound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'dijkstra_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 79fe0a70808..00000000000 --- a/c/nla-digbench-scaling/dijkstra_valuebound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'dijkstra_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 db453e64a0b..00000000000 --- a/c/nla-digbench-scaling/dijkstra_valuebound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'dijkstra_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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..3d484f2bab4 --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_unwindbound1.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..03b4050f66d --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_unwindbound10.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..ff92c16da00 --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_unwindbound100.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..317563e2664 --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_unwindbound2.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..d846c0ed590 --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_unwindbound20.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..ca2f0940736 --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_unwindbound5.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..f07595405e5 --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_unwindbound50.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..a348c524003 --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_valuebound1.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..97c9a0a08eb --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_valuebound10.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..6262af2b3fc --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_valuebound100.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..3d7be13239a --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_valuebound2.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..3a889275c8f --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_valuebound20.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..65faef860e3 --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_valuebound5.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..15d9923f4e5 --- /dev/null +++ b/c/nla-digbench-scaling/egcd-ll_valuebound50.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..0fef0376f3d --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_unwindbound1.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..92cb87ec97d --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_unwindbound10.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..459da5d2c1c --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_unwindbound100.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..ea1938c4396 --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_unwindbound2.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..9b83a904f29 --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_unwindbound20.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..7173f604d06 --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_unwindbound5.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..4884f7b159b --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_unwindbound50.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..41c37b5f8f8 --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_valuebound1.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..f658ef2dce7 --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_valuebound10.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..b845a1d313a --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_valuebound100.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..8ace70452f3 --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_valuebound2.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..f7feb7000c6 --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_valuebound20.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..dbd958f967e --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_valuebound5.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..572a972180d --- /dev/null +++ b/c/nla-digbench-scaling/egcd2-ll_valuebound50.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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 254831d0a3e..00000000000 --- a/c/nla-digbench-scaling/egcd2_unwindbound1.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'egcd2_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 12c0e017892..00000000000 --- a/c/nla-digbench-scaling/egcd2_unwindbound10.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'egcd2_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 1e424875952..00000000000 --- a/c/nla-digbench-scaling/egcd2_unwindbound100.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'egcd2_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 0846731dffd..00000000000 --- a/c/nla-digbench-scaling/egcd2_unwindbound2.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'egcd2_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 59a12d7060e..00000000000 --- a/c/nla-digbench-scaling/egcd2_unwindbound20.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'egcd2_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 76c19aa4ec7..00000000000 --- a/c/nla-digbench-scaling/egcd2_unwindbound5.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'egcd2_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 2e101cc1477..00000000000 --- a/c/nla-digbench-scaling/egcd2_unwindbound50.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'egcd2_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 0f4dd20b3e4..00000000000 --- a/c/nla-digbench-scaling/egcd2_valuebound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'egcd2_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 f4386b6c238..00000000000 --- a/c/nla-digbench-scaling/egcd2_valuebound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'egcd2_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 7eef6a1b596..00000000000 --- a/c/nla-digbench-scaling/egcd2_valuebound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'egcd2_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 6514069d286..00000000000 --- a/c/nla-digbench-scaling/egcd2_valuebound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'egcd2_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 db2ba891529..00000000000 --- a/c/nla-digbench-scaling/egcd2_valuebound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'egcd2_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 b74a6763d9d..00000000000 --- a/c/nla-digbench-scaling/egcd2_valuebound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'egcd2_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 6bd19e23a4d..00000000000 --- a/c/nla-digbench-scaling/egcd2_valuebound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'egcd2_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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..22232c99475 --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_unwindbound1.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..c728ebac107 --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_unwindbound10.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..9798a896011 --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_unwindbound100.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..0ce861ede39 --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_unwindbound2.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..bded0b30507 --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_unwindbound20.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..6cf5bc24ad9 --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_unwindbound5.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..7077dd7f49d --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_unwindbound50.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..b3890ec07db --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_valuebound1.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..ad23e907a5b --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_valuebound10.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..93e312efb29 --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_valuebound100.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..4d70b7c7c7a --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_valuebound2.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..e8f90736266 --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_valuebound20.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..584e2c81079 --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_valuebound5.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..1ad69d8f622 --- /dev/null +++ b/c/nla-digbench-scaling/egcd3-ll_valuebound50.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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 021a1aaf35b..00000000000 --- a/c/nla-digbench-scaling/egcd3_unwindbound1.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'egcd3_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 045457336a5..00000000000 --- a/c/nla-digbench-scaling/egcd3_unwindbound10.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'egcd3_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 503b3712290..00000000000 --- a/c/nla-digbench-scaling/egcd3_unwindbound100.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'egcd3_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 8d919343845..00000000000 --- a/c/nla-digbench-scaling/egcd3_unwindbound2.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'egcd3_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 a1c30988295..00000000000 --- a/c/nla-digbench-scaling/egcd3_unwindbound20.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'egcd3_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 c20b12e742a..00000000000 --- a/c/nla-digbench-scaling/egcd3_unwindbound5.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'egcd3_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 5a6d2de02f5..00000000000 --- a/c/nla-digbench-scaling/egcd3_unwindbound50.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'egcd3_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 91d6417ed51..00000000000 --- a/c/nla-digbench-scaling/egcd3_valuebound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'egcd3_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 76e9f50741f..00000000000 --- a/c/nla-digbench-scaling/egcd3_valuebound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'egcd3_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 3acdc14ad37..00000000000 --- a/c/nla-digbench-scaling/egcd3_valuebound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'egcd3_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 dc1ef59bc0c..00000000000 --- a/c/nla-digbench-scaling/egcd3_valuebound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'egcd3_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 1362ada1a82..00000000000 --- a/c/nla-digbench-scaling/egcd3_valuebound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'egcd3_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 e324a31d60b..00000000000 --- a/c/nla-digbench-scaling/egcd3_valuebound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'egcd3_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 a94ad4f6f1f..00000000000 --- a/c/nla-digbench-scaling/egcd3_valuebound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'egcd3_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 b3d3c73ddec..00000000000 --- a/c/nla-digbench-scaling/egcd_unwindbound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'egcd_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 98700932f8c..00000000000 --- a/c/nla-digbench-scaling/egcd_unwindbound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'egcd_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 234bb813642..00000000000 --- a/c/nla-digbench-scaling/egcd_unwindbound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'egcd_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 f9de4eee752..00000000000 --- a/c/nla-digbench-scaling/egcd_unwindbound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'egcd_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 a5afdde9392..00000000000 --- a/c/nla-digbench-scaling/egcd_unwindbound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'egcd_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 f428a89d064..00000000000 --- a/c/nla-digbench-scaling/egcd_unwindbound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'egcd_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 2b2802459f2..00000000000 --- a/c/nla-digbench-scaling/egcd_unwindbound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'egcd_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 24b2baeec06..00000000000 --- a/c/nla-digbench-scaling/egcd_valuebound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'egcd_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 efe9c14bc18..00000000000 --- a/c/nla-digbench-scaling/egcd_valuebound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'egcd_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 c15a7ccac23..00000000000 --- a/c/nla-digbench-scaling/egcd_valuebound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'egcd_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 501fd71a6b0..00000000000 --- a/c/nla-digbench-scaling/egcd_valuebound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'egcd_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 d8d0fd0d68e..00000000000 --- a/c/nla-digbench-scaling/egcd_valuebound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'egcd_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 d36b05ecd70..00000000000 --- a/c/nla-digbench-scaling/egcd_valuebound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'egcd_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 e7ca378f98b..00000000000 --- a/c/nla-digbench-scaling/egcd_valuebound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'egcd_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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..62d79d2f0e8 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_unwindbound1.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..304d488003b --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_unwindbound10.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..6e49d99df8e --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_unwindbound100.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..a7f3ca5c691 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_unwindbound2.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..7550421d6f0 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_unwindbound20.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..35b4b1b0e8f --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_unwindbound5.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..259f8674c0c --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_unwindbound50.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..8c0dc6399e1 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_valuebound1.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..f743ce37627 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_valuebound10.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..f142d5f3e06 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_valuebound100.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..d96870603ff --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_valuebound2.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..baf2ad2fe63 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_valuebound20.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..f79d83eb33f --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_valuebound5.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..a060a8935b5 --- /dev/null +++ b/c/nla-digbench-scaling/fermat1-ll_valuebound50.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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 7dc07133cc7..00000000000 --- a/c/nla-digbench-scaling/fermat1_unwindbound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'fermat1_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 19eef2beec1..00000000000 --- a/c/nla-digbench-scaling/fermat1_unwindbound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'fermat1_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 32fda581a68..00000000000 --- a/c/nla-digbench-scaling/fermat1_unwindbound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'fermat1_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 eff78becd1d..00000000000 --- a/c/nla-digbench-scaling/fermat1_unwindbound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'fermat1_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 1272186afd0..00000000000 --- a/c/nla-digbench-scaling/fermat1_unwindbound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'fermat1_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 eab3643ba8a..00000000000 --- a/c/nla-digbench-scaling/fermat1_unwindbound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'fermat1_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 c27294a8c29..00000000000 --- a/c/nla-digbench-scaling/fermat1_unwindbound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'fermat1_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 4cba5ee5c2b..00000000000 --- a/c/nla-digbench-scaling/fermat1_valuebound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'fermat1_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 78dc64d2e83..00000000000 --- a/c/nla-digbench-scaling/fermat1_valuebound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'fermat1_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 073dcf50476..00000000000 --- a/c/nla-digbench-scaling/fermat1_valuebound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'fermat1_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 355898a8eef..00000000000 --- a/c/nla-digbench-scaling/fermat1_valuebound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'fermat1_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 2e7790678ed..00000000000 --- a/c/nla-digbench-scaling/fermat1_valuebound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'fermat1_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 44ff88a1910..00000000000 --- a/c/nla-digbench-scaling/fermat1_valuebound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'fermat1_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 f345aa20c0a..00000000000 --- a/c/nla-digbench-scaling/fermat1_valuebound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'fermat1_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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..5b037b425ea --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_unwindbound1.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..e52e87043fd --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_unwindbound10.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..e7c3da68605 --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_unwindbound100.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..8d6621a9c58 --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_unwindbound2.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..3e929ffea22 --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_unwindbound20.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..74925584ce2 --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_unwindbound5.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..11720c0866d --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_unwindbound50.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..5b5b506fc6f --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_valuebound1.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..50ef505254d --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_valuebound10.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..1f9bea8c2a5 --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_valuebound100.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..cdea254a619 --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_valuebound2.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..6f251cfd82b --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_valuebound20.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..d4e9c75ffd1 --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_valuebound5.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..7dbb88c2663 --- /dev/null +++ b/c/nla-digbench-scaling/fermat2-ll_valuebound50.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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 6b0c341db3c..00000000000 --- a/c/nla-digbench-scaling/fermat2_unwindbound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'fermat2_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 a7f28dd1eae..00000000000 --- a/c/nla-digbench-scaling/fermat2_unwindbound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'fermat2_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 2ee136af09c..00000000000 --- a/c/nla-digbench-scaling/fermat2_unwindbound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'fermat2_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 668154eb46f..00000000000 --- a/c/nla-digbench-scaling/fermat2_unwindbound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'fermat2_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 29cb2cb14a0..00000000000 --- a/c/nla-digbench-scaling/fermat2_unwindbound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'fermat2_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 3abeeff0b42..00000000000 --- a/c/nla-digbench-scaling/fermat2_unwindbound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'fermat2_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 4da5b0605ef..00000000000 --- a/c/nla-digbench-scaling/fermat2_unwindbound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'fermat2_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 eaa8c86297e..00000000000 --- a/c/nla-digbench-scaling/fermat2_valuebound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'fermat2_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 f80652e4893..00000000000 --- a/c/nla-digbench-scaling/fermat2_valuebound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'fermat2_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 1a58037991c..00000000000 --- a/c/nla-digbench-scaling/fermat2_valuebound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'fermat2_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 bcdefe6ff8a..00000000000 --- a/c/nla-digbench-scaling/fermat2_valuebound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'fermat2_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 d1187f8e947..00000000000 --- a/c/nla-digbench-scaling/fermat2_valuebound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'fermat2_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 f63f9f32ac9..00000000000 --- a/c/nla-digbench-scaling/fermat2_valuebound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'fermat2_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 45defe35b3e..00000000000 --- a/c/nla-digbench-scaling/fermat2_valuebound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'fermat2_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 4d5a9da3a79..d28c8cf0dec 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 90573a431e6..9966de7f860 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 c0fafbb58d3..d1629ab5507 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 8bbb205fd56..1d53bacf317 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 b48a79594ac..c78c93b69c4 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 03c68d1d196..4f49f7fa8e7 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 bc0b7b919b7..c5c75b6c8e8 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 41073852a75..ccd1089bf51 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 6cfa831b08a..92d65b6406b 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 a3ce90a35a6..f3d9fa18c7e 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 41ab1ba0476..0bba5a29906 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 4301b6dce56..1dffc2ccc06 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 0f393ef26a3..f0bf4c02db4 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 33958abbfd4..814d493a0ad 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 177efb2e73a..c3e3c15c4af 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 93e163febec..b53df505e1a 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 82f8643c020..8a173357246 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 f2a1ae8a5a7..75dba06455c 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 62142eb771b..3eb872c6fed 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 fc18d44c2c5..649d1fd923d 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 dc3292878b0..c06cb606599 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 e875495d700..48c5aaef536 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 cbb01a4346d..5ba49cbb6d3 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 ed80420f85f..e717bce7f89 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 16e715adb48..367f14937d5 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 1281a5e6c96..2784b72f3ec 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 070db629502..1984677de24 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 44cc0678b7d..b2cfea97568 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp diff --git a/c/nla-digbench-scaling/generate.py b/c/nla-digbench-scaling/generate.py index b0f264aaea3..24f6563b5f1 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,69 @@ 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: " +skiplist = [] -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]): + if file in skiplist: + continue + fullpath = join(NLADIR, file) fullpathToPreprocessed = fullpath[:-2] + ".i" iFileExists = isfile(fullpathToPreprocessed) for (templatefun, name) in [ @@ -70,42 +109,73 @@ 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() + consider_coverage = "coverage-branches" in ymlcontent - 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) + if consider_coverage: + marker = " - property_file: ../properties/no-overflow.prp\n expected_verdict: true" + ymlcontent = re.sub( + marker, + marker + + "\n - property_file: ../properties/coverage-error-call.prp", + 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 or "coverage" 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 + or (consider_coverage and len(properties) == 2 and has_overflow_property) + ): # overflow is only property -> verdict false + abort = True if abort: + skiplist.append(file) + print("INFO: Task %s has overflow => skipping" % file) 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..1e75133087f --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_unwindbound1.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..008511e3cdc --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_unwindbound10.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..d9aff43827a --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_unwindbound100.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..d67fba6b497 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_unwindbound2.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..b1a381977dd --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_unwindbound20.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..f4011e191df --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_unwindbound5.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..93a68985c97 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_unwindbound50.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..51c4bdd44d0 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_valuebound1.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..8bfd561cc00 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_valuebound10.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..90a89ab079f --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_valuebound100.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..3c272f8e854 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_valuebound2.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..d67b365588e --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_valuebound20.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..6aae02c8c48 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_valuebound5.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..d2bbd7f5134 --- /dev/null +++ b/c/nla-digbench-scaling/geo1-ll_valuebound50.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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 fde9bec0a36..00000000000 --- a/c/nla-digbench-scaling/geo1_unwindbound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo1_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 360879d2f40..00000000000 --- a/c/nla-digbench-scaling/geo1_unwindbound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo1_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 12467d85563..00000000000 --- a/c/nla-digbench-scaling/geo1_unwindbound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo1_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 4f717f71b8b..00000000000 --- a/c/nla-digbench-scaling/geo1_unwindbound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo1_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 36b48b1f6c0..00000000000 --- a/c/nla-digbench-scaling/geo1_unwindbound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo1_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 ea2274b8dfa..00000000000 --- a/c/nla-digbench-scaling/geo1_unwindbound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo1_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 29808e8ba5a..00000000000 --- a/c/nla-digbench-scaling/geo1_unwindbound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo1_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 32e298816d3..00000000000 --- a/c/nla-digbench-scaling/geo1_valuebound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo1_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 1607dff63b3..00000000000 --- a/c/nla-digbench-scaling/geo1_valuebound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo1_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 5c444038484..00000000000 --- a/c/nla-digbench-scaling/geo1_valuebound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo1_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 f27482f8c08..00000000000 --- a/c/nla-digbench-scaling/geo1_valuebound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo1_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 3df197dea96..00000000000 --- a/c/nla-digbench-scaling/geo1_valuebound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo1_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 c7773ce42f9..00000000000 --- a/c/nla-digbench-scaling/geo1_valuebound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo1_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 6d51f5e47d5..00000000000 --- a/c/nla-digbench-scaling/geo1_valuebound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo1_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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..84e5cec68e7 --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_unwindbound1.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..c617c616044 --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_unwindbound10.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..1e144700d2e --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_unwindbound100.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..6fd9b4f618c --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_unwindbound2.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..b8689fef669 --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_unwindbound20.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..453c512b5fa --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_unwindbound5.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..046ab7b16eb --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_unwindbound50.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..0c1d3fe8615 --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_valuebound1.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..1010f4df1dd --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_valuebound10.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..422ce2f1ad1 --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_valuebound100.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..0974aeec90c --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_valuebound2.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..46fcda92295 --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_valuebound20.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..1e55adb4afd --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_valuebound5.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..0d99197929b --- /dev/null +++ b/c/nla-digbench-scaling/geo2-ll_valuebound50.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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 b87458d72ab..00000000000 --- a/c/nla-digbench-scaling/geo2_unwindbound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo2_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 51d21366a32..00000000000 --- a/c/nla-digbench-scaling/geo2_unwindbound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo2_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 462b49f8db8..00000000000 --- a/c/nla-digbench-scaling/geo2_unwindbound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo2_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 2835a62cf3f..00000000000 --- a/c/nla-digbench-scaling/geo2_unwindbound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo2_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 ca73e725749..00000000000 --- a/c/nla-digbench-scaling/geo2_unwindbound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo2_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 2e42af587a5..00000000000 --- a/c/nla-digbench-scaling/geo2_unwindbound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo2_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 86bdaee9ddf..00000000000 --- a/c/nla-digbench-scaling/geo2_unwindbound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo2_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 2e063ab1674..00000000000 --- a/c/nla-digbench-scaling/geo2_valuebound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo2_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 996a9f66d10..00000000000 --- a/c/nla-digbench-scaling/geo2_valuebound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo2_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 a9572969be0..00000000000 --- a/c/nla-digbench-scaling/geo2_valuebound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo2_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 27c3c0bce69..00000000000 --- a/c/nla-digbench-scaling/geo2_valuebound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo2_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 c1382b880b3..00000000000 --- a/c/nla-digbench-scaling/geo2_valuebound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo2_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 23d74f404aa..00000000000 --- a/c/nla-digbench-scaling/geo2_valuebound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo2_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 3a84db6e9f8..00000000000 --- a/c/nla-digbench-scaling/geo2_valuebound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo2_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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..55925058e05 --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_unwindbound1.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..fac7c231c6a --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_unwindbound10.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..20c93738cb9 --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_unwindbound100.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..bd2b0402dbd --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_unwindbound2.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..aefab1ba4ac --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_unwindbound20.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..f2d4d94cbd7 --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_unwindbound5.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..1bb01aeeb9d --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_unwindbound50.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..0fdc73cb605 --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_valuebound1.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..cac9f58b6a7 --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_valuebound10.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..32511b70a9e --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_valuebound100.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..661ca39ecd3 --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_valuebound2.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..559e6ac0d13 --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_valuebound20.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..0ea819febd4 --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_valuebound5.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..854e359e3c5 --- /dev/null +++ b/c/nla-digbench-scaling/geo3-ll_valuebound50.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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 ac717013c3f..00000000000 --- a/c/nla-digbench-scaling/geo3_unwindbound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo3_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 28efddbea45..00000000000 --- a/c/nla-digbench-scaling/geo3_unwindbound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo3_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 61ea865ebee..00000000000 --- a/c/nla-digbench-scaling/geo3_unwindbound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo3_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 a2ff0822108..00000000000 --- a/c/nla-digbench-scaling/geo3_unwindbound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo3_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 a6354cb5a54..00000000000 --- a/c/nla-digbench-scaling/geo3_unwindbound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo3_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 fc61357a4a4..00000000000 --- a/c/nla-digbench-scaling/geo3_unwindbound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo3_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 f58015bc9f0..00000000000 --- a/c/nla-digbench-scaling/geo3_unwindbound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo3_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 c10ab31b616..00000000000 --- a/c/nla-digbench-scaling/geo3_valuebound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo3_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 a4c89a4a198..00000000000 --- a/c/nla-digbench-scaling/geo3_valuebound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo3_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 21ac4050484..00000000000 --- a/c/nla-digbench-scaling/geo3_valuebound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo3_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 f2f7bb70069..00000000000 --- a/c/nla-digbench-scaling/geo3_valuebound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo3_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 8e35853a3bf..00000000000 --- a/c/nla-digbench-scaling/geo3_valuebound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo3_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 73d98c5ffa0..00000000000 --- a/c/nla-digbench-scaling/geo3_valuebound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo3_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 d193642ba73..00000000000 --- a/c/nla-digbench-scaling/geo3_valuebound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'geo3_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 62f19f15c4c..bb27001ef6e 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 9d428c87c25..041f8f7b89f 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 256a0af8435..a58b500353e 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 ed28b7828b9..cd0385b1132 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 afb8aae6e9e..c1be8bb8cb9 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 8325b6c758b..d96a60d733a 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 fea351b9a43..b9d7b8a9589 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 fbfd8f91df5..00a4a4c4d5e 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 - property_file: ../properties/coverage-branches.prp options: 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 44309b75b55..7f5a2d9d9b3 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 - property_file: ../properties/coverage-branches.prp options: 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 b59feef6cab..5fab24dbe3a 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 - property_file: ../properties/coverage-branches.prp options: 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 40139d25585..dd689013664 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 - property_file: ../properties/coverage-branches.prp options: 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 b2aae47b6be..3c93b5d2119 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 - property_file: ../properties/coverage-branches.prp options: 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 2ef8b0f57e2..ddeca8fc668 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 - property_file: ../properties/coverage-branches.prp options: 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 fe771a5bae6..8c846b3494d 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 - property_file: ../properties/coverage-branches.prp options: 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 0b90e9c6e93..00000000000 --- a/c/nla-digbench-scaling/hard_unwindbound1.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'hard_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 b30388f56a4..00000000000 --- a/c/nla-digbench-scaling/hard_unwindbound10.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'hard_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 2c913534a73..00000000000 --- a/c/nla-digbench-scaling/hard_unwindbound100.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'hard_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 909df0f24d1..00000000000 --- a/c/nla-digbench-scaling/hard_unwindbound2.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'hard_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 3746371c9a0..00000000000 --- a/c/nla-digbench-scaling/hard_unwindbound20.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'hard_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 526dce8334f..00000000000 --- a/c/nla-digbench-scaling/hard_unwindbound5.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'hard_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 4cd8316c858..00000000000 --- a/c/nla-digbench-scaling/hard_unwindbound50.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'hard_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 c49df00c387..00000000000 --- a/c/nla-digbench-scaling/hard_valuebound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'hard_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 18f016646c1..00000000000 --- a/c/nla-digbench-scaling/hard_valuebound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'hard_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 d2041da81b0..00000000000 --- a/c/nla-digbench-scaling/hard_valuebound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'hard_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 1b585f86070..00000000000 --- a/c/nla-digbench-scaling/hard_valuebound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'hard_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 0eca9ca1712..00000000000 --- a/c/nla-digbench-scaling/hard_valuebound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'hard_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 f0d96b3e897..00000000000 --- a/c/nla-digbench-scaling/hard_valuebound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'hard_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 f280f627c6b..00000000000 --- a/c/nla-digbench-scaling/hard_valuebound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'hard_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 9e438843d4e..158ab97a235 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 2a2ffa064fe..b4c9c76580e 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 35a64246424..e25ff0be515 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 548dfa5861e..80c095fc0de 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 03195f10f7c..8368fe01683 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 72c58cf1d15..d83a1d11c40 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 f4a7de61902..9861786a5f7 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 - property_file: ../properties/coverage-error-call.prp - property_file: ../properties/coverage-branches.prp 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 4bd17733bfd..70310c1dc56 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 - property_file: ../properties/coverage-branches.prp options: 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 6efb17f62ce..71eb6963f3f 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 - property_file: ../properties/coverage-branches.prp options: 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 559b6404572..68e6d1b79c0 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 - property_file: ../properties/coverage-branches.prp options: 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 5fa41a4331f..f5a9a27c07c 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 - property_file: ../properties/coverage-branches.prp options: 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 46a80be1449..c27b4db7626 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 - property_file: ../properties/coverage-branches.prp options: 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 0406ed767e9..cc3cb2c58ea 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 - property_file: ../properties/coverage-branches.prp options: 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 53cb6eeb95a..47844b8736e 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 - property_file: ../properties/coverage-branches.prp options: 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..d9476ce3a34 --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_unwindbound1.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..60eed1650a4 --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_unwindbound10.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..747fd0fa4df --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_unwindbound100.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..0851d124318 --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_unwindbound2.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..72d46309cc4 --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_unwindbound20.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..21c1756e566 --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_unwindbound5.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..194f691f17d --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_unwindbound50.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..894acfc0de8 --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_valuebound1.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..911fe9b54f6 --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_valuebound10.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..e95c6d3e95b --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_valuebound100.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..3791359ccac --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_valuebound2.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..5c4cbdd0b62 --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_valuebound20.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..d9e3ddf69be --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_valuebound5.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..5d0590c759d --- /dev/null +++ b/c/nla-digbench-scaling/prod4br-ll_valuebound50.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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 0a2311a24c2..00000000000 --- a/c/nla-digbench-scaling/prod4br_unwindbound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'prod4br_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 d99df7840eb..00000000000 --- a/c/nla-digbench-scaling/prod4br_unwindbound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'prod4br_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 9808edb0121..00000000000 --- a/c/nla-digbench-scaling/prod4br_unwindbound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'prod4br_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 523ec57ea89..00000000000 --- a/c/nla-digbench-scaling/prod4br_unwindbound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'prod4br_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 007f23fc7c7..00000000000 --- a/c/nla-digbench-scaling/prod4br_unwindbound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'prod4br_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 3cfa7f00f9d..00000000000 --- a/c/nla-digbench-scaling/prod4br_unwindbound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'prod4br_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 0394e20c0ed..00000000000 --- a/c/nla-digbench-scaling/prod4br_unwindbound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'prod4br_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 f12160041b0..00000000000 --- a/c/nla-digbench-scaling/prod4br_valuebound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'prod4br_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 309fc4f4038..00000000000 --- a/c/nla-digbench-scaling/prod4br_valuebound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'prod4br_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 fcb0ceada89..00000000000 --- a/c/nla-digbench-scaling/prod4br_valuebound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'prod4br_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 f7aceed50eb..00000000000 --- a/c/nla-digbench-scaling/prod4br_valuebound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'prod4br_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 048169b0485..00000000000 --- a/c/nla-digbench-scaling/prod4br_valuebound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'prod4br_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 690a4f9f9ea..00000000000 --- a/c/nla-digbench-scaling/prod4br_valuebound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'prod4br_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 f4533561d12..00000000000 --- a/c/nla-digbench-scaling/prod4br_valuebound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'prod4br_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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..9331955c1a9 --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_unwindbound1.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..eed6476d25b --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_unwindbound10.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..0c92bc076ea --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_unwindbound100.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..daad6cf7ed9 --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_unwindbound2.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..8eab8125c19 --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_unwindbound20.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..78c5c946631 --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_unwindbound5.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..0b1a57a2e21 --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_unwindbound50.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..e877ef6fb99 --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_valuebound1.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..795065165ec --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_valuebound10.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..2c12f2a65be --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_valuebound100.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..c4226d06632 --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_valuebound2.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..aec59911d41 --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_valuebound20.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..b0797bc4b6b --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_valuebound5.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..03f2cd2466a --- /dev/null +++ b/c/nla-digbench-scaling/prodbin-ll_valuebound50.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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 011a58b5991..00000000000 --- a/c/nla-digbench-scaling/prodbin_unwindbound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'prodbin_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 72aeb1e1f9d..00000000000 --- a/c/nla-digbench-scaling/prodbin_unwindbound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'prodbin_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 dc9379a4854..00000000000 --- a/c/nla-digbench-scaling/prodbin_unwindbound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'prodbin_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 7b28caa6b21..00000000000 --- a/c/nla-digbench-scaling/prodbin_unwindbound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'prodbin_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 ad87959c315..00000000000 --- a/c/nla-digbench-scaling/prodbin_unwindbound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'prodbin_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 07d9d306010..00000000000 --- a/c/nla-digbench-scaling/prodbin_unwindbound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'prodbin_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 8fef4051d79..00000000000 --- a/c/nla-digbench-scaling/prodbin_unwindbound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'prodbin_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 7ea95edecf7..00000000000 --- a/c/nla-digbench-scaling/prodbin_valuebound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'prodbin_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 b3f69495e6c..00000000000 --- a/c/nla-digbench-scaling/prodbin_valuebound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'prodbin_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 12488681f2c..00000000000 --- a/c/nla-digbench-scaling/prodbin_valuebound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'prodbin_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 9ddfe09c216..00000000000 --- a/c/nla-digbench-scaling/prodbin_valuebound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'prodbin_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 65243b3f34c..00000000000 --- a/c/nla-digbench-scaling/prodbin_valuebound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'prodbin_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 c9d47962c5c..00000000000 --- a/c/nla-digbench-scaling/prodbin_valuebound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'prodbin_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 359ffe1c5c1..00000000000 --- a/c/nla-digbench-scaling/prodbin_valuebound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'prodbin_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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..9142389a6db --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_unwindbound1.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..6f811665894 --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_unwindbound10.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..b0d4960fa4c --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_unwindbound100.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..0583b0ed16f --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_unwindbound2.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..7fdb2310178 --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_unwindbound20.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..21039888d79 --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_unwindbound5.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..fcdcfd89293 --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_unwindbound50.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..4600aed3844 --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_valuebound1.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..545d6825f41 --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_valuebound10.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..97f67215a30 --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_valuebound100.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..56adc84f837 --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_valuebound2.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..86f924a2de5 --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_valuebound20.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..27432140e7c --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_valuebound5.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..ef33ace208a --- /dev/null +++ b/c/nla-digbench-scaling/ps2-ll_valuebound50.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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 696315bba14..00000000000 --- a/c/nla-digbench-scaling/ps2_unwindbound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps2_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 5e2b3acf81d..00000000000 --- a/c/nla-digbench-scaling/ps2_unwindbound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps2_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 dbe0107e629..00000000000 --- a/c/nla-digbench-scaling/ps2_unwindbound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps2_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 09457820cdd..00000000000 --- a/c/nla-digbench-scaling/ps2_unwindbound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps2_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 0e7ef3de35d..00000000000 --- a/c/nla-digbench-scaling/ps2_unwindbound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps2_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 71fb4b6e994..00000000000 --- a/c/nla-digbench-scaling/ps2_unwindbound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps2_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 8e0ad523137..00000000000 --- a/c/nla-digbench-scaling/ps2_unwindbound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps2_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 32e11198b54..00000000000 --- a/c/nla-digbench-scaling/ps2_valuebound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps2_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 0641332e3c9..00000000000 --- a/c/nla-digbench-scaling/ps2_valuebound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps2_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 bbd312b43c5..00000000000 --- a/c/nla-digbench-scaling/ps2_valuebound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps2_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 958b364812d..00000000000 --- a/c/nla-digbench-scaling/ps2_valuebound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps2_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 7a8e2f34e55..00000000000 --- a/c/nla-digbench-scaling/ps2_valuebound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps2_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 3374e782470..00000000000 --- a/c/nla-digbench-scaling/ps2_valuebound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps2_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 63550c099ac..00000000000 --- a/c/nla-digbench-scaling/ps2_valuebound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps2_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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..860db8e2993 --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_unwindbound1.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..06ae31d41ad --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_unwindbound10.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..0375b9b7eee --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_unwindbound100.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..e20224ff1f1 --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_unwindbound2.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..ddba68d8194 --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_unwindbound20.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..ed225db56ea --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_unwindbound5.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..9ee7d40f9d9 --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_unwindbound50.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..c60e1092e11 --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_valuebound1.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..ef1735a4ae3 --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_valuebound10.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..31e1ed79860 --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_valuebound100.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..4df2a3504be --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_valuebound2.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..388a5a56946 --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_valuebound20.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..0b5dc8983e6 --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_valuebound5.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..a7cce3370d6 --- /dev/null +++ b/c/nla-digbench-scaling/ps3-ll_valuebound50.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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 a5f62842244..00000000000 --- a/c/nla-digbench-scaling/ps3_unwindbound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps3_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 801dd215f03..00000000000 --- a/c/nla-digbench-scaling/ps3_unwindbound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps3_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 ef8e1230c91..00000000000 --- a/c/nla-digbench-scaling/ps3_unwindbound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps3_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 af7a145834f..00000000000 --- a/c/nla-digbench-scaling/ps3_unwindbound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps3_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 f7f26ceeef6..00000000000 --- a/c/nla-digbench-scaling/ps3_unwindbound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps3_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 c32a5ffec5a..00000000000 --- a/c/nla-digbench-scaling/ps3_unwindbound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps3_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 bd3a17ae749..00000000000 --- a/c/nla-digbench-scaling/ps3_unwindbound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps3_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 42ca5171e5f..00000000000 --- a/c/nla-digbench-scaling/ps3_valuebound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps3_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 cb130a5caf0..00000000000 --- a/c/nla-digbench-scaling/ps3_valuebound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps3_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 8f537a19f99..00000000000 --- a/c/nla-digbench-scaling/ps3_valuebound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps3_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 aa5473abb64..00000000000 --- a/c/nla-digbench-scaling/ps3_valuebound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps3_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 05a5193d3b6..00000000000 --- a/c/nla-digbench-scaling/ps3_valuebound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps3_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 4dbd06195a0..00000000000 --- a/c/nla-digbench-scaling/ps3_valuebound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps3_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 cf9cd157ebe..00000000000 --- a/c/nla-digbench-scaling/ps3_valuebound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps3_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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..08693a61701 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_unwindbound1.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..075c677cba6 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_unwindbound10.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..9f460671d70 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_unwindbound100.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..adf4f50b24f --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_unwindbound2.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..c616b72fe3d --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_unwindbound20.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..5ee73fc4159 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_unwindbound5.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..b5e064624a5 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_unwindbound50.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..3405232e258 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_valuebound1.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..17af37a0bd6 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_valuebound10.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..e0ac1e35881 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_valuebound100.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..6f578ca89f5 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_valuebound2.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..647b7c3702f --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_valuebound20.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..4988637cfd9 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_valuebound5.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..12907191781 --- /dev/null +++ b/c/nla-digbench-scaling/ps4-ll_valuebound50.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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 a7e9140c9c2..00000000000 --- a/c/nla-digbench-scaling/ps4_unwindbound1.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'ps4_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 9c0d46d0686..00000000000 --- a/c/nla-digbench-scaling/ps4_unwindbound10.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'ps4_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 3ba47fbf30b..00000000000 --- a/c/nla-digbench-scaling/ps4_unwindbound100.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'ps4_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 ad94afdcc22..00000000000 --- a/c/nla-digbench-scaling/ps4_unwindbound2.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'ps4_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 dfba0c4b683..00000000000 --- a/c/nla-digbench-scaling/ps4_unwindbound20.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'ps4_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 fe74eaa77b4..00000000000 --- a/c/nla-digbench-scaling/ps4_unwindbound5.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'ps4_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 e2b021b833a..00000000000 --- a/c/nla-digbench-scaling/ps4_unwindbound50.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'ps4_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 0651f85c4f4..00000000000 --- a/c/nla-digbench-scaling/ps4_valuebound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps4_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 1d10520f76b..00000000000 --- a/c/nla-digbench-scaling/ps4_valuebound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps4_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 f2b71b1e208..00000000000 --- a/c/nla-digbench-scaling/ps4_valuebound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps4_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 ce329551781..00000000000 --- a/c/nla-digbench-scaling/ps4_valuebound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps4_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 51663907c65..00000000000 --- a/c/nla-digbench-scaling/ps4_valuebound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps4_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 37a33a766df..00000000000 --- a/c/nla-digbench-scaling/ps4_valuebound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps4_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 a9a1208eb69..00000000000 --- a/c/nla-digbench-scaling/ps4_valuebound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps4_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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..be0f40a4c0a --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_unwindbound1.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..c43e5d86f10 --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_unwindbound10.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..634121bc5cd --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_unwindbound100.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..c124c17b02e --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_unwindbound2.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..9b239215871 --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_unwindbound20.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..3cfc27c837c --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_unwindbound5.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..0cb68862abf --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_unwindbound50.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..7bf03709445 --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_valuebound1.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..e649cf504ec --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_valuebound10.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..530216e867a --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_valuebound100.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..cce5739d5a9 --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_valuebound2.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..13b7bed1772 --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_valuebound20.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..64153618994 --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_valuebound5.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..5a8d8143b5b --- /dev/null +++ b/c/nla-digbench-scaling/ps5-ll_valuebound50.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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 e2c203d6c4b..00000000000 --- a/c/nla-digbench-scaling/ps5_unwindbound1.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'ps5_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 d59a38ee874..00000000000 --- a/c/nla-digbench-scaling/ps5_unwindbound10.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'ps5_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 d40087cb325..00000000000 --- a/c/nla-digbench-scaling/ps5_unwindbound100.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'ps5_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 66309b9b82d..00000000000 --- a/c/nla-digbench-scaling/ps5_unwindbound2.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'ps5_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 9e8c2c05d5e..00000000000 --- a/c/nla-digbench-scaling/ps5_unwindbound20.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'ps5_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 e4db60bb0e5..00000000000 --- a/c/nla-digbench-scaling/ps5_unwindbound5.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'ps5_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 a49aa9080ac..00000000000 --- a/c/nla-digbench-scaling/ps5_unwindbound50.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'ps5_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 e798586b80a..00000000000 --- a/c/nla-digbench-scaling/ps5_valuebound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps5_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 7eaf82e6169..00000000000 --- a/c/nla-digbench-scaling/ps5_valuebound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps5_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 9e3f10178eb..00000000000 --- a/c/nla-digbench-scaling/ps5_valuebound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps5_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 5907bb67036..00000000000 --- a/c/nla-digbench-scaling/ps5_valuebound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps5_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 03ef5203fd9..00000000000 --- a/c/nla-digbench-scaling/ps5_valuebound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps5_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 cf43d3ca52e..00000000000 --- a/c/nla-digbench-scaling/ps5_valuebound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps5_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 afada75b2a9..00000000000 --- a/c/nla-digbench-scaling/ps5_valuebound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps5_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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..655f22af248 --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_unwindbound1.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..e32ab4a97b3 --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_unwindbound10.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..ec3e6be874c --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_unwindbound100.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..cf37925c9b2 --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_unwindbound2.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..cabaf66302b --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_unwindbound20.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..f31b4514315 --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_unwindbound5.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..68f7b34afc8 --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_unwindbound50.yml @@ -0,0 +1,13 @@ +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 + - property_file: ../properties/coverage-error-call.prp + - property_file: ../properties/coverage-branches.prp + +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..4a6e3c0c3f3 --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_valuebound1.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..b05396d0574 --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_valuebound10.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..81b89cae971 --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_valuebound100.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..11c64101cfe --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_valuebound2.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..a38048d9fbd --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_valuebound20.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..a0831cd4cf9 --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_valuebound5.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..d315971a2df --- /dev/null +++ b/c/nla-digbench-scaling/ps6-ll_valuebound50.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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 9b2757a5e62..00000000000 --- a/c/nla-digbench-scaling/ps6_unwindbound1.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'ps6_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 f9cb32febf1..00000000000 --- a/c/nla-digbench-scaling/ps6_unwindbound10.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'ps6_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 2afc0c622fc..00000000000 --- a/c/nla-digbench-scaling/ps6_unwindbound100.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'ps6_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 656bf48dd7a..00000000000 --- a/c/nla-digbench-scaling/ps6_unwindbound2.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'ps6_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 c053a01c7ff..00000000000 --- a/c/nla-digbench-scaling/ps6_unwindbound20.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'ps6_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 500cb8c5709..00000000000 --- a/c/nla-digbench-scaling/ps6_unwindbound5.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'ps6_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 cad68874730..00000000000 --- a/c/nla-digbench-scaling/ps6_unwindbound50.yml +++ /dev/null @@ -1,11 +0,0 @@ -format_version: '2.0' -input_files: 'ps6_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: false - - property_file: ../properties/coverage-error-call.prp - - property_file: ../properties/coverage-branches.prp - -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 44db469ebc5..00000000000 --- a/c/nla-digbench-scaling/ps6_valuebound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps6_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 f1c8eb4b6ee..00000000000 --- a/c/nla-digbench-scaling/ps6_valuebound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps6_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 cf89e7a4c42..00000000000 --- a/c/nla-digbench-scaling/ps6_valuebound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps6_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 9f84af4749b..00000000000 --- a/c/nla-digbench-scaling/ps6_valuebound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps6_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 39574e7c5fd..00000000000 --- a/c/nla-digbench-scaling/ps6_valuebound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps6_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 d07ee94106a..00000000000 --- a/c/nla-digbench-scaling/ps6_valuebound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps6_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 a6a7f00f83a..00000000000 --- a/c/nla-digbench-scaling/ps6_valuebound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'ps6_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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..75fb61f1963 --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_unwindbound1.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..b171058e4fb --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_unwindbound10.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..f8b51cc6e08 --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_unwindbound100.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..b4d844a4808 --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_unwindbound2.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..5d08cd1864b --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_unwindbound20.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..6b0f9d3ace6 --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_unwindbound5.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..abd4825b34b --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_unwindbound50.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..bad651b5350 --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_valuebound1.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..55233e502ee --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_valuebound10.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..f672e0b86e2 --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_valuebound100.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..f1a875a7c02 --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_valuebound2.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..812265049d7 --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_valuebound20.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..46ae244228a --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_valuebound5.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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..d75a0a02708 --- /dev/null +++ b/c/nla-digbench-scaling/sqrt1-ll_valuebound50.yml @@ -0,0 +1,12 @@ +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 + - property_file: ../properties/coverage-branches.prp + +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 260d3caa6f3..00000000000 --- a/c/nla-digbench-scaling/sqrt1_unwindbound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'sqrt1_unwindbound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 f83bc4bf200..00000000000 --- a/c/nla-digbench-scaling/sqrt1_unwindbound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'sqrt1_unwindbound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 12435c720ae..00000000000 --- a/c/nla-digbench-scaling/sqrt1_unwindbound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'sqrt1_unwindbound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 059f43f1d9a..00000000000 --- a/c/nla-digbench-scaling/sqrt1_unwindbound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'sqrt1_unwindbound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 c3f0c6920a5..00000000000 --- a/c/nla-digbench-scaling/sqrt1_unwindbound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'sqrt1_unwindbound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 82e5c1d31ab..00000000000 --- a/c/nla-digbench-scaling/sqrt1_unwindbound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'sqrt1_unwindbound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 3119ae4f040..00000000000 --- a/c/nla-digbench-scaling/sqrt1_unwindbound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'sqrt1_unwindbound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 0f2d5749b5a..00000000000 --- a/c/nla-digbench-scaling/sqrt1_valuebound1.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'sqrt1_valuebound1.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 f8bd9d39418..00000000000 --- a/c/nla-digbench-scaling/sqrt1_valuebound10.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'sqrt1_valuebound10.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 e3da66bdc5c..00000000000 --- a/c/nla-digbench-scaling/sqrt1_valuebound100.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'sqrt1_valuebound100.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 80ecc77ca49..00000000000 --- a/c/nla-digbench-scaling/sqrt1_valuebound2.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'sqrt1_valuebound2.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 4485e498d2e..00000000000 --- a/c/nla-digbench-scaling/sqrt1_valuebound20.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'sqrt1_valuebound20.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 f835cf50570..00000000000 --- a/c/nla-digbench-scaling/sqrt1_valuebound5.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'sqrt1_valuebound5.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -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 494cb26168b..00000000000 --- a/c/nla-digbench-scaling/sqrt1_valuebound50.yml +++ /dev/null @@ -1,10 +0,0 @@ -format_version: '2.0' -input_files: 'sqrt1_valuebound50.c' -properties: - - property_file: ../properties/unreach-call.prp - expected_verdict: true - - property_file: ../properties/coverage-branches.prp - -options: - language: C - data_model: ILP32