You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> At present, the [`integer_ring`](./reference-prover-mode-integer-ring.md) prover mode may only
24
+
> be used in a [proof function declaration](./reference-proof-signature.md),
25
+
> not in an assert-by.
26
+
27
+
### Proof operation
28
+
29
+
**Solver modes.**
30
+
For `nonlinear_arith` and `bit_vector` modes,
31
+
Verus attempts to prove the given predicate via the specified solver
32
+
(the [`nonlinear_arith` solver](./reference-prover-mode-nonlinear.md)
33
+
or the [`bit_vector` solver](./reference-prover-mode-bit-vector.md)).
34
+
The predicate is proved in isolation, absent any surrounding context.
35
+
36
+
Specifically, for a statement
37
+
<code>assert ( Q ) by ( V@[assert_by_solver_mode] )</code>,
38
+
Verus tries to prove `Q` using the solver, and then assumes `Q` for the subsequent code.
39
+
40
+
If a `requires P` clause is additionally provides, then Verus:
41
+
42
+
* Proves `P` using the default solver (with full context available)
43
+
* Proves `P ==> Q` using the specified solver (in isolation)
44
+
* And finally assumes `Q` for subsequent code.
45
+
46
+
**Interpreter modes.**
47
+
For `compute` and `compute_only` modes, Verus uses its [specification interpreter](./reference-prover-mode-compute.md) to simplify the expression `Q` as much as possible, yielding an expression `Q'`.
48
+
49
+
* For `compute_only`, Verus will check that `Q'` is the boolean value `true`, and then assumes
50
+
the given predicate for all subsequent code.
51
+
* For `compute`, Verus will replace the assert-by statement with `assert(Q')`, which then behaves
52
+
like an ordinary [`assert`](./reference-assert.md).
<!-- TODO: Should decide whether or not the presence of an assume still gives guarantees about the subset of program executions where the assumption holds. -->
4
+
5
+
> [!CAUTION]
6
+
> Since the `assume` statement is unchecked, it can easily be used to subvert Verus's guarantees.
7
+
> In particular, successful "verification" by Verus provides **no guarantees** on the program
8
+
> if it includes any `assume` statements, unless those `assume` statements could in principle
9
+
> be replaced by a successful `assert` statement.
10
+
>
11
+
> The `assume` statement is most useful during _intermediate_ stages of development,
12
+
> e.g., within an [assert/assume-driven proof-development process](./assert_assume.md).
13
+
14
+
> [!TIP]
15
+
> The `--no-cheating` flag can be used to disallow `assume` statements.
0 commit comments