Why3 / README.md
phanerozoic's picture
Re-extract: full statement+proof, normalized schema, provenance
816256a verified
|
Raw History Blame Contribute Delete
3.17 kB
metadata
license: lgpl-2.1
task_categories:
  - text-generation
  - feature-extraction
language:
  - en
tags:
  - theorem-proving
  - formal-methods
  - why3
  - verification
  - smt
size_categories:
  - 1K<n<10K
dataset_info:
  features:
    - name: statement
      dtype: string
    - name: proof
      dtype: string
    - name: type
      dtype: string
    - name: symbolic_name
      dtype: string
    - name: library
      dtype: string
    - name: filename
      dtype: string
    - name: imports
      list: string
    - name: deps
      list: string
    - name: docstring
      dtype: string
    - name: source_url
      dtype: string
    - name: commit
      dtype: string
  splits:
    - name: train
      num_examples: 9558
  config_name: default
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*

Why3

A structured dataset of lemmas, functions, and predicates from Why3, a platform for deductive program verification.

Source

Schema

Column Type Description
statement string Declaration signature/claim with the leading keyword removed (verbatim slice); the full declaration minus its proof
proof string Verbatim proof/body, empty if the declaration has none
type string Declaration keyword
symbolic_name string Declaration identifier
library string Sub-library
filename string Repository-relative source path
imports list[string] File-level Require/Import modules
deps list[string] Intra-corpus identifiers referenced
docstring string Preceding documentation comment, empty if absent
source_url string Upstream repository
commit string Upstream commit extracted

Statistics

  • Entries: 9,558
  • With proof: 4,842 (50.7%)
  • With docstring: 1,642 (17.2%)
  • Libraries: 21

By type

Type Count
let 1,576
lemma 1,437
predicate 933
axiom 894
function 881
val 753
goal 687
let lemma 662
type 560
constant 336
let function 300
val function 179
let constant 84
val constant 78
let predicate 62
inductive 56
exception 44
val predicate 36

Example

array [@extraction:array] 'a
= private {
    mutable ghost elts : int -> 'a;
                length : int
  } invariant { 0 <= length }
  • type: type | symbolic_name: array | stdlib/array.mlw

Use

Each declaration is split into a statement (signature/claim) and a proof (body) that are disjoint and together form the complete declaration, for proof modeling, autoformalization, retrieval, and dependency analysis via deps.

Citation

@misc{why3_dataset,
  title  = {Why3},
  author = {Norton, Charles},
  year   = {2026},
  note   = {Extracted from https://gitlab.inria.fr/why3/why3, commit 7c59064b4eed},
  url    = {https://huggingface.co/datasets/phanerozoic/Why3}
}