Proving that your Java code behaves like another version
Two programs (an optimized and a reference version, or code before and after a change) are proved to behave the same, or one refines the other.
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.
Partial.No dedicated equivalence mode; you specify the relation between two versions by hand. Partial — No dedicated equivalence mode; you specify the relation between two versions by hand.
- 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
- Everything
- No undefined behavior
- Functional correctness
- Information flow
- Concurrency
- Termination and liveness
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..