Skip to content

Commit 80470f6

Browse files
committed
removed some obsolete linear string attributes
1 parent 5e1ca0c commit 80470f6

18 files changed

+53
-72
lines changed

Test/civl/regression-tests/async-yield-sufficiency.bpl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
// RUN: %parallel-boogie "%s" > "%t"
22
// RUN: %diff "%s.expect" "%t"
3-
type {:linear "tid"} Tid = int;
3+
type {:linear} Tid = int;
44
var {:layer 0,1} x:int;
55

6-
yield procedure {:layer 1} P({:linear_in "tid"} tid1:int, {:linear "tid"} tid2:int)
6+
yield procedure {:layer 1} P({:linear_in} tid1:int, {:linear} tid2:int)
77
requires call Yield_P(tid1, tid2);
88
{
99
async call Q(tid1);
1010
call write(); // This action invalidates the precondition of the above async call
1111
}
1212

13-
yield procedure {:layer 1} Q({:linear "tid"} tid1:int)
13+
yield procedure {:layer 1} Q({:linear} tid1:int)
1414
requires call Yield_Q(tid1);
1515
{
1616
call assertion();
@@ -33,11 +33,11 @@ refines WRITE;
3333
yield procedure {:layer 0} assertion();
3434
refines ASSERTION;
3535

36-
yield invariant {:layer 1} Yield_P({:linear "tid"} tid1:int, {:linear "tid"} tid2:int);
36+
yield invariant {:layer 1} Yield_P({:linear} tid1:int, {:linear} tid2:int);
3737
preserves tid1 == 1;
3838
preserves tid2 == 1;
3939
preserves x == 0;
4040

41-
yield invariant {:layer 1} Yield_Q({:linear "tid"} tid1:int);
41+
yield invariant {:layer 1} Yield_Q({:linear} tid1:int);
4242
preserves tid1 == 1;
4343
preserves x == 0; // This precondition is not valid at the end of procedure P
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
11
// RUN: %parallel-boogie "%s" > "%t"
22
// RUN: %diff "%s.expect" "%t"
33

4-
type {:linear "lin"} X = int;
54
var {:layer 0,1} x:int;
6-
yield invariant {:layer 1} linear_yield_x({:linear "lin"} n: int);
5+
yield invariant {:layer 1} linear_yield_x({:linear} n: int);
76
preserves x >= n;
87

98
yield procedure {:layer 1}
109
p2({:linear_in "lin"} b: int);
1110

1211
yield procedure {:layer 1}
13-
P1({:linear "lin"} x: int, {:linear_in "lin"} y: int)
12+
P1({:linear} x: int, {:linear_in "lin"} y: int)
1413
{
1514
call Q(x) | Q(x);
1615
}
1716

1817
yield procedure {:layer 1}
19-
P2({:linear "lin"} x: int, {:linear_in "lin"} y: int)
18+
P2({:linear} x: int, {:linear_in "lin"} y: int)
2019
{
2120
call Q(x) | linear_yield_x(y) | linear_yield_x(y);
2221
call Q(x) | linear_yield_x(x) | linear_yield_x(y);
2322
}
2423

2524
yield procedure {:layer 1}
26-
Q({:linear "lin"} a: int);
25+
Q({:linear} a: int);
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
call-yield-invariant-errors.bpl(15,2): Error: linear variable can occur only once as an input parameter of a parallel call: x
2-
call-yield-invariant-errors.bpl(22,2): Error: linear variable cannot be an input parameter to both a yield invariant and a procedure in a parallel call: x
1+
call-yield-invariant-errors.bpl(14,2): Error: linear variable can occur only once as an input parameter of a parallel call: x
2+
call-yield-invariant-errors.bpl(21,2): Error: linear variable cannot be an input parameter to both a yield invariant and a procedure in a parallel call: x
33
2 type checking errors detected in call-yield-invariant-errors.bpl

Test/civl/regression-tests/funky.bpl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// RUN: %parallel-boogie "%s" > "%t"
22
// RUN: %diff "%s.expect" "%t"
3-
type {:linear} X;
3+
4+
type X;
45
const nil: X;
56

67
var {:layer 0,3} A: X;

Test/civl/regression-tests/linear/allocator.bpl

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
// RUN: %parallel-boogie "%s" > "%t"
22
// RUN: %diff "%s.expect" "%t"
33

4-
5-
6-
7-
type {:linear "tid"} X = int;
8-
9-
procedure A({:linear_in "tid"} i': int) returns ({:linear "tid"} i: int);
4+
procedure A({:linear_in} i': int) returns ({:linear} i: int);
105
ensures i == i';
116

12-
procedure B({:linear_in "tid"} i': int) returns ({:linear "tid"} i: int)
7+
procedure B({:linear_in} i': int) returns ({:linear} i: int)
138
{
149
i := i';
1510
call i := A(i);
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
allocator.bpl(16,3): Error: this assertion could not be proved
1+
allocator.bpl(11,3): Error: this assertion could not be proved
22
Execution trace:
3-
allocator.bpl(14,5): anon0
3+
allocator.bpl(9,5): anon0
44

55
Boogie program verifier finished with 0 verified, 1 error

Test/civl/regression-tests/linear/bug.bpl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
// RUN: %parallel-boogie "%s" > "%t"
22
// RUN: %diff "%s.expect" "%t"
33

4-
type {:linear ""} X = int;
5-
6-
var {:linear ""} g:int;
4+
var {:linear} g:int;
75

86
procedure A()
97
{
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
bug.bpl(15,3): Error: this assertion could not be proved
1+
bug.bpl(13,3): Error: this assertion could not be proved
22
Execution trace:
3-
bug.bpl(14,3): anon0
3+
bug.bpl(12,3): anon0
44

55
Boogie program verifier finished with 1 verified, 1 error

Test/civl/regression-tests/linear/f1.bpl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// RUN: %parallel-boogie "%s" > "%t"
1+
// RUN: %parallel-boogie -lib:base "%s" > "%t"
22
// RUN: %diff "%s.expect" "%t"
3-
type {:linear "1"} X = int;
3+
44
const {:existential true} b0: bool;
55
const {:existential true} b1: bool;
66
const {:existential true} b2: bool;
@@ -21,11 +21,11 @@ axiom(!b6);
2121
axiom(!b7);
2222
axiom(b8);
2323

24-
procedure main({:linear_in "1"} x_in: [int]bool)
24+
procedure main({:linear_in} x_in: [int]bool)
2525
requires b0 ==> x_in == MapConst(true);
2626
requires b1 ==> x_in != MapConst(false);
2727
{
28-
var {:linear "1"} x: [int] bool;
28+
var {:linear} x: [int] bool;
2929
x := x_in;
3030

3131
call foo(x);
@@ -35,11 +35,11 @@ procedure main({:linear_in "1"} x_in: [int]bool)
3535
assert b8 ==> x == MapConst(false);
3636
}
3737

38-
procedure foo({:linear_in "1"} x_in: [int]bool)
38+
procedure foo({:linear_in} x_in: [int]bool)
3939
requires b2 ==> x_in == MapConst(true);
4040
requires b3 ==> x_in != MapConst(false);
4141
{
42-
var {:linear "1"} x: [int] bool;
42+
var {:linear} x: [int] bool;
4343
x := x_in;
4444

4545
assert b4 ==> x == MapConst(true);

Test/civl/regression-tests/linear/f2.bpl

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
1-
// RUN: %parallel-boogie "%s" > "%t"
1+
// RUN: %parallel-boogie -lib:base "%s" > "%t"
22
// RUN: %diff "%s.expect" "%t"
33

4-
5-
6-
7-
8-
9-
type {:linear "1"} X = int;
10-
11-
procedure Split({:linear_in "1"} xls: [int]bool) returns ({:linear "1"} xls1: [int]bool, {:linear "1"} xls2: [int]bool);
4+
procedure Split({:linear_in} xls: [int]bool) returns ({:linear} xls1: [int]bool, {:linear} xls2: [int]bool);
125
ensures xls == MapOr(xls1, xls2) && xls1 != MapConst(false) && xls2 != MapConst(false);
136

14-
procedure Allocate() returns ({:linear "1"} x: [int]bool);
7+
procedure Allocate() returns ({:linear} x: [int]bool);
158

169
procedure main()
1710
{
18-
var {:linear "1"} x: [int] bool;
19-
var {:linear "1"} x1: [int] bool;
20-
var {:linear "1"} x2: [int] bool;
11+
var {:linear} x: [int] bool;
12+
var {:linear} x1: [int] bool;
13+
var {:linear} x2: [int] bool;
2114

2215
call x := Allocate();
2316
assume x == MapConst(true);

0 commit comments

Comments
 (0)