Skip to content

Commit c6fc9c2

Browse files
authored
Merge pull request #1400 from goblint/yaml-witness-column
Change YAML witness columns to 1-indexed
2 parents 3abe965 + 8cc300c commit c6fc9c2

Some content is hidden

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

49 files changed

+195
-195
lines changed

src/analyses/unassumeAnalysis.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ struct
7474
let loc_of_location (location: YamlWitnessType.Location.t): Cil.location = {
7575
file = location.file_name;
7676
line = location.line;
77-
column = location.column + 1;
77+
column = location.column;
7878
byte = -1;
7979
endLine = -1;
8080
endColumn = -1;

src/witness/yamlWitness.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ struct
4747
file_name = loc.file;
4848
file_hash = sha256_file loc.file;
4949
line = loc.line;
50-
column = loc.column - 1;
50+
column = loc.column;
5151
function_ = location_function;
5252
}
5353

@@ -556,7 +556,7 @@ struct
556556
let loc_of_location (location: YamlWitnessType.Location.t): Cil.location = {
557557
file = location.file_name;
558558
line = location.line;
559-
column = location.column + 1;
559+
column = location.column;
560560
byte = -1;
561561
endLine = -1;
562562
endColumn = -1;

tests/regression/56-witness/01-base-lor-enums.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
file_name: 01-base-lor-enums.c
1818
file_hash: 5f686f726d140fbb7f3052f778e99aa09e3807cc6972a4d4905df2f6ed0c3e01
1919
line: 17
20-
column: 2
20+
column: 3
2121
function: main
2222
location_invariant:
2323
string: (x == 1 || x == 3) || x == 6
@@ -42,7 +42,7 @@
4242
file_name: 01-base-lor-enums.c
4343
file_hash: 5f686f726d140fbb7f3052f778e99aa09e3807cc6972a4d4905df2f6ed0c3e01
4444
line: 18
45-
column: 2
45+
column: 3
4646
function: main
4747
location_invariant:
4848
string: (x == 1 || x == 3) || x == 7
@@ -67,7 +67,7 @@
6767
file_name: 01-base-lor-enums.c
6868
file_hash: 5f686f726d140fbb7f3052f778e99aa09e3807cc6972a4d4905df2f6ed0c3e01
6969
line: 29
70-
column: 2
70+
column: 3
7171
function: main
7272
location_invariant:
7373
string: y == 11 || y == x
@@ -92,7 +92,7 @@
9292
file_name: 01-base-lor-enums.c
9393
file_hash: 5f686f726d140fbb7f3052f778e99aa09e3807cc6972a4d4905df2f6ed0c3e01
9494
line: 30
95-
column: 2
95+
column: 3
9696
function: main
9797
location_invariant:
9898
string: (y == 1 || y == 3) || y == 6 || y == 11
@@ -117,7 +117,7 @@
117117
file_name: 01-base-lor-enums.c
118118
file_hash: 5f686f726d140fbb7f3052f778e99aa09e3807cc6972a4d4905df2f6ed0c3e01
119119
line: 31
120-
column: 2
120+
column: 3
121121
function: main
122122
location_invariant:
123123
string: y == 42 || y == x

tests/regression/56-witness/02-base-lor-addr.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
file_name: 02-base-lor-addr.c
1818
file_hash: 5f686f726d140fbb7f3052f778e99aa09e3807cc6972a4d4905df2f6ed0c3e01
1919
line: 17
20-
column: 2
20+
column: 3
2121
function: main
2222
location_invariant:
2323
string: (x == &a || x == &b) || x == &c
@@ -42,7 +42,7 @@
4242
file_name: 02-base-lor-addr.c
4343
file_hash: 5f686f726d140fbb7f3052f778e99aa09e3807cc6972a4d4905df2f6ed0c3e01
4444
line: 18
45-
column: 2
45+
column: 3
4646
function: main
4747
location_invariant:
4848
string: (x == &a || x == &b) || x == &d
@@ -67,7 +67,7 @@
6767
file_name: 02-base-lor-addr.c
6868
file_hash: 5f686f726d140fbb7f3052f778e99aa09e3807cc6972a4d4905df2f6ed0c3e01
6969
line: 29
70-
column: 2
70+
column: 3
7171
function: main
7272
location_invariant:
7373
string: y == &e || y == x
@@ -92,7 +92,7 @@
9292
file_name: 02-base-lor-addr.c
9393
file_hash: 5f686f726d140fbb7f3052f778e99aa09e3807cc6972a4d4905df2f6ed0c3e01
9494
line: 30
95-
column: 2
95+
column: 3
9696
function: main
9797
location_invariant:
9898
string: (y == &a || y == &b) || y == &c || y == &e
@@ -117,7 +117,7 @@
117117
file_name: 02-base-lor-addr.c
118118
file_hash: 5f686f726d140fbb7f3052f778e99aa09e3807cc6972a4d4905df2f6ed0c3e01
119119
line: 31
120-
column: 2
120+
column: 3
121121
function: main
122122
location_invariant:
123123
string: y == &d || y == x

tests/regression/56-witness/03-int-log-short.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
file_name: 03-int-log-short.c
1818
file_hash: 055e8b0b611a6bbe2b072f5c92f094e63fa339ac53190660ac3e54f2fd40d379
1919
line: 8
20-
column: 2
20+
column: 3
2121
function: main
2222
location_invariant:
2323
string: r || x
@@ -42,7 +42,7 @@
4242
file_name: 03-int-log-short.c
4343
file_hash: 055e8b0b611a6bbe2b072f5c92f094e63fa339ac53190660ac3e54f2fd40d379
4444
line: 9
45-
column: 2
45+
column: 3
4646
function: main
4747
location_invariant:
4848
string: '!(r && y)'

tests/regression/56-witness/04-base-priv-sync-prune.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
file_name: 04-base-priv-sync-prune.c
1818
file_hash: 20f9b103c97d1a16c6c4e39478f949ffbf1bb4c7ed7b17af7d7399aa57c8f158
1919
line: 8
20-
column: 2
20+
column: 3
2121
function: main
2222
location_invariant:
2323
string: g == 2

tests/regression/56-witness/05-prec-problem.t

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The sound invariant is `result == 1 || result == 0`.
2020
file_name: 05-prec-problem.c
2121
file_hash: $FILE_HASH
2222
line: 13
23-
column: 4
23+
column: 5
2424
function: foo
2525
loop_invariant:
2626
string: result == 1 || result == 0
@@ -35,7 +35,7 @@ The sound invariant is `result == 1 || result == 0`.
3535
file_name: 05-prec-problem.c
3636
file_hash: $FILE_HASH
3737
line: 13
38-
column: 4
38+
column: 5
3939
function: foo
4040
loop_invariant:
4141
string: '*ptr2 == 5'
@@ -50,7 +50,7 @@ The sound invariant is `result == 1 || result == 0`.
5050
file_name: 05-prec-problem.c
5151
file_hash: $FILE_HASH
5252
line: 13
53-
column: 4
53+
column: 5
5454
function: foo
5555
loop_invariant:
5656
string: '*ptr1 == 5'

tests/regression/56-witness/07-base-lor-interval.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
file_name: 07-base-lor-interval.c
1818
file_hash: 6aaf25a17ef6c1a6b16300f34c4ef196baeb5a505a0e863ca0340e6060ef84e4
1919
line: 8
20-
column: 2
20+
column: 3
2121
function: main
2222
location_invariant:
2323
string: r || 2 <= x
@@ -42,7 +42,7 @@
4242
file_name: 07-base-lor-interval.c
4343
file_hash: 6aaf25a17ef6c1a6b16300f34c4ef196baeb5a505a0e863ca0340e6060ef84e4
4444
line: 9
45-
column: 2
45+
column: 3
4646
function: main
4747
location_invariant:
4848
string: 2 <= x || r

tests/regression/56-witness/08-witness-all-locals.t

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
file_name: 08-witness-all-locals.c
1313
file_hash: $FILE_HASH
1414
line: 9
15-
column: 2
15+
column: 3
1616
function: main
1717
location_invariant:
1818
string: y == 10
@@ -23,7 +23,7 @@
2323
file_name: 08-witness-all-locals.c
2424
file_hash: $FILE_HASH
2525
line: 9
26-
column: 2
26+
column: 3
2727
function: main
2828
location_invariant:
2929
string: x == 5
@@ -34,7 +34,7 @@
3434
file_name: 08-witness-all-locals.c
3535
file_hash: $FILE_HASH
3636
line: 7
37-
column: 4
37+
column: 5
3838
function: main
3939
location_invariant:
4040
string: x == 5
@@ -58,7 +58,7 @@ Fewer entries are emitted if locals from nested block scopes are excluded:
5858
file_name: 08-witness-all-locals.c
5959
file_hash: $FILE_HASH
6060
line: 9
61-
column: 2
61+
column: 3
6262
function: main
6363
location_invariant:
6464
string: x == 5
@@ -69,7 +69,7 @@ Fewer entries are emitted if locals from nested block scopes are excluded:
6969
file_name: 08-witness-all-locals.c
7070
file_hash: $FILE_HASH
7171
line: 7
72-
column: 4
72+
column: 5
7373
function: main
7474
location_invariant:
7575
string: x == 5

tests/regression/56-witness/10-apron-unassume-interval.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
file_name: 10-apron-unassume-interval.c
2121
file_hash: 71e40ed99b5217343d0831e293e7207e5bd30ce53f6ab73f0c1ef6ced1afcc60
2222
line: 6
23-
column: 2
23+
column: 3
2424
function: main
2525
loop_invariant:
2626
string: 100LL - (long long )i >= 0LL
@@ -48,7 +48,7 @@
4848
file_name: 10-apron-unassume-interval.c
4949
file_hash: 71e40ed99b5217343d0831e293e7207e5bd30ce53f6ab73f0c1ef6ced1afcc60
5050
line: 6
51-
column: 2
51+
column: 3
5252
function: main
5353
loop_invariant:
5454
string: (long long )i >= 0LL

0 commit comments

Comments
 (0)