forked from sosy-lab/sv-benchmarks
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request sosy-lab#1220 from MartinSpiessl/nla-temp
Update nla-digbench-scaling (continuation of PR sosy-lab#1200)
- Loading branch information
Showing
1,529 changed files
with
22,350 additions
and
18,399 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Oops, something went wrong.