{
  "id": "vellvm",
  "name": "Vellvm",
  "aka": [
    "Verified LLVM"
  ],
  "summary": "A formal semantics of LLVM IR in Rocq, with an executable interpreter extracted from the same definitions and used to test the model against clang.",
  "target": "llvm-ir",
  "fragment": "Most of the sequential part of LLVM IR: integers of any width, floats and doubles, structs, arrays, vectors, pointers and integer-pointer casts, poison, global data, recursive functions and some intrinsics. Not covered: concurrency, inline assembly, architecture-specific float types and some instruction annotations. Exception support (invoke, landingpad) is partial.",
  "version": "LLVM IR; the parser aims to accept all syntax emitted by Clang 17 or later. The semantics is not tied to one LLVM release.",
  "framework": "Rocq (interaction trees)",
  "provers": [
    "rocq"
  ],
  "open": "open-source",
  "license": "MIT",
  "maintainers": [
    "University of Pennsylvania, with collaborators at Inria"
  ],
  "links": {
    "homepage": "https://vellvm.github.io/vellvm/",
    "repo": "https://github.com/vellvm/vellvm",
    "docs": "https://vellvm.github.io/vellvm/faq/",
    "paper": "https://doi.org/10.1145/3473572"
  },
  "validation": "The interpreter is extracted from the Rocq definitions and compared against clang/llc. The NFM 2025 experience report describes hand-written unit tests, a test suite derived from Alive2, and random differential testing against clang with generated LLVM IR programs (GenLLVM, built on QuickChick) and C programs from Csmith and YARPGen; this found bugs in both Vellvm and clang. Version 3.0 removed the QuickChick dependency. A newer test suite for the LangRef's undefined-behavior rules can be run side by side with clang and the llubi interpreter; Vellvm passed 328 of its 363 assertions as of 2026-10-13.",
  "stage_evidence": {
    "mechanized": {
      "met": true,
      "evidence": "https://github.com/vellvm/vellvm",
      "note": "Definitions are written in Rocq."
    },
    "scope_stated": {
      "met": true,
      "evidence": "https://vellvm.github.io/vellvm/faq/",
      "note": "The FAQ lists supported and unsupported features and names Clang 17 as the parsing baseline. It does not tie the semantics to a specific LLVM release."
    },
    "executable": {
      "met": true,
      "evidence": "https://vellvm.github.io/vellvm/tests/",
      "note": "An interpreter extracted to OCaml runs .ll files. Earlier releases proved it refines the specification; release 3.0 notes that the meta-theory is temporarily unplugged and will be added back."
    },
    "validated": {
      "met": true,
      "evidence": "https://www.cis.upenn.edu/~stevez/papers/nfm25.pdf",
      "note": "Random differential testing against clang/llc, described in the NFM 2025 report, found bugs in both Vellvm and clang. The report gives no pass rates. The undefined-behavior suite (328 of 363 passing) and its comparison script are in the repository."
    },
    "adopted_by_owner": {
      "met": false,
      "evidence": "https://vellvm.github.io/vellvm/news/llvm-formal-spec-talk-2026-11-16/",
      "note": "Not adopted by the LLVM project. In November 2026 the Vellvm authors presented to the LLVM IR Formal Specifications Working Group, which is not an endorsement."
    },
    "full_coverage": {
      "met": false,
      "evidence": "https://vellvm.github.io/vellvm/faq/",
      "note": "Concurrency, inline assembly and some float types are not covered, and exceptions are only partly covered (FAQ, release notes)."
    },
    "tracks_versions": {
      "met": false,
      "note": "No stated policy for following new LLVM releases was found in the README, FAQ or website."
    }
  },
  "features": {
    "core.integers": {
      "status": "full",
      "note": "Integers of any bit width.",
      "source": "https://vellvm.github.io/vellvm/faq/"
    },
    "core.floats": {
      "status": "partial",
      "note": "float and double are supported. Not supported: architecture-specific float types. Fast-math flags are parsed but do not yet change the semantics.",
      "source": "https://vellvm.github.io/vellvm/faq/"
    },
    "core.heap": {
      "status": "partial",
      "note": "A two-phase (infinite, then finite) memory model with provenance and integer-pointer casts (ICFP 2024). Missing (October 2026): UB rules for pointer-access attributes such as noalias, readonly and memory(...), and object bounds for getelementptr inbounds.",
      "source": "https://vellvm.github.io/vellvm/news/ub-2026-10-29/"
    },
    "core.arrays": {
      "status": "full",
      "note": "Arrays, structs and byte-level loads and stores are modeled.",
      "source": "https://www.cis.upenn.edu/~stevez/papers/nfm25.pdf"
    },
    "core.loops": {
      "status": "full",
      "note": "Control-flow graphs with loops, including programs that do not terminate (interaction trees model infinite runs).",
      "source": "https://www.cis.upenn.edu/~stevez/papers/nfm25.pdf"
    },
    "core.recursion": {
      "status": "full",
      "note": "Mutually recursive functions are supported.",
      "source": "https://vellvm.github.io/vellvm/faq/"
    },
    "core.higher-order": {
      "status": "full",
      "note": "Calls through function pointers are modeled, including undefined behavior for calls through null or poison pointers and calling-convention mismatches.",
      "source": "https://vellvm.github.io/vellvm/news/ub-2026-10-29/"
    },
    "core.concurrency": {
      "status": "none",
      "note": "Concurrency is not supported (FAQ). atomicrmw and cmpxchg get a sequential meaning and fence does nothing. A concurrent subset was studied separately (Chappe et al., CPP 2025).",
      "source": "https://vellvm.github.io/vellvm/faq/"
    },
    "core.io": {
      "status": "partial",
      "note": "Only a few library calls (puts, printf, malloc) are built in. Other external code must be supplied as LLVM IR and linked into the interpreter.",
      "source": "https://vellvm.github.io/vellvm/faq/"
    },
    "core.stdlib": {
      "status": "partial",
      "note": "Most of the C standard library is missing. puts, printf and malloc are supported, plus minimal library support in src/libll.",
      "source": "https://vellvm.github.io/vellvm/faq/"
    },
    "llvm.poison": {
      "status": "partial",
      "note": "Poison is modeled. Since 3.0, undef is treated as poison, following LLVM's plan to remove undef. This differs from today's LangRef in some cases, for example 'or i8 undef, 255' gives poison instead of 255.",
      "source": "https://vellvm.github.io/vellvm/news/ub-2026-10-29/"
    },
    "llvm.memory": {
      "status": "partial",
      "note": "alloca, load, store, getelementptr, provenance and integer-pointer casts are modeled. Missing: object bounds for getelementptr inbounds, and the attributes that limit what memory a pointer may access.",
      "source": "https://github.com/vellvm/vellvm/blob/main/tests/ub/README.md"
    },
    "llvm.intrinsics": {
      "status": "partial",
      "note": "Only some intrinsics are covered (for example memcpy, memmove, memset, assume), and users can add more.",
      "source": "https://vellvm.github.io/vellvm/faq/"
    },
    "llvm.vectors": {
      "status": "partial",
      "note": "Fixed-size vectors are modeled and exercised by the random test generator. Scalable vectors are missing: the syntax has no scalable vector type.",
      "source": "https://github.com/vellvm/vellvm/blob/main/src/rocq/Syntax/LLVMAst.v"
    }
  },
  "last_release": {
    "version": "3.0.20260707",
    "date": "2026-07-07",
    "source": "https://github.com/vellvm/vellvm/releases/tag/3.0.20260707"
  },
  "last_checked": "2026-11-26",
  "attestation": "maintainer",
  "claimed_by_authors": false,
  "sources": [
    {
      "url": "https://github.com/vellvm/vellvm",
      "title": "Vellvm repository and README",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://vellvm.github.io/vellvm/faq/",
      "title": "Vellvm FAQ (supported and unsupported features)",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://vellvm.github.io/vellvm/about/",
      "title": "About Vellvm",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://vellvm.github.io/vellvm/structure/",
      "title": "Structure of the development",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://vellvm.github.io/vellvm/news/ub-2026-10-29/",
      "title": "Better support for UB (news, 2026-10-29)",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://github.com/vellvm/vellvm/blob/main/tests/ub/README.md",
      "title": "Undefined-behavior test suite status",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://github.com/vellvm/vellvm/releases/tag/3.0.20260707",
      "title": "Vellvm 3.0 release notes",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://www.cis.upenn.edu/~stevez/papers/nfm25.pdf",
      "title": "Vellvm: Formalizing the Informal LLVM (Experience Report), NFM 2025",
      "accessed": "2026-11-26"
    },
    {
      "url": "https://vellvm.github.io/vellvm/research/",
      "title": "Vellvm publications",
      "accessed": "2026-11-26"
    }
  ],
  "computed": {
    "kind": "semantics",
    "methodology_version": "0.1",
    "built": "2026-11-26",
    "links": {
      "html": "/semantics/vellvm/",
      "json": "/semantics/vellvm.json",
      "markdown": "/semantics/vellvm.md"
    },
    "stage": {
      "stage": 1,
      "name": "Validated",
      "criteria": [
        {
          "key": "mechanized",
          "stage": 0,
          "label": "Machine-checked or machine-readable definition",
          "met": true,
          "evidence": "https://github.com/vellvm/vellvm",
          "note": "Definitions are written in Rocq.",
          "computed": false
        },
        {
          "key": "scope_stated",
          "stage": 0,
          "label": "Fragment and version are stated",
          "met": true,
          "evidence": "https://vellvm.github.io/vellvm/faq/",
          "note": "The FAQ lists supported and unsupported features and names Clang 17 as the parsing baseline. It does not tie the semantics to a specific LLVM release.",
          "computed": false
        },
        {
          "key": "executable",
          "stage": 1,
          "label": "Can be executed or tested",
          "met": true,
          "evidence": "https://vellvm.github.io/vellvm/tests/",
          "note": "An interpreter extracted to OCaml runs .ll files. Earlier releases proved it refines the specification; release 3.0 notes that the meta-theory is temporarily unplugged and will be added back.",
          "computed": false
        },
        {
          "key": "validated",
          "stage": 1,
          "label": "Published results against conformance tests or real implementations",
          "met": true,
          "evidence": "https://www.cis.upenn.edu/~stevez/papers/nfm25.pdf",
          "note": "Random differential testing against clang/llc, described in the NFM 2025 report, found bugs in both Vellvm and clang. The report gives no pass rates. The undefined-behavior suite (328 of 363 passing) and its comparison script are in the repository.",
          "computed": false
        },
        {
          "key": "authoritative",
          "stage": 2,
          "label": "Adopted by the language or ISA owner, or covers the full current version and tracks new ones",
          "met": false,
          "evidence": "https://vellvm.github.io/vellvm/news/llvm-formal-spec-talk-2026-11-16/",
          "note": "Adopted by the owner: no; full coverage: no; tracks new versions: no. Not adopted by the LLVM project. In November 2026 the Vellvm authors presented to the LLVM IR Formal Specifications Working Group, which is not an endorsement. Concurrency, inline assembly and some float types are not covered, and exceptions are only partly covered (FAQ, release notes). No stated policy for following new LLVM releases was found in the README, FAQ or website.",
          "computed": true
        }
      ],
      "missing_for_next": [
        "authoritative"
      ]
    },
    "used_by": []
  }
}