Skip to content
This repository was archived by the owner on Oct 3, 2021. It is now read-only.

Commit 835b3b1

Browse files
authored
Merge pull request #1201 from sosy-lab/line-endings
Normalize line endings in relevant parts of the repository
2 parents 25b1b86 + 5587333 commit 835b3b1

File tree

54 files changed

+3276
-3252
lines changed

Some content is hidden

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

54 files changed

+3276
-3252
lines changed

.gitattributes

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# This file is part of the SV-Benchmarks collection of verification tasks:
2+
# https://github.com/sosy-lab/sv-benchmarks
3+
#
4+
# SPDX-FileCopyrightText: 2011-2020 The SV-Benchmarks Community
5+
#
6+
# SPDX-License-Identifier: Apache-2.0
7+
8+
# Enable git's auto-detection of text files and enable normalization of line endings
9+
* text=auto
10+
# Force certain file types to be always considered as text with normalized line endings
11+
*.c text
12+
*.h text
13+
*.i text
14+
*.java text
15+
*.md text
16+
*.py text
17+
*.set text
18+
*.txt text
19+
*.yml text
20+
Makefile text
21+
Makefile.* text
22+
# Prevent changes to certain large directories where it is not relevant now
23+
clauses/** !text
24+
c/Juliet_Test/Juliet_Test_Suite_v1.3_for_C_Cpp/** !text
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Programs handling arrays.
1+
Programs handling arrays.
22
These programs are based on patterns observed in industry applications.

c/array-lopstr16/break-2.c

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11
extern void abort(void);
22
#include <assert.h>
33
void reach_error() { assert(0); }
4-
void __VERIFIER_assert(int cond) { if(!(cond)) { ERROR: {reach_error();abort();} } }
5-
#define SIZE 1000000
6-
struct S
7-
{
8-
int n;
9-
};
10-
11-
struct S s[SIZE];
12-
13-
int main()
14-
{
15-
int i;
16-
17-
for(i = 0; i < SIZE; i++)
18-
{
19-
if(i > SIZE / 2)
20-
break;
21-
22-
s[i].n = 10;
23-
}
24-
25-
for(i = 0; i < SIZE; i++)
26-
{
27-
if(i <= SIZE /2 )
28-
__VERIFIER_assert(s[i].n == 10);
29-
}
30-
31-
return 0;
32-
}
4+
void __VERIFIER_assert(int cond) { if(!(cond)) { ERROR: {reach_error();abort();} } }
5+
#define SIZE 1000000
6+
struct S
7+
{
8+
int n;
9+
};
10+
11+
struct S s[SIZE];
12+
13+
int main()
14+
{
15+
int i;
16+
17+
for(i = 0; i < SIZE; i++)
18+
{
19+
if(i > SIZE / 2)
20+
break;
21+
22+
s[i].n = 10;
23+
}
24+
25+
for(i = 0; i < SIZE; i++)
26+
{
27+
if(i <= SIZE /2 )
28+
__VERIFIER_assert(s[i].n == 10);
29+
}
30+
31+
return 0;
32+
}

c/array-lopstr16/motivex.c

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
extern void abort(void);
22
#include <assert.h>
33
void reach_error() { assert(0); }
4-
void __VERIFIER_assert(int cond) { if(!(cond)) { ERROR: {reach_error();abort();} } }
5-
extern short __VERIFIER_nondet_short(void);
6-
#define SIZE 1000000
7-
struct S {
8-
unsigned short p;
9-
unsigned short q;
10-
} a[10000];
11-
12-
int main()
13-
{
14-
unsigned char k;
15-
16-
int i;
17-
for (i = 0; i < SIZE ; i++)
18-
{
19-
a[i].p = i;
20-
a[i].q = i ;
21-
}
22-
23-
for (i = 0; i < SIZE; i++)
24-
{
25-
if (__VERIFIER_nondet_short() )
26-
{
27-
k = __VERIFIER_nondet_short();
28-
a[i].p = k;
29-
a[i].q = k * k ;
30-
}
31-
}
32-
33-
for (i = 0; i < SIZE; i++)
34-
{
35-
__VERIFIER_assert(a[i].p == a[i].q || a[i].q == a[i].p * a[i].p);
36-
}
37-
38-
return 0;
39-
}
40-
4+
void __VERIFIER_assert(int cond) { if(!(cond)) { ERROR: {reach_error();abort();} } }
5+
extern short __VERIFIER_nondet_short(void);
6+
#define SIZE 1000000
7+
struct S {
8+
unsigned short p;
9+
unsigned short q;
10+
} a[10000];
11+
12+
int main()
13+
{
14+
unsigned char k;
15+
16+
int i;
17+
for (i = 0; i < SIZE ; i++)
18+
{
19+
a[i].p = i;
20+
a[i].q = i ;
21+
}
22+
23+
for (i = 0; i < SIZE; i++)
24+
{
25+
if (__VERIFIER_nondet_short() )
26+
{
27+
k = __VERIFIER_nondet_short();
28+
a[i].p = k;
29+
a[i].q = k * k ;
30+
}
31+
}
32+
33+
for (i = 0; i < SIZE; i++)
34+
{
35+
__VERIFIER_assert(a[i].p == a[i].q || a[i].q == a[i].p * a[i].p);
36+
}
37+
38+
return 0;
39+
}
40+

c/array-lopstr16/scalar_loopdep.c

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
extern void abort(void);
22
#include <assert.h>
33
void reach_error() { assert(0); }
4-
void __VERIFIER_assert(int cond) { if(!(cond)) { ERROR: {reach_error();abort();} } }
5-
6-
#define SIZE 100000
7-
struct _S
8-
{
9-
int n;
10-
};
11-
typedef struct _S S;
12-
13-
S a[SIZE];
14-
15-
int main()
16-
{
17-
int i,x;
18-
int y = 100;
19-
for(i = 0; i < SIZE; i++)
20-
{
21-
x = y;
22-
a[i].n = y;
23-
y++;
24-
}
25-
26-
27-
for(i = 0; i < SIZE; i++)
28-
{
29-
__VERIFIER_assert(a[i].n >= 100);
30-
31-
}
32-
33-
return 0;
34-
}
35-
36-
4+
void __VERIFIER_assert(int cond) { if(!(cond)) { ERROR: {reach_error();abort();} } }
5+
6+
#define SIZE 100000
7+
struct _S
8+
{
9+
int n;
10+
};
11+
typedef struct _S S;
12+
13+
S a[SIZE];
14+
15+
int main()
16+
{
17+
int i,x;
18+
int y = 100;
19+
for(i = 0; i < SIZE; i++)
20+
{
21+
x = y;
22+
a[i].n = y;
23+
y++;
24+
}
25+
26+
27+
for(i = 0; i < SIZE; i++)
28+
{
29+
__VERIFIER_assert(a[i].n >= 100);
30+
31+
}
32+
33+
return 0;
34+
}
35+
36+

c/array-lopstr16/sum_multi_array.c

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
extern void abort(void);
22
#include <assert.h>
33
void reach_error() { assert(0); }
4-
void __VERIFIER_assert(int cond) { if(!(cond)) { ERROR: {reach_error();abort();} } }
5-
extern int __VERIFIER_nondet_int();
6-
#define SIZE 1000000
7-
struct _S
8-
{
9-
int n;
10-
};
11-
typedef struct _S S;
12-
13-
S a[SIZE];
14-
S b[SIZE];
15-
S c[SIZE];
16-
17-
int main()
18-
{
19-
20-
int i;
21-
22-
for(i = 0; i < SIZE; i++)
23-
{
24-
int v;
25-
v = __VERIFIER_nondet_int();
26-
a[i].n= v;
27-
v = __VERIFIER_nondet_int();
28-
b[i].n = v;
29-
}
30-
31-
for(i = 0; i < SIZE; i++)
32-
{
33-
c[i].n = a[i].n + b[i].n;
34-
}
35-
36-
for(i = 0; i < SIZE; i++)
37-
{
38-
__VERIFIER_assert(c[i].n == a[i].n + b[i].n);
39-
}
40-
41-
return 0;
42-
}
43-
4+
void __VERIFIER_assert(int cond) { if(!(cond)) { ERROR: {reach_error();abort();} } }
5+
extern int __VERIFIER_nondet_int();
6+
#define SIZE 1000000
7+
struct _S
8+
{
9+
int n;
10+
};
11+
typedef struct _S S;
12+
13+
S a[SIZE];
14+
S b[SIZE];
15+
S c[SIZE];
16+
17+
int main()
18+
{
19+
20+
int i;
21+
22+
for(i = 0; i < SIZE; i++)
23+
{
24+
int v;
25+
v = __VERIFIER_nondet_int();
26+
a[i].n= v;
27+
v = __VERIFIER_nondet_int();
28+
b[i].n = v;
29+
}
30+
31+
for(i = 0; i < SIZE; i++)
32+
{
33+
c[i].n = a[i].n + b[i].n;
34+
}
35+
36+
for(i = 0; i < SIZE; i++)
37+
{
38+
__VERIFIER_assert(c[i].n == a[i].n + b[i].n);
39+
}
40+
41+
return 0;
42+
}
43+

c/array-memsafety/README.txt

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
C programs for termination analysis, that were used by AProVE:
2-
3-
http://aprove.informatik.rwth-aachen.de/
4-
5-
The benchmarks were contributed by:
6-
Frank Emrich
7-
Stephan Falke
8-
Matthias Heizmann
9-
Jera Hensel
10-
Janine Repke
11-
Thomas Ströder
12-
13-
You may use and redistribute them according to the (2-clause) BSD license that is shipped with these examples.
14-
15-
[comment by Ondrej Lengal (11 Oct 2015):
16-
17-
Array examples were moved from memory-alloca/ here in commit f3f1cdf .
18-
]
19-
1+
C programs for termination analysis, that were used by AProVE:
2+
3+
http://aprove.informatik.rwth-aachen.de/
4+
5+
The benchmarks were contributed by:
6+
Frank Emrich
7+
Stephan Falke
8+
Matthias Heizmann
9+
Jera Hensel
10+
Janine Repke
11+
Thomas Ströder
12+
13+
You may use and redistribute them according to the (2-clause) BSD license that is shipped with these examples.
14+
15+
[comment by Ondrej Lengal (11 Oct 2015):
16+
17+
Array examples were moved from memory-alloca/ here in commit f3f1cdf .
18+
]
19+
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Benchmarks used in the paper "Extending VIAP to Handle Array Program" which was published at VSTTE 2018 and written by Pritom Rajkhowa and Fangzhen Lin
1+
Benchmarks used in the paper "Extending VIAP to Handle Array Program" which was published at VSTTE 2018 and written by Pritom Rajkhowa and Fangzhen Lin

0 commit comments

Comments
 (0)