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
docs: clarify check-rust vs Verus on COMPARE page (#1455)
## Summary
- Update [docs/COMPARE.md](docs/COMPARE.md) so Verus comparison matches
product reality: Assura supports **inline** `/// @requires` / `@ensures`
via `assura check-rust`, not only `.assura` files.
- Keep the honest split: Verus is still preferred for deep borrow-aware
proofs of existing Rust; Assura `check-rust` has a partial body model
and fails closed with `body_not_modeled`.
## Why
Launch messaging said "not Verus-in-place" so strongly that it sounded
like Assura cannot annotate existing Rust at all. That is wrong and
confuses HN/Reddit answers.
## Test plan
- [x] Read COMPARE.md for accuracy against README `check-rust` and
CONTRIBUTING body-proof section
- [ ] Docs site rebuild (mdBook) on merge / CI
Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
|**Primary surface**|Dedicated `.assura` contracts| Dafny language |Annotations on Rust | Liquid types / refinements on Haskell | Tests in host language |
14
+
|**Primary surface**|`.assura` contracts; optional `/// @requires` / `@ensures` on Rust via `check-rust`| Dafny language |Specs and proofs as annotations on Rust | Liquid types / refinements on Haskell | Tests in host language |
15
15
|**Implementation author**| Often AI (IR / auto-implement / check-rust) | Human (or AI as ordinary code) | Human-written Rust | Human-written Haskell | Human or AI |
|**AI agent loop**| First-class (MCP, check-rust, auto-implement) | Possible but not the product shape | Possible | Possible | Common, no proof |
19
-
|**What "success" means**| No counterexample for modeled clauses; layers 0–2 | Verified method / module | Verified function | Type-checked refinements | Tests green |
19
+
|**What "success" means**| No counterexample for modeled clauses; layers 0–2; unmodeled Rust bodies are `body_not_modeled`, not silent success | Verified method / module | Verified function under Verus's Rust model | Type-checked refinements | Tests green |
20
+
21
+
## Assura on existing Rust vs Verus
22
+
23
+
Assura can annotate **existing Rust** without a separate `.assura` file per
24
+
function: put contracts in doc comments and run `assura check-rust`
25
+
(human or LLM can add the annotations). Example shape:
26
+
27
+
```rust
28
+
/// @requires x >= 0
29
+
/// @ensures result >= 0
30
+
pubfnabs_i64(x:i64) ->i64 { /* ... */ }
31
+
```
32
+
33
+
That is real, but it is **not** the same product as Verus:
34
+
35
+
|| Assura `check-rust`| Verus |
36
+
|--|---------------------|-------|
37
+
|**How you attach specs**|`/// @requires` / `@ensures` (and related) on Rust items | Verus attributes / proof blocks in Rust |
38
+
|**What is modeled**| Growing but intentional subset of bodies (arith, control flow, wrapping/bitops, …) or a co-located `.ir` sidecar | Deep model of Rust (including ownership/borrow patterns Verus supports) |
39
+
|**Unmodeled code**| Reports `body_not_modeled` (not treated as verified) | Outside Verus's supported surface, or unfinished proof, as Verus defines |
40
+
|**Primary story**| Contracts first; AI loop; also annotate-and-check | Prove the Rust you keep writing in place |
41
+
42
+
**Prefer Verus** when the goal is fine-grained, borrow-aware proofs of
43
+
**existing Rust crates** as the long-term source of truth.
44
+
45
+
**Prefer Assura** when you want a separate contract language and/or an
46
+
agent-friendly check loop, including optional inline annotations on Rust
47
+
with honest body modeling limits (see [What we prove](WHAT-WE-PROVE.md)
48
+
and CONTRIBUTING "check-rust body proof").
20
49
21
50
## When Assura is a better fit
22
51
23
52
- You want **specs separate from host-language syntax** so agents and humans
24
-
share a stable contract surface.
53
+
share a stable contract surface (`.assura`), or light `/// @…` contracts
54
+
on Rust via `check-rust`.
25
55
- You care about an **AI write → SMT check → fix** loop with structured
26
-
results (counterexample vs unknown vs verified).
27
-
- You want **Rust as the ship format** without requiring the implementation
28
-
to be authored as verified Rust-in-place first.
56
+
results (counterexample vs unknown vs verified vs body_not_modeled).
57
+
- You want **Rust as the ship format** without requiring Verus-style
58
+
verified Rust-in-place as the only workflow.
29
59
30
60
## When another tool is a better fit
31
61
32
62
| Need | Prefer |
33
63
|------|--------|
34
-
|Verify**existing Rust**in place with fine-grained borrow-aware proofs|[Verus](https://github.com/verus-lang/verus)|
64
+
|Deep**borrow-aware**proofs of existing Rust as the main workflow|[Verus](https://github.com/verus-lang/verus)|
35
65
| Mature multi-target verified language with large libraries |[Dafny](https://dafny.org/)|
0 commit comments