Contract syntax¶
Requires -fverify-contracts. Full table:
Syntax |
Placement |
Meaning |
|---|---|---|
|
After |
Precondition |
|
After |
Postcondition |
|
After |
Writable lvalues |
|
After |
Opt out of non-aliasing |
|
Spec functions |
Soft precondition |
|
After loop |
Loop invariant |
|
Loop / function |
Termination measure |
|
In struct/class |
Field invariant |
|
Statement |
Proof-only block |
|
Statement |
Proof obligation |
|
In |
Unfold recursive spec |
|
In |
Make spec |
|
Expression |
Bounded |
|
Expression |
Bounded |
|
In |
Pre-state value |
|
In |
Return value |
|
Decl |
Spec function |
|
Decl |
Proof function |