Skip to content

Commit

Permalink
Update docs/DafnyRef/UserGuide.md
Browse files Browse the repository at this point in the history
Co-authored-by: Robin Salkeld <[email protected]>
  • Loading branch information
keyboardDrummer and robin-aws authored Oct 24, 2024
1 parent d3613c5 commit 4cb5aa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/DafnyRef/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -1480,7 +1480,7 @@ The fundamental unit of verification in `dafny` is an _assertion batch_, which c

#### 13.7.3.1. Controlling assertion batches {#sec-assertion-batches-control}

When Dafny verifies a symbol, such as a method, a function or a constant with a subset type, that verification may contain multiple assertions. A symbol is generally verified the fastest when all assertions it in are verified together, in what we call a single 'assertion batch'. However, is it possible to split verification of a symbol into multiple batches, and doing so makes the individual batches simpler, which can lead to more predictable verification behavior. Dafny contains several attributes that allow you to customize how verification is split into batches.
When Dafny verifies a symbol, such as a method, a function or a constant with a subset type, that verification may contain multiple assertions. A symbol is generally verified the fastest when all assertions it in are verified together, in what we call a single 'assertion batch'. However, is it possible to split verification of a symbol into multiple batches, and doing so makes the individual batches simpler, which can lead to less brittle verification behavior. Dafny contains several attributes that allow you to customize how verification is split into batches.

Firstly, you can instruct Dafny to verify individual assertions in separate batches. You can place the `{:isolate}` attribute on a single assertion to place it in a separate batch, or you can place `{:isolate_assertions}` on the symbol to place all assertions in it into separate batches. The CLI option `--isolate-assertions` will place all assertions into separate batches for all symbols. `{:isolate}` can be used on `assert`, `return` and `continue` statements. When placed on a `return` statement, it will verify the postconditions for all paths leading to that `return` in a separate batch. When placed on a `continue`, it will verify the loop invariants for all paths leading to that `continue` in a separate batch.

Expand Down

0 comments on commit 4cb5aa3

Please sign in to comment.