Skip to content

Commit 39408ac

Browse files
authored
Merge branch 'master' into lean-auto-classical
2 parents 180f528 + 3894f73 commit 39408ac

File tree

218 files changed

+5953
-6900
lines changed

Some content is hidden

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

218 files changed

+5953
-6900
lines changed

.github/workflows/test-lean-auto.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Setup dotnet
1818
uses: actions/setup-dotnet@v3
1919
with:
20-
dotnet-version: '6.0.x'
20+
dotnet-version: '8.0.x'
2121
- name: Setup Z3
2222
uses: cda-tum/setup-z3@v1
2323
with:

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ jobs:
2424
lit_param: ["batch_mode=True", "batch_mode=False"]
2525
steps:
2626
- name: Setup dotnet
27-
uses: actions/setup-dotnet@v3
27+
uses: actions/setup-dotnet@v4
2828
with:
29-
dotnet-version: '6.0.x'
29+
dotnet-version: '8.0.x'
3030
- name: Checkout Boogie
3131
uses: actions/checkout@v3
3232
with:

README.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,19 @@ input, optionally infers some invariants in the given Boogie program, and then
2020
generates verification conditions that are passed to an SMT solver. The default
2121
SMT solver is [Z3](https://github.com/Z3Prover/z3).
2222

23+
A tutorial for Boogie is available [here](https://www.microsoft.com/en-us/research/wp-content/uploads/2016/12/krml178.pdf).
24+
The documentation in this tutorial, although slightly out-of-date, captures the essence of the Boogie language and tool.
25+
2326
Boogie has long been used for modeling and verifying sequential programs.
2427
Recently, through its [Civl](https://civl-verifier.github.io/) extension, Boogie
2528
has become capable of modeling concurrent and distributed systems.
2629

27-
## Documentation
28-
29-
Here are some resources to learn more about Boogie. Be aware that some
30-
information might be incomplete or outdated.
31-
32-
* [Documentation](https://boogie-docs.readthedocs.org/en/latest/)
33-
* [Language reference](https://boogie-docs.readthedocs.org/en/latest/LangRef.html).
34-
35-
## Getting help and contribute
30+
## Getting help
3631

3732
You can ask questions and report issues on our [issue tracker](https://github.com/boogie-org/boogie/issues).
3833

34+
## Contribute
35+
3936
We are happy to receive contributions via [pull requests](https://github.com/boogie-org/boogie/pulls).
4037

4138
## Dependencies

Source/AbstractInterpretation/Traverse.cs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,44 +18,44 @@ public class WidenPoints
1818
public static void Compute(Program program)
1919
{
2020
Contract.Requires(program != null);
21-
cce.BeginExpose(program);
21+
Cce.BeginExpose(program);
2222

2323
foreach (var impl in program.Implementations)
2424
{
2525
if (impl.Blocks != null && impl.Blocks.Count > 0)
2626
{
27-
Contract.Assume(cce.IsConsistent(impl));
28-
cce.BeginExpose(impl);
27+
Contract.Assume(Cce.IsConsistent(impl));
28+
Cce.BeginExpose(impl);
2929
Block start = impl.Blocks[0];
3030
Contract.Assume(start != null);
31-
Contract.Assume(cce.IsConsistent(start));
31+
Contract.Assume(Cce.IsConsistent(start));
3232
Visit(start);
3333

3434
// We reset the state...
3535
foreach (Block b in impl.Blocks)
3636
{
37-
cce.BeginExpose(b);
37+
Cce.BeginExpose(b);
3838
b.TraversingStatus = Block.VisitState.ToVisit;
39-
cce.EndExpose();
39+
Cce.EndExpose();
4040
}
4141

42-
cce.EndExpose();
42+
Cce.EndExpose();
4343
}
4444
}
4545

46-
cce.EndExpose();
46+
Cce.EndExpose();
4747
}
4848

4949
static void Visit(Block b)
5050
{
5151
Contract.Requires(b != null);
52-
Contract.Assume(cce.IsExposable(b));
52+
Contract.Assume(Cce.IsExposable(b));
5353
if (b.TraversingStatus == Block.VisitState.BeingVisited)
5454
{
55-
cce.BeginExpose(b);
55+
Cce.BeginExpose(b);
5656
// we got here through a back-edge
5757
b.WidenBlock = true;
58-
cce.EndExpose();
58+
Cce.EndExpose();
5959
}
6060
else if (b.TraversingStatus == Block.VisitState.AlreadyVisited)
6161
{
@@ -66,15 +66,15 @@ static void Visit(Block b)
6666
Contract.Assert(b.TraversingStatus == Block.VisitState.ToVisit);
6767

6868
GotoCmd g = (GotoCmd) b.TransferCmd;
69-
cce.BeginExpose(b);
69+
Cce.BeginExpose(b);
7070

71-
cce.BeginExpose(g); //PM: required for the subsequent expose (g.labelTargets)
71+
Cce.BeginExpose(g); //PM: required for the subsequent expose (g.labelTargets)
7272
b.TraversingStatus = Block.VisitState.BeingVisited;
7373

7474
// labelTargets is made non-null by Resolve, which we assume
7575
// has already called in a prior pass.
7676
Contract.Assume(g.LabelTargets != null);
77-
cce.BeginExpose(g.LabelTargets);
77+
Cce.BeginExpose(g.LabelTargets);
7878
foreach (Block succ in g.LabelTargets)
7979
// invariant b.currentlyTraversed;
8080
//PM: The following loop invariant will work once properties are axiomatized
@@ -84,7 +84,7 @@ static void Visit(Block b)
8484
Visit(succ);
8585
}
8686

87-
cce.EndExpose();
87+
Cce.EndExpose();
8888

8989
Contract.Assert(b.TraversingStatus == Block.VisitState.BeingVisited);
9090
// System.Diagnostics.Debug.Assert(b.currentlyTraversed);
@@ -94,7 +94,7 @@ static void Visit(Block b)
9494
//PM: The folowing assumption is needed because we cannot prove that a simple field update
9595
//PM: leaves the value of a property unchanged.
9696
Contract.Assume(g.LabelNames == null || g.LabelNames.Count == g.LabelTargets.Count);
97-
cce.EndExpose();
97+
Cce.EndExpose();
9898
}
9999
else
100100
{
@@ -113,13 +113,13 @@ public static List<Block> ComputeLoopBodyFrom(Block block)
113113
{
114114
Contract.Requires(block.WidenBlock);
115115
Contract.Requires(block != null);
116-
Contract.Ensures(cce.NonNullElements(Contract.Result<List<Block>>()));
116+
Contract.Ensures(Cce.NonNullElements(Contract.Result<List<Block>>()));
117117

118118
Contract.Assert(rootBlock == null);
119119
rootBlock = block;
120120

121-
List<Block /*!*/> blocksInLoop = new List<Block /*!*/>(); // We use a list just because .net does not define a set
122-
List<Block /*!*/> visitingPath = new List<Block /*!*/>(); // The order is important, as we want paths
121+
List<Block> blocksInLoop = new List<Block>(); // We use a list just because .net does not define a set
122+
List<Block> visitingPath = new List<Block>(); // The order is important, as we want paths
123123

124124
blocksInLoop.Add(block);
125125

@@ -141,8 +141,8 @@ public static List<Block> ComputeLoopBodyFrom(Block block)
141141
private static void DoDFSVisit(Block block, List<Block> path, List<Block> blocksInPath)
142142
{
143143
Contract.Requires(block != null);
144-
Contract.Requires(cce.NonNullElements(path));
145-
Contract.Requires(cce.NonNullElements(path));
144+
Contract.Requires(Cce.NonNullElements(path));
145+
Contract.Requires(Cce.NonNullElements(path));
146146

147147
#region case 1. We visit the root => We are done, "path" is a path inside the loop
148148

Source/BaseTypes/BigDec.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public override int GetHashCode()
153153
}
154154

155155
[Pure]
156-
public override string /*!*/ ToString()
156+
public override string ToString()
157157
{
158158
Contract.Ensures(Contract.Result<string>() != null);
159159
return String.Format("{0}e{1}", this.mantissa.ToString(), this.exponent.ToString());

Source/BaseTypes/BigFloat.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public override int GetHashCode()
213213
}
214214

215215
[Pure]
216-
public override string /*!*/ ToString()
216+
public override string ToString()
217217
{
218218
Contract.Ensures(Contract.Result<string>() != null);
219219
if (value == "")

Source/BaseTypes/BigNum.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ public override int GetHashCode()
145145
}
146146

147147
[Pure]
148-
public override string /*!*/ ToString()
148+
public override string ToString()
149149
{
150150
Contract.Ensures(Contract.Result<string>() != null);
151-
return cce.NonNull(val.ToString());
151+
return Cce.NonNull(val.ToString());
152152
}
153153

154154
//////////////////////////////////////////////////////////////////////////////
@@ -158,7 +158,7 @@ public override int GetHashCode()
158158
// int32.ToString(format) does)
159159

160160
[Pure]
161-
public string /*!*/ ToString(string /*!*/ format)
161+
public string ToString(string format)
162162
{
163163
Contract.Requires(format != null);
164164
Contract.Ensures(Contract.Result<string>() != null);
@@ -185,7 +185,7 @@ public override int GetHashCode()
185185
private static readonly System.Numerics.BigInteger BI_2_TO_24 = new BIM(0x1000000);
186186

187187
[Pure]
188-
private string /*!*/ toHex(string /*!*/ format)
188+
private string toHex(string format)
189189
{
190190
Contract.Requires(format != null);
191191
Contract.Ensures(Contract.Result<string>() != null);
@@ -202,7 +202,7 @@ public override int GetHashCode()
202202
}
203203

204204
[Pure]
205-
private int extractPrecision(string /*!*/ format)
205+
private int extractPrecision(string format)
206206
{
207207
Contract.Requires(format != null);
208208
if (format.Length > 1)
@@ -216,7 +216,7 @@ private int extractPrecision(string /*!*/ format)
216216
}
217217

218218
[Pure]
219-
private string /*!*/ addMinus(int signum, string /*!*/ suffix)
219+
private string addMinus(int signum, string suffix)
220220
{
221221
Contract.Requires(suffix != null);
222222
Contract.Ensures(Contract.Result<string>() != null);
@@ -229,7 +229,7 @@ private int extractPrecision(string /*!*/ format)
229229
}
230230

231231
[Pure]
232-
private string /*!*/ prefixWithZeros(int minLength, string /*!*/ suffix)
232+
private string prefixWithZeros(int minLength, string suffix)
233233
{
234234
Contract.Requires(suffix != null);
235235
Contract.Ensures(Contract.Result<string>() != null);

Source/BaseTypes/Rational.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public BigNum Denominator
129129
get { return denominator == BigNum.ZERO ? BigNum.ONE : denominator; }
130130
}
131131

132-
public override string /*!*/ ToString()
132+
public override string ToString()
133133
{
134134
Contract.Ensures(Contract.Result<string>() != null);
135135
return String.Format("{0}/{1}", Numerator, Denominator);

Source/BaseTypes/RoundingMode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public override int GetHashCode()
6767
}
6868

6969
[Pure]
70-
public override string /*!*/ ToString()
70+
public override string ToString()
7171
{
7272
Contract.Ensures(Contract.Result<string>() != null);
7373
return val;

Source/BaseTypes/Set.cs

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public GSet()
3030
//:base();
3131
}
3232

33-
private GSet(Dictionary<T, int> /*!*/ ht, List<T> arr)
33+
private GSet(Dictionary<T, int> ht, List<T> arr)
3434
{
3535
Contract.Requires(ht != null);
3636
Contract.Requires(arr != null);
@@ -47,7 +47,7 @@ public GSet(int capacity)
4747
}
4848

4949

50-
public readonly static GSet<T> /*!*/
50+
public readonly static GSet<T>
5151
Empty = new GSet<T>();
5252

5353
public void Clear()
@@ -146,7 +146,7 @@ public T Take()
146146
return r;
147147
}
148148

149-
public void Intersect(GSet<T> /*!*/ s)
149+
public void Intersect(GSet<T> s)
150150
{
151151
Contract.Requires(s != null);
152152
if (s == this)
@@ -222,7 +222,7 @@ public bool ContainsRange(IEnumerable<T> s)
222222
return true;
223223
}
224224

225-
public object /*!*/ Clone()
225+
public object Clone()
226226
{
227227
Contract.Ensures(Contract.Result<object>() != null);
228228
return new GSet<T>(new Dictionary<T, int>(ht), new List<T>(arr));
@@ -234,11 +234,11 @@ public virtual int Count
234234
}
235235

236236
[Pure]
237-
public override string /*!*/ ToString()
237+
public override string ToString()
238238
{
239239
Contract.Ensures(Contract.Result<string>() != null);
240240
string s = null;
241-
foreach (object /*!*/ key in ht.Keys)
241+
foreach (object key in ht.Keys)
242242
{
243243
Contract.Assert(key != null);
244244
if (s == null)
@@ -266,34 +266,33 @@ public virtual int Count
266266
//----------------------------- Static Methods ---------------------------------
267267

268268
// Functional Intersect
269-
public static GSet<T> /*!*/ Intersect(GSet<T> /*!*/ a, GSet<T> /*!*/ b)
269+
public static GSet<T> Intersect(GSet<T> a, GSet<T> b)
270270
{
271271
Contract.Requires(b != null);
272272
Contract.Requires(a != null);
273273
Contract.Ensures(Contract.Result<GSet<T>>() != null);
274-
//Contract.Ensures(Contract.ForAll(result, x => a[x] && b[x] ));
275-
GSet<T> /*!*/
276-
res = (GSet<T> /*!*/) cce.NonNull(a.Clone());
274+
GSet<T>
275+
res = (GSet<T>) Cce.NonNull(a.Clone());
277276
res.Intersect(b);
278277
return res;
279278
}
280279

281280
// Functional Union
282-
public static GSet<T> /*!*/ Union(GSet<T> /*!*/ a, GSet<T> /*!*/ b)
281+
public static GSet<T> Union(GSet<T> a, GSet<T> b)
283282
{
284283
Contract.Requires(a != null);
285284
Contract.Requires(b != null);
286285
Contract.Ensures(Contract.Result<GSet<T>>() != null);
287286
// Contract.Ensures(Contract.ForAll(result, x => a[x] || b[x] ));
288-
GSet<T> /*!*/
289-
res = (GSet<T> /*!*/) cce.NonNull(a.Clone());
287+
GSet<T>
288+
res = (GSet<T>) Cce.NonNull(a.Clone());
290289
res.AddRange(b);
291290
return res;
292291
}
293292

294-
public delegate bool SetFilter(object /*!*/ obj);
293+
public delegate bool SetFilter(object obj);
295294

296-
public static GSet<T> /*!*/ Filter(GSet<T> /*!*/ a, Func<T, bool> filter)
295+
public static GSet<T> Filter(GSet<T> a, Func<T, bool> filter)
297296
{
298297
Contract.Requires(filter != null);
299298
Contract.Requires(a != null);

0 commit comments

Comments
 (0)