Skip to content

Commit 4e41b06

Browse files
authored
snapshot v4 6 0 (#43)
- Removing old latest - Documentation snapshot for v4.6.0
1 parent 66a0f23 commit 4e41b06

File tree

409 files changed

+50811
-61
lines changed

Some content is hidden

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

409 files changed

+50811
-61
lines changed

Snapshots.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ layout: default
77

88
- [Current development version](https://dafny.org/dafny)
99
- [Latest release snapshot](https://dafny.org/latest)
10+
- [v4.6.0](https://dafny.org/v4.6.0)
1011
- [v4.5.0](https://dafny.org/v4.5.0)
1112
- [v4.4.0](https://dafny.org/v4.4.0)
1213
- [v4.3.0](https://dafny.org/v4.3.0)

latest/DafnyRef/Attributes.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ in which methods or functions are verified (default: N = 1).
398398
`{:resource_limit N}` limits the verifier resource usage to verify the method or function to `N`.
399399

400400
This is the per-method equivalent of the command-line flag `/rlimit:N` or `--resource-limit N`.
401-
If using [`{:vcs_split_on_every_assert}`](#sec-vcs_split_on_every_assert) as well, the limit will be set for each assertion.
401+
If using [`{:isolate_assertions}`](#sec-isolate_assertions) as well, the limit will be set for each assertion.
402402

403403
The attribute `{:rlimit N}` is also available, and limits the verifier resource usage to verify the method or function to `N * 1000`. This version is deprecated, however.
404404

@@ -422,10 +422,10 @@ To give orders of magnitude about resource usage, here is a list of examples ind
422422
}
423423
```
424424

425-
* 40K total resource usage using [`{:vcs_split_on_every_assert}`](#sec-vcs_split_on_every_assert)
425+
* 40K total resource usage using [`{:isolate_assertions}`](#sec-isolate_assertions)
426426
<!-- %check-verify -->
427427
```dafny
428-
method {:vcs_split_on_every_assert} f(a: bool, b: bool) {
428+
method {:isolate_assertions} f(a: bool, b: bool) {
429429
assert a: (a ==> b) <==> (!b ==> !a);
430430
assert b: (a ==> b) <==> (!b ==> !a);
431431
assert c: (a ==> b) <==> (!b ==> !a);
@@ -608,7 +608,7 @@ The [assertion batch](#sec-assertion-batches) of a method
608608
will not be split unless the cost of an [assertion batch](#sec-assertion-batches) exceeds this
609609
number, defaults to 2000.0. In
610610
[keep-going mode](#sec-vcs_max_keep_going_splits), only applies to the first round.
611-
If [`{:vcs_split_on_every_assert}`](#sec-vcs_split_on_every_assert) is set, then this parameter is useless.
611+
If [`{:isolate_assertions}`](#sec-isolate_assertions) is set, then this parameter is useless.
612612

613613
### 11.2.23. `{:vcs_max_keep_going_splits N}` {#sec-vcs_max_keep_going_splits}
614614

@@ -619,18 +619,18 @@ until we succeed proving them, or there is only one
619619
single assertion that it timeouts (in which
620620
case an error is reported for that assertion).
621621
Defaults to 1.
622-
If [`{:vcs_split_on_every_assert}`](#sec-vcs_split_on_every_assert) is set, then this parameter is useless.
622+
If [`{:isolate_assertions}`](#sec-isolate_assertions) is set, then this parameter is useless.
623623

624624
### 11.2.24. `{:vcs_max_splits N}` {#sec-vcs_max_splits}
625625

626626
Per-method version of the command-line option `/vcsMaxSplits`.
627627
Maximal number of [assertion batches](#sec-assertion-batches) generated for this method.
628628
In [keep-going mode](#sec-vcs_max_keep_going_splits), only applies to the first round.
629629
Defaults to 1.
630-
If [`{:vcs_split_on_every_assert}`](#sec-vcs_split_on_every_assert) is set, then this parameter is useless.
630+
If [`{:isolate_assertions}`](#sec-isolate_assertions) is set, then this parameter is useless.
631631

632-
### 11.2.25. `{:vcs_split_on_every_assert}` {#sec-vcs_split_on_every_assert}
633-
Per-method version of the command-line option `/vcsSplitOnEveryAssert`.
632+
### 11.2.25. `{:isolate_assertions}` {#sec-isolate_assertions}
633+
Per-method version of the command-line option<span id="sec-vcs_split_on_every_assert"></span> `/vcsSplitOnEveryAssert`
634634

635635
In the first and only verification round, this option will split the original [assertion batch](#sec-assertion-batches)
636636
into one assertion batch per assertion.

latest/DafnyRef/Expressions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1716,7 +1716,7 @@ e[ .. ]
17161716
A subsequence suffix applied to a sequence produces a new sequence whose
17171717
elements are taken from a contiguous part of the original sequence. For
17181718
example, expression `s[lo..hi]` for sequence `s`, and integer-based
1719-
numerics `lo` and `hi` satisfying `0 <= lo <= hi <= |s|`. See
1719+
numeric bounds `lo` and `hi` satisfying `0 <= lo <= hi <= |s|`. See
17201720
[the section about other sequence expressions](#sec-other-sequence-expressions) for details.
17211721

17221722
A subsequence suffix applied to an array produces a _sequence_ consisting of

latest/DafnyRef/Types.11.expect

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
text.dfy(11,25): Error: argument at index 1 ('d') might not be allocated in the two-state function's previous state
1+
text.dfy(11,25): Error: argument at index 1 for parameter 'd' could not be proved to be allocated in the two-state function's previous state -- if you add 'new' before the parameter declaration, like 'new d: Cell', arguments can refer to expressions possibly unallocated in the previous state
22

33
Dafny program verifier finished with 2 verified, 1 error

latest/DafnyRef/Types.12.expect

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
text.dfy(10,27): Error: argument at index 0 ('c') might not be allocated in the two-state function's previous state
1+
text.dfy(10,27): Error: argument at index 0 for parameter 'c' could not be proved to be allocated in the two-state function's previous state -- if you add 'new' before the parameter declaration, like 'new c: Cell', arguments can refer to expressions possibly unallocated in the previous state
22

33
Dafny program verifier finished with 2 verified, 1 error

latest/DafnyRef/Types.20.expect

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
text.dfy(26,0): Error: a postcondition could not be proved on this return path
22
text.dfy(25,10): Related location: this is the postcondition that could not be proved
3-
text.dfy(10,9): Related location
3+
text.dfy(10,9): Related location: this proposition could not be proved
44

55
Dafny program verifier finished with 1 verified, 1 error

latest/DafnyRef/Types.26.expect

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
text.dfy(3,9): Error: type parameter (T) passed to type A must support nonempty (got Q) (perhaps try declaring abstract type 'Q' on line 2 as 'Q(00)', which says it can only be instantiated with a nonempty type)
1+
text.dfy(3,9): Error: type parameter (T) passed to type A must be nonempty (got Q) (perhaps try declaring abstract type 'Q' on line 2 as 'Q(00)', which says it can only be instantiated with a nonempty type)
22
1 resolution/type errors detected in text.dfy

latest/DafnyRef/Types.9.expect

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
text.dfy(10,10): Error: type parameter (T) passed to type ResultN must support no references (got C)
2-
text.dfy(12,10): Error: type parameter (T) passed to type ResultN must support no references (got array<int>)
1+
text.dfy(10,10): Error: type parameter (T) passed to type ResultN must contain no references (got C)
2+
text.dfy(12,10): Error: type parameter (T) passed to type ResultN must contain no references (got array<int>)
33
2 resolution/type errors detected in text.dfy

latest/DafnyRef/Types.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,9 +1085,10 @@ same name.
10851085

10861086
#### 5.5.3.4. Other Sequence Expressions {#sec-other-sequence-expressions}
10871087
In addition, for any sequence `s` of type `seq<T>`, expression `e`
1088-
of type `T`, integer-based numeric `i` satisfying `0 <= i < |s|`, and
1089-
integer-based numerics `lo` and `hi` satisfying
1090-
`0 <= lo <= hi <= |s|`, sequences support the following operations:
1088+
of type `T`, integer-based numeric index `i` satisfying `0 <= i < |s|`, and
1089+
integer-based numeric bounds `lo` and `hi` satisfying
1090+
`0 <= lo <= hi <= |s|`, noting that bounds can equal the length of the sequence,
1091+
sequences support the following operations:
10911092

10921093
expression | precedence | result type | description
10931094
-------------------|:---:|:---:|----------------------------------------
@@ -1859,7 +1860,7 @@ the newtype operations are defined only if the result satisfies the
18591860
predicate `Q`, and likewise for the literals of the
18601861
newtype.
18611862

1862-
For example, suppose `lo` and `hi` are integer-based numerics that
1863+
For example, suppose `lo` and `hi` are integer-based numeric bounds that
18631864
satisfy `0 <= lo <= hi` and consider the following code fragment:
18641865
<!-- %no-check -->
18651866
```dafny
@@ -2408,8 +2409,9 @@ an error message is generated.
24082409

24092410
One-dimensional arrays support operations that convert a stretch of
24102411
consecutive elements into a sequence. For any array `a` of type
2411-
`array<T>`, integer-based numerics `lo` and `hi` satisfying
2412-
`0 <= lo <= hi <= a.Length`, the following operations each yields a
2412+
`array<T>`, integer-based numeric bounds `lo` and `hi` satisfying
2413+
`0 <= lo <= hi <= a.Length`, noting that bounds can equal the array's length,
2414+
the following operations each yields a
24132415
`seq<T>`:
24142416

24152417
expression | description

latest/DafnyRef/UserGuide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,7 +1434,7 @@ The fundamental unit of verification in `dafny` is an _assertion batch_, which c
14341434
* If the verifier says it is correct,[^smt-encoding] it means that all the assertions hold.
14351435
* If the verifier returns a counterexample, this counterexample is used to determine both the failing assertion and the failing path.
14361436
In order to retrieve additional failing assertions, `dafny` will again query the verifier after turning previously failed assertions into assumptions.[^example-assertion-turned-into-assumption] [^caveat-about-assertion-and-assumption]
1437-
* If the verifier returns `unknown` or times out, or even preemptively for difficult assertions or to reduce the chance that the verifier will ‘be confused’ by the many assertions in a large batch, `dafny` may partition the assertions into smaller batches[^smaller-batches]. An extreme case is the use of the `/vcsSplitOnEveryAssert` command-line option or the [`{:vcs_split_on_every_assert}` attribute](#sec-vcs_split_on_every_assert), which causes `dafny` to make one batch for each assertion.
1437+
* If the verifier returns `unknown` or times out, or even preemptively for difficult assertions or to reduce the chance that the verifier will ‘be confused’ by the many assertions in a large batch, `dafny` may partition the assertions into smaller batches[^smaller-batches]. An extreme case is the use of the `/vcsSplitOnEveryAssert` command-line option or the [`{:isolate_assertions}` attribute](#sec-isolate_assertions), which causes `dafny` to make one batch for each assertion.
14381438

14391439
[^smt-encoding]: The formula sent to the underlying SMT solver is the negation of the formula that the verifier wants to prove - also called a VC or verification condition. Hence, if the SMT solver returns "unsat", it means that the SMT formula is always false, meaning the verifier's formula is always true. On the other side, if the SMT solver returns "sat", it means that the SMT formula can be made true with a special variable assignment, which means that the verifier's formula is false under that same variable assignment, meaning it's a counter-example for the verifier. In practice and because of quantifiers, the SMT solver will usually return "unknown" instead of "sat", but will still provide a variable assignment that it couldn't prove that it does not make the formula true. `dafny` reports it as a "counter-example" but it might not be a real counter-example, only provide hints about what `dafny` knows.
14401440

@@ -1450,7 +1450,7 @@ Here is how you can control how `dafny` partitions assertions into batches.
14501450

14511451
* [`{:focus}`](#sec-focus) on an assert generates a separate assertion batch for the assertions of the enclosing block.
14521452
* [`{:split_here}`](#sec-split_here) on an assert generates a separate assertion batch for assertions after this point.
1453-
* [`{:vcs_split_on_every_assert}`](#sec-vcs_split_on_every_assert) on a function or a method generates one assertion batch per assertion
1453+
* [`{:isolate_assertions}`](#sec-isolate_assertions) on a function or a method generates one assertion batch per assertion
14541454

14551455
We discourage the use of the following _heuristics attributes_ to partition assertions into batches.
14561456
The effect of these attributes may vary, because they are low-level attributes and tune low-level heuristics, and will result in splits that could be manually controlled anyway.
@@ -2679,7 +2679,7 @@ Legacy options:
26792679

26802680
* `-vcsSplitOnEveryAssert` - prove each (explicit or implicit) assertion
26812681
in each procedure separately. See also the attribute
2682-
[`{:vcs_split_on_every_assert}`](#sec-vcs_split_on_every_assert) for
2682+
[`{:isolate_assertions}`](#sec-isolate_assertions) for
26832683
restricting this option on specific procedures. By default, Boogie
26842684
attempts to prove that every assertion in a given procedure holds all
26852685
at once, in a single query to an SMT solver. This usually performs

0 commit comments

Comments
 (0)