Skip to content

Commit 8fefaad

Browse files
committed
Added benchmarks for clang-fe
1 parent 24bb5f4 commit 8fefaad

File tree

266 files changed

+26245
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

266 files changed

+26245
-0
lines changed

clang-fe/benchmarks-copy/c/1.c

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
int main() {
2+
// variable declarations
3+
int x;
4+
int y;
5+
// pre-conditions
6+
(x = 1);
7+
(y = 0);
8+
// loop body
9+
while ((y < 100000)) {
10+
{
11+
(x = (x + y));
12+
(y = (y + 1));
13+
}
14+
15+
}
16+
// post-condition
17+
assert( (x >= y) );
18+
}

clang-fe/benchmarks-copy/c/10.c

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
int main() {
2+
// variable declarations
3+
int x;
4+
int y;
5+
// pre-conditions
6+
assume((x >= 0));
7+
assume((x <= 2));
8+
assume((y <= 2));
9+
assume((y >= 0));
10+
// loop body
11+
while (unknown()) {
12+
{
13+
(x = (x + 2));
14+
(y = (y + 2));
15+
}
16+
17+
}
18+
// post-condition
19+
if ( (y == 0) )
20+
assert( (x != 4) );
21+
22+
}

clang-fe/benchmarks-copy/c/100.c

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
int main() {
2+
// variable declarations
3+
int n;
4+
int x;
5+
int y;
6+
// pre-conditions
7+
assume((n >= 0));
8+
(x = n);
9+
(y = 0);
10+
// loop body
11+
while ((x > 0)) {
12+
{
13+
(y = (y + 1));
14+
(x = (x - 1));
15+
}
16+
17+
}
18+
// post-condition
19+
assert( (y == n) );
20+
}

clang-fe/benchmarks-copy/c/101.c

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
int main() {
2+
// variable declarations
3+
int n;
4+
int x;
5+
// pre-conditions
6+
(x = 0);
7+
// loop body
8+
while ((x < n)) {
9+
{
10+
(x = (x + 1));
11+
}
12+
13+
}
14+
// post-condition
15+
if ( (x != n) )
16+
assert( (n < 0) );
17+
18+
}

clang-fe/benchmarks-copy/c/102.c

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
int main() {
2+
// variable declarations
3+
int n;
4+
int x;
5+
// pre-conditions
6+
(x = 0);
7+
// loop body
8+
while ((x < n)) {
9+
{
10+
(x = (x + 1));
11+
}
12+
13+
}
14+
// post-condition
15+
if ( (n >= 0) )
16+
assert( (x == n) );
17+
18+
}

clang-fe/benchmarks-copy/c/103.c

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
int main() {
2+
// variable declarations
3+
int x;
4+
// pre-conditions
5+
(x = 0);
6+
// loop body
7+
while ((x < 100)) {
8+
{
9+
(x = (x + 1));
10+
}
11+
12+
}
13+
// post-condition
14+
assert( (x == 100) );
15+
}

clang-fe/benchmarks-copy/c/104.c

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
int main() {
2+
// variable declarations
3+
int n;
4+
int v1;
5+
int v2;
6+
int v3;
7+
int x;
8+
// pre-conditions
9+
(x = 0);
10+
// loop body
11+
while ((x < n)) {
12+
{
13+
(x = (x + 1));
14+
}
15+
16+
}
17+
// post-condition
18+
if ( (x != n) )
19+
assert( (n < 0) );
20+
21+
}

clang-fe/benchmarks-copy/c/105.c

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
int main() {
2+
// variable declarations
3+
int n;
4+
int v1;
5+
int v2;
6+
int v3;
7+
int x;
8+
// pre-conditions
9+
(x = 0);
10+
// loop body
11+
while ((x < n)) {
12+
{
13+
(x = (x + 1));
14+
}
15+
16+
}
17+
// post-condition
18+
if ( (n >= 0) )
19+
assert( (x == n) );
20+
21+
}

clang-fe/benchmarks-copy/c/106.c

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
int main() {
3+
int a,m,j,k;
4+
5+
assume(a <= m);
6+
assume(j < 1);
7+
k = 0;
8+
9+
while ( k < 1) {
10+
if(m < a) {
11+
m = a;
12+
}
13+
k = k + 1;
14+
}
15+
16+
assert( a >= m);
17+
}

clang-fe/benchmarks-copy/c/107.c

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
3+
int main() {
4+
int a,m,j,k;
5+
6+
j = 0;
7+
k = 0;
8+
9+
while ( k < 1) {
10+
if(m < a) {
11+
m = a;
12+
}
13+
k = k + 1;
14+
}
15+
16+
assert( a <= m);
17+
}

