Interactive theorem prover for deductive verification of Java programs against JML specifications.
At a Glance
About KeY
KeY is a formal software development tool from The KeY Project, a joint effort of Karlsruhe Institute of Technology, Chalmers University of Technology and TU Darmstadt. It verifies the functional correctness of Java programs against specifications written in the Java Modeling Language (JML). It ships as a standalone GUI application and can also be used as a library. The latest release listed is KeY 3.0.0.
What It Is
KeY is an interactive theorem prover for formal verification and analysis of Java programs. At its core is a theorem prover for first-order Dynamic Logic for Java with a graphical interface. The project began in 1998 at the University of Karlsruhe and aims to integrate design, implementation, specification and verification of object-oriented software.
How the Workflow Works
Users annotate Java code with JML specifications, and KeY helps prove that the program conforms to them. The project says this establishes correctness for all possible inputs, not just a set of test values. Optional SMT solvers (Z3, cvc5, CVC4, Princess) can be used alongside the prover. KeY can also act as a library for symbolic program execution, first-order reasoning and test case generation. A Symbolic Execution Debugger integrates with the Eclipse IDE and visualizes the program's execution as a graph.
Update: KeY 3.0
The project announced KeY 3.0 in July 2026. It moves from Recoder to JavaParser, which opens the way to modern Java; records and text block literals are already supported. Other additions include polymorphic sorts and functions in the logic, a modularized internal structure for building verifiers for other languages (such as the Rust and Solidity variants RustyKeY and KeYther), and proof scripts written in JML directly in source files.
Teaching, Research and Setup
The project highlights use in university courses and research projects, and publishes a book and teaching material. KeY requires Java 17 or newer and at least 2 GB RAM, and runs on Linux/Unix, macOS and Windows. It is built with Gradle, and the source is released under GPL v2 or later.
Collections
Popular collections
- Obsidian Agentic & AI plugins
Collection by @samofcode
- Codebase Context Generators
Collection by @joemseifi
- Frameworks
Collection by @joemseifi
- Let Your Agents Talk to Each Other
Collection by @leftchannel
Add KeY to one of your collections.
Community Discussions
Be the first to start a conversation about KeY
Share your experience with KeY, ask questions, or help others learn from your insights.
Pricing
KeY (open source)
Self-hosted KeY Prover licensed under GNU GPL v2 or later; free to download and use.
- Licensed under GPL v2 or later
- Standalone GUI application for verifying Java programs against JML specifications
- Usable as a library for symbolic execution, first-order reasoning, test case generation
- Optional external SMT solvers (Z3, cvc5, CVC4, Princess)
Capabilities
Key Features
- Deductive verification of Java programs against JML specifications
- Interactive theorem prover for first-order Dynamic Logic for Java
- Standalone GUI application
- Usable as a library for symbolic execution, first-order reasoning and test case generation
- Symbolic Execution Debugger with Eclipse integration
- Optional SMT solver support (Z3, cvc5, CVC4, Princess)
- Proof scripts written in JML in source files
- Modular structure for verifiers targeting other languages
- Teaching material and The KeY Book
