Proving that your Go code always terminates or progresses
Every run finishes, or the system keeps making progress (liveness).
Change the question
Ranked by: support for this property, stage, coverage of the features you pick, and trust. Tools that work on compiled code rank lower. Ranking as JSON.
-
Add specifications as comments to Go code; Gobra translates it to the Viper verifier, which proves memory safety, race freedom and your contracts.
Supported.Termination is proved with decreases clauses. It is required for pure and ghost functions and optional for other code.
Source Supported — Termination is proved with decreases clauses. It is required for pure and ghost functions and optional for other code.- Effort
- Auto-active
- Covers
- 9 of 14 Go features
- Relies on
- Viper's symbolic execution engine and the Z3 SMT solver decide; no proof certificates. Go model built into Gobra; ignores integer overflow unless --overflow is set.
Stage 1 · Usable 0/5 strong - s2n-bignum on compiled code: x86-64
Prove hand-written x86-64 or Arm64 assembly correct in HOL Light, on the exact bytes of the built object file; used for AWS's cryptography code.
Supported.Specifications state that execution eventually reaches the postcondition (total correctness).
Source Supported — Specifications state that execution eventually reaches the postcondition (total correctness).- Effort
- Interactive
- Covers
- 0 of 0 common features
- Relies on
- Hand-written instruction models; random co-simulation against real CPUs in CI.
Stage 1 · Usable 4/5 strong - LNSym on compiled code: AArch64
Prove Armv8 (AArch64) machine code correct in Lean 4 by symbolic simulation over a hand-written model; aimed at AWS-LC cryptographic routines.
Unknown
- Effort
- Interactive
- Covers
- 0 of 0 common features
- Relies on
- Hand-written AArch64 subset; random co-simulation against real Arm CPUs in CI. Opcodes are pasted from objdump into Lean; not linked to the binary by a proof.
Stage 0 · Research 2/5 strong
No option matches this effort level.
Or write new verified code that compiles to Go
You write the code in a verification language; its compiler produces the Go code.
- Dafny Stage 1 · Usable write in Dafny, then Dafny compiler (Go backend) (trusted)
Verify Go, but not this property
- Islaris — The adequacy theorem gives a safety property; it does not show that the code finishes.
Ask something else about Go
New to this? Start with the glossary: auto-activeAuto-active verification. You write specifications and hints in the code; an automatic solver does the proving., interactiveInteractive theorem prover. A proof assistant where you write proofs step by step and the system checks each step., trusted computing baseTrusted computing base (TCB). Everything that must be correct for a proof to mean what it says..