clang-fe/benchmarks-copy/c/108.c

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
int main() {
3+
int a,c,m,j,k;
4+
5+
assume(a <= m);
6+
j = 0;
7+
k = 0;
8+
9+
while ( k < c) {
10+
if(m < a) {
11+
m = a;
12+
}
13+
k = k + 1;
14+
}
15+
16+
assert( a <= m);
17+
}

clang-fe/benchmarks-copy/c/109.c

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
int main() {
3+
int a,c,m,j,k;
4+
5+
j = 0;
6+
k = 0;
7+
8+
while ( k < c) {
9+
if(m < a) {
10+
m = a;
11+
}
12+
k = k + 1;
13+
}
14+
15+
if( c > 0 ) {
16+
assert( a <= m);
17+
}
18+
}

clang-fe/benchmarks-copy/c/11.c

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
int main() {
2+
// variable declarations
3+
int x;
4+
int y;
5+
int z1;
6+
int z2;
7+
int z3;
8+
// pre-conditions
9+
assume((x >= 0));
10+
assume((x <= 10));
11+
assume((y <= 10));
12+
assume((y >= 0));
13+
// loop body
14+
while (unknown()) {
15+
{
16+
(x = (x + 10));
17+
(y = (y + 10));
18+
}
19+
20+
}
21+
// post-condition
22+
if ( (x == 20) )
23+
assert( (y != 0) );
24+
25+
}

clang-fe/benchmarks-copy/c/110.c

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
int main() {
2+
// variable declarations
3+
int i;
4+
int n;
5+
int sn;
6+
// pre-conditions
7+
(sn = 0);
8+
(i = 1);
9+
// loop body
10+
while ((i <= n)) {
11+
{
12+
(i = (i + 1));
13+
(sn = (sn + 1));
14+
}
15+
16+
}
17+
// post-condition
18+
if ( (sn != n) )
19+
assert( (sn == 0) );
20+
21+
}

clang-fe/benchmarks-copy/c/111.c

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
int main() {
2+
// variable declarations
3+
int i;
4+
int n;
5+
int sn;
6+
// pre-conditions
7+
(sn = 0);
8+
(i = 1);
9+
// loop body
10+
while ((i <= n)) {
11+
{
12+
(i = (i + 1));
13+
(sn = (sn + 1));
14+
}
15+
16+
}
17+
// post-condition
18+
if ( (sn != 0) )
19+
assert( (sn == n) );
20+
21+
}

clang-fe/benchmarks-copy/c/112.c

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
int main() {
2+
// variable declarations
3+
int i;
4+
int n;
5+
int sn;
6+
int v1;
7+
int v2;
8+
int v3;
9+
// pre-conditions
10+
(sn = 0);
11+
(i = 1);
12+
// loop body
13+
while ((i <= n)) {
14+
{
15+
(i = (i + 1));
16+
(sn = (sn + 1));
17+
}
18+
19+
}
20+
// post-condition
21+
if ( (sn != n) )
22+
assert( (sn == 0) );
23+
24+
}

clang-fe/benchmarks-copy/c/113.c

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
int main() {
2+
// variable declarations
3+
int i;
4+
int n;
5+
int sn;
6+
int v1;
7+
int v2;
8+
int v3;
9+
// pre-conditions
10+
(sn = 0);
11+
(i = 1);
12+
// loop body
13+
while ((i <= n)) {
14+
{
15+
(i = (i + 1));
16+
(sn = (sn + 1));
17+
}
18+
19+
}
20+
// post-condition
21+
if ( (sn != 0) )
22+
assert( (sn == n) );
23+
24+
}

clang-fe/benchmarks-copy/c/114.c

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
int main() {
2+
// variable declarations
3+
int sn;
4+
int x;
5+
// pre-conditions
6+
(sn = 0);
7+
(x = 0);
8+
// loop body
9+
while (unknown()) {
10+
{
11+
(x = (x + 1));
12+
(sn = (sn + 1));
13+
}
14+
15+
}
16+
// post-condition
17+
if ( (sn != x) )
18+
assert( (sn == -1) );
19+
20+
}

clang-fe/benchmarks-copy/c/115.c

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
int main() {
2+
// variable declarations
3+
int sn;
4+
int x;
5+
// pre-conditions
6+
(sn = 0);
7+
(x = 0);
8+
// loop body
9+
while (unknown()) {
10+
{
11+
(x = (x + 1));
12+
(sn = (sn + 1));
13+
}
14+
15+
}
16+
// post-condition
17+
if ( (sn != -1) )
18+
assert( (sn == x) );
19+
20+
}

0 commit comments

Comments
 (0)