Proving that your Java code does what its spec says
The code meets a written specification of its results, for example “returns the sorted list” or “implements this RFC”.
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.
-
Write JML specifications for sequential Java code; KeY's prover, mostly automatic with interactive steps when needed, proves the code meets them.
Supported.Functional specifications in JML (method contracts, class invariants, loop invariants).
Source Supported — Functional specifications in JML (method contracts, class invariants, loop invariants).- Effort
- Interactive
- Covers
- 7 of 14 Java features
- Relies on
- KeY's own rule-based prover decides; its large rule base is trusted, not a small kernel. Default integer rules ignore overflow, which KeY itself marks unsound; Java mode exists.
Stage 1 · Usable 0/5 strong
No option matches this effort level.
Or write new verified code that compiles to Java
You write the code in a verification language; its compiler produces the Java code.
- Dafny Stage 1 · Usable write in Dafny, then Dafny compiler (Java backend) (trusted)
Ask something else about Java
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..