{
  "id": "key",
  "name": "KeY",
  "aka": [
    "KeY Prover"
  ],
  "summary": "Write JML specifications for sequential Java code; KeY's prover, mostly automatic with interactive steps when needed, proves the code meets them.",
  "use_if": [
    "You want to prove functional correctness of sequential Java classes, such as library algorithms and data structures.",
    "You want to see and steer the proof step by step when automation gets stuck.",
    "You need information-flow (non-interference) proofs for Java code."
  ],
  "avoid_if": [
    "Your code uses generics, threads, switch expressions or many library classes; these are not supported.",
    "You forget to change the default integer setting; by default KeY ignores integer overflow, which KeY itself marks as unsound.",
    "You need the proof checked by a small, independent proof kernel."
  ],
  "effort": "interactive",
  "open": "open-source",
  "license": "GPL-2.0-or-later",
  "maintainers": [
    "Karlsruhe Institute of Technology",
    "Technical University of Darmstadt",
    "Chalmers University of Technology"
  ],
  "links": {
    "homepage": "https://www.key-project.org/",
    "repo": "https://github.com/KeYProject/key",
    "docs": "https://keyproject.github.io/key-docs/",
    "paper": "https://doi.org/10.1007/978-3-319-49812-6",
    "tutorial": "https://keyproject.github.io/key-docs/user/getting-started/"
  },
  "components": [
    {
      "role": "frontend",
      "name": "KeY's Java parser (based on JavaParser since KeY 3.0) and JML parser",
      "assurance": "trusted",
      "note": "A separate front end from javac; KeY 3.0 replaced the older Recoder parser."
    },
    {
      "role": "translation",
      "name": "JML to Java dynamic logic proof obligations",
      "assurance": "trusted"
    },
    {
      "role": "checker",
      "name": "KeY prover (sequent calculus with symbolic execution, defined by taclet rules)",
      "assurance": "trusted",
      "note": "The rule base is large and trusted. Some rules have saved soundness proofs that KeY's test suite replays (ProveRules)."
    },
    {
      "role": "checker",
      "name": "SMT solvers (Z3, cvc5, CVC4, Princess), optional",
      "ref": "z3",
      "ref_kind": "prover",
      "assurance": "trusted",
      "note": "Optional; when used to close a goal, the solver's answer is trusted."
    },
    {
      "role": "compiler",
      "name": "javac and the Java virtual machine",
      "assurance": "trusted"
    }
  ],
  "verifies": [
    {
      "target": "java",
      "note": "Sequential Java. Generics, threads, switch expressions and several other Java 5+ features are not supported (KeY 3.0 Java coverage table)."
    }
  ],
  "properties": {
    "no-ub": {
      "status": "full",
      "note": "Java has no undefined behavior. A normal_behavior contract requires that the method does not end with an exception, so KeY proves that no runtime exceptions (such as null dereference or index errors) occur.",
      "source": "https://keyproject.github.io/key-docs/user/getting-started/proving/"
    },
    "functional": {
      "status": "full",
      "note": "Functional specifications in JML (method contracts, class invariants, loop invariants).",
      "source": "https://keyproject.github.io/key-docs/user/getting-started/"
    },
    "equivalence": {
      "status": "partial",
      "note": "No dedicated equivalence mode; you specify the relation between two versions by hand."
    },
    "info-flow": {
      "status": "full",
      "note": "KeY's information-flow module checks JML \"determines\" clauses, which state which results may depend on which inputs.",
      "source": "https://github.com/KeYProject/key/pull/3640"
    },
    "concurrency": {
      "status": "none",
      "note": "Multithreading is not supported; KeY reasons about sequential Java only.",
      "source": "https://keyproject.github.io/key-docs/user/features/java-coverage/"
    },
    "termination": {
      "status": "full",
      "note": "A normal_behavior contract without a diverges clause requires the method to terminate, and KeY proves it. Loops use decreasing clauses and recursion uses measured_by.",
      "source": "https://keyproject.github.io/key-docs/user/getting-started/proving/"
    }
  },
  "features": {
    "core.integers": {
      "status": "partial",
      "note": "Three settings exist. The default treats Java integers as unbounded mathematical integers, which KeY marks as unsound. \"Java semantics\" models overflow exactly, and \"checking overflow\" proves that no overflow happens.",
      "source": "https://github.com/KeYProject/key/blob/main/key.core/src/main/resources/de/uka/ilkd/key/proof/rules/optionsDeclarations.key"
    },
    "core.floats": {
      "status": "full",
      "note": "Supported; needs an installed SMT solver with floating-point support.",
      "source": "https://keyproject.github.io/key-docs/user/features/java-coverage/"
    },
    "core.heap": {
      "status": "full",
      "note": "Objects and references with an explicit heap model.",
      "source": "https://keyproject.github.io/key-docs/user/features/java-coverage/"
    },
    "core.arrays": {
      "status": "full",
      "note": "Including multi-dimensional arrays, ArrayStoreException and out-of-bounds behavior.",
      "source": "https://keyproject.github.io/key-docs/user/features/java-coverage/"
    },
    "core.loops": {
      "status": "full",
      "note": "Loop invariants; for-each loops are rewritten to indexed or iterator loops.",
      "source": "https://keyproject.github.io/key-docs/user/features/java-coverage/"
    },
    "core.recursion": {
      "status": "full",
      "note": "Recursive methods with measured_by clauses for termination.",
      "source": "https://keyproject.github.io/key-docs/user/language/jml-grammar/"
    },
    "core.higher-order": {
      "status": "partial",
      "note": "Lambdas and method references are partly supported (turned into classes); lambdas in field initializers and anonymous classes are not.",
      "source": "https://keyproject.github.io/key-docs/user/features/java-coverage/"
    },
    "core.concurrency": {
      "status": "none",
      "note": "Multithreading is not supported.",
      "source": "https://keyproject.github.io/key-docs/user/features/java-coverage/"
    },
    "core.io": {
      "status": "none",
      "note": "KeY has no model of the JVM runtime or I/O; library methods, including I/O, need stub classes with hand-written contracts.",
      "source": "https://keyproject.github.io/key-docs/user/faq/"
    },
    "core.stdlib": {
      "status": "partial",
      "note": "Library classes must be on KeY's classpath, usually as stubs with contracts; KeY reports an error otherwise.",
      "source": "https://keyproject.github.io/key-docs/user/faq/"
    },
    "java.objects": {
      "status": "full",
      "note": "Classes, interfaces, inheritance and dynamic dispatch. Private and default interface methods load but cannot yet be proved about.",
      "source": "https://keyproject.github.io/key-docs/user/features/java-coverage/"
    },
    "java.exceptions": {
      "status": "full",
      "note": "try/catch/finally, throw, multi-catch and try-with-resources.",
      "source": "https://keyproject.github.io/key-docs/user/features/java-coverage/"
    },
    "java.generics": {
      "status": "none",
      "note": "Generics are not supported in any form; a separate tool can remove them before loading.",
      "source": "https://keyproject.github.io/key-docs/user/features/java-coverage/"
    },
    "java.threads": {
      "status": "none",
      "note": "Multithreading is not supported.",
      "source": "https://keyproject.github.io/key-docs/user/features/java-coverage/"
    }
  },
  "trust": {
    "checker": {
      "level": "amber",
      "summary": "KeY's own rule-based prover decides; its large rule base is trusted, not a small kernel.",
      "note": "Some rules have saved soundness proofs that the test suite replays, but most are trusted. Optional SMT solvers can close goals and are trusted when used.",
      "source": "https://keyproject.github.io/key-docs/devel/testing/prove-rules/"
    },
    "semantics": {
      "level": "red",
      "summary": "Default integer rules ignore overflow, which KeY itself marks unsound; Java mode exists.",
      "note": "The default option arithmeticSemanticsIgnoringOF lets KeY prove properties that do not hold under Java's actual integer semantics. Switching intRules to javaSemantics or arithmeticSemanticsCheckingOF fixes this. Apart from this, the Java calculus is built into KeY and tested by its own test suite.",
      "source": "https://github.com/KeYProject/key/blob/main/key.core/src/main/resources/de/uka/ilkd/key/proof/rules/optionsDeclarations.key"
    },
    "frontend": {
      "level": "amber",
      "summary": "KeY's own Java parser, separate from javac.",
      "source": "https://github.com/KeYProject/key/pull/3120"
    },
    "binary_gap": {
      "level": "red",
      "summary": "javac and the JVM, including its JIT compiler, are not verified."
    },
    "escape_hatches": {
      "level": "amber",
      "summary": "Unsound options, model-field axioms and library stubs; KeY 3.0 has a soundness report.",
      "note": "KeY 3.0 added a \"soundiness\" report that lists unsound taclet options and assumptions used in a proof; it is opened from the proof statistics dialog rather than shown by default.",
      "source": "https://github.com/KeYProject/key/pull/3887"
    }
  },
  "stage_evidence": {
    "public_artifact": {
      "met": true,
      "evidence": "https://github.com/KeYProject/key"
    },
    "published_use": {
      "met": true,
      "evidence": "https://doi.org/10.1007/978-3-031-07727-2_4",
      "note": "Verification of the JDK's IdentityHashMap (2022); earlier, the TimSort bug analysis."
    },
    "installs_on_current": {
      "met": true,
      "evidence": "https://github.com/KeYProject/key/releases/tag/KeY-3.0.0",
      "note": "Runnable jar (the 3.0 release targets Java 21); SMT solvers are optional extras."
    },
    "user_docs": {
      "met": true,
      "evidence": "https://keyproject.github.io/key-docs/"
    },
    "external_users": {
      "met": true,
      "evidence": "https://www.key-project.org/2023/07/23/cwi-researchers-win-google-award-for-finding-a-bug-in-javas-linkedlist-using-key/",
      "note": "CWI researchers used KeY to analyze a bug in Java's LinkedList."
    },
    "soundness_channel": {
      "met": true,
      "evidence": "https://github.com/KeYProject/key/issues?q=label%3A%22%E2%9C%8B+Soundness%22",
      "note": "Public GitHub issues with a \"Soundness\" label."
    }
  },
  "production_users": [],
  "last_release": {
    "version": "3.0.0",
    "date": "2026-07-23",
    "source": "https://github.com/KeYProject/key/releases/tag/KeY-3.0.0"
  },
  "used_for": [
    {
      "name": "JDK IdentityHashMap verification",
      "url": "https://doi.org/10.1007/978-3-031-07727-2_4"
    },
    {
      "name": "Bug in OpenJDK's TimSort found while verifying it (CAV 2015)",
      "url": "https://doi.org/10.1007/978-3-319-21690-4_16"
    },
    {
      "name": "Bug in Java's LinkedList (Google award)",
      "url": "https://www.key-project.org/2023/07/23/cwi-researchers-win-google-award-for-finding-a-bug-in-javas-linkedlist-using-key/"
    }
  ],
  "last_checked": "2026-11-26",
  "attestation": "maintainer",
  "claimed_by_authors": false,
  "sources": [
    {
      "url": "https://keyproject.github.io/key-docs/user/features/java-coverage/",
      "title": "KeY Java coverage (as of KeY 3.0)",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://github.com/KeYProject/key/blob/main/key.core/src/main/resources/de/uka/ilkd/key/proof/rules/optionsDeclarations.key",
      "title": "KeY taclet option declarations (defaults and unsound options)",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://keyproject.github.io/key-docs/user/getting-started/appendix/",
      "title": "KeY proof options appendix (integer semantics)",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://github.com/KeYProject/key/releases/tag/KeY-3.0.0",
      "title": "KeY 3.0.0 release notes",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://doi.org/10.1007/978-3-319-49812-6",
      "title": "Deductive Software Verification - The KeY Book (2016)",
      "accessed": "2026-11-26"
    }
  ],
  "computed": {
    "kind": "toolchains",
    "methodology_version": "0.1",
    "built": "2026-11-26",
    "links": {
      "html": "/toolchains/key/",
      "json": "/toolchains/key.json",
      "markdown": "/toolchains/key.md"
    },
    "stage": {
      "stage": 1,
      "name": "Usable",
      "criteria": [
        {
          "key": "public_artifact",
          "stage": 0,
          "label": "Publicly available",
          "met": true,
          "evidence": "https://github.com/KeYProject/key",
          "computed": false
        },
        {
          "key": "published_use",
          "stage": 0,
          "label": "At least one published verification uses it",
          "met": true,
          "evidence": "https://doi.org/10.1007/978-3-031-07727-2_4",
          "note": "Verification of the JDK's IdentityHashMap (2022); earlier, the TimSort bug analysis.",
          "computed": false
        },
        {
          "key": "recent_release",
          "stage": 1,
          "label": "Released or updated in the last 12 months",
          "met": true,
          "evidence": "https://github.com/KeYProject/key/releases/tag/KeY-3.0.0",
          "note": "Latest release: 3.0.0, 2026-07-23.",
          "computed": true
        },
        {
          "key": "installs_on_current",
          "stage": 1,
          "label": "Installs and runs on current platforms",
          "met": true,
          "evidence": "https://github.com/KeYProject/key/releases/tag/KeY-3.0.0",
          "note": "Runnable jar (the 3.0 release targets Java 21); SMT solvers are optional extras.",
          "computed": false
        },
        {
          "key": "user_docs",
          "stage": 1,
          "label": "User documentation or tutorial",
          "met": true,
          "evidence": "https://keyproject.github.io/key-docs/",
          "computed": false
        },
        {
          "key": "external_users",
          "stage": 1,
          "label": "Used by a group other than its authors",
          "met": true,
          "evidence": "https://www.key-project.org/2023/07/23/cwi-researchers-win-google-award-for-finding-a-bug-in-javas-linkedlist-using-key/",
          "note": "CWI researchers used KeY to analyze a bug in Java's LinkedList.",
          "computed": false
        },
        {
          "key": "production_users",
          "stage": 2,
          "label": "Verified code in production at two or more independent organizations",
          "met": false,
          "note": "None recorded.",
          "computed": true
        },
        {
          "key": "checker_not_red",
          "stage": 2,
          "label": "Checker axis is not red",
          "met": true,
          "computed": true
        },
        {
          "key": "semantics_not_red",
          "stage": 2,
          "label": "Semantics axis is not red",
          "met": false,
          "computed": true
        },
        {
          "key": "soundness_channel",
          "stage": 2,
          "label": "Public channel for soundness bugs",
          "met": true,
          "evidence": "https://github.com/KeYProject/key/issues?q=label%3A%22%E2%9C%8B+Soundness%22",
          "note": "Public GitHub issues with a \"Soundness\" label.",
          "computed": false
        }
      ],
      "missing_for_next": [
        "production_users",
        "semantics_not_red"
      ]
    }
  }
}