Datasets:
ReForm Dafny Hint Infill (DafnyBench-style) — semantic-preserving augmentation (single transforms plus combinations of them)
Augmented version of the python2dafny split of ThuraAung1601/reform-dafny-hint-gen
(derived from Veri-Code/ReForm-Python2Dafny-Dataset),
for fine-tuning DafnyBench-style proof-hint synthesis (loop invariants, assertions and decreases clauses). The dafnycomp benchmark split is deliberately not augmented or included.
65,120 rows from 8,032 source rows: 8,016 originals, 25,979 single-transform variants, 31,125 combined-transform variants.
Cleaning (before augmentation)
- Decontamination against evaluation sets (
ThuraAung1601/dafnybench-cleaned, a 30-task DafnyBench sample, thedafnycompsplit ofThuraAung1601/reform-dafny-hint-gen): a source row is dropped when its program shares ≥ 80% of the smaller program's 8-token shingles with an evaluation program, identifiers ignored (so renamed copies count) — 0 rows removed. None of their variants are included either. - Deduplication (ignoring formatting and comments (so formatting-only variants are duplicates and the
whitespacetransform is not used)): 10 rows whose program repeats an earlier one up to identifier names and 6 with a repeated task text were removed, and every task text in the dataset is unique.
Every removed id, with its reason (and the matching benchmark id), is in the *.report.json file.
The source dataset is already decontaminated against DafnyBench (its build_report.json lists the removed programs), so this second check is expected to find nothing new.
How variants are made
Each variant is produced from the row's verified output program with rule-based, semantic-preserving rewrites
(no LLM involved):
rename_vars: consistently renames local/loop variables across the file (i->i_a0)swap_operands: swaps the operands of==,!=,&&,||,*and numeric+when both are plain atoms and the neighbouring operators bind looser (never+on sequences/strings)if_else_swap:if C {A} else {B}->if !(C) {B} else {A}(outermost if/else blocks)split_decl:var a, b := e1, e2;-> two declarations (only when e2 doesn't mention a)dead_var: inserts an unusedvar unused_k := 0;at the top of each method/lemma body
Combinations apply 2+ transforms in a fixed order (rename_vars, swap_operands, if_else_swap, split_decl, dead_var, whitespace), built only from transforms whose single variant verified for that row, at most 4 per row (drawn at random, seeded).
A variant is kept only if
- it changes the task text and duplicates no other variant of the same row,
- every
requires/ensuresclause is unchanged up to the transforms' own renames and operand swaps, and - it passes a full
dafny verify(timeout 120 s).
Its modified_input is then rebuilt with the same DafnyBench-style step that produced the source dataset (every invariant / assert / decreases line removed)
(reproduces the source's modified_input exactly for all but 0 of the kept rows,
which are included as originals only), so originals and variants are constructed identically.
| transform | kept | no-op | failed verify | spec changed |
|---|---|---|---|---|
| rename_vars | 7,875 | 16 | 125 | 0 |
| swap_operands | 7,799 | 187 | 30 | 0 |
| if_else_swap | 2,202 | 5,805 | 9 | 0 |
| split_decl | 156 | 7,860 | 0 | 0 |
| dead_var | 7,947 | 26 | 43 | 0 |
| combo of 2 | 21,641 | 0 | 8 | 0 |
| combo of 3 | 8,697 | 0 | 8 | 0 |
| combo of 4 | 777 | 0 | 1 | 0 |
| combo of 5 | 10 | 0 | 0 | 0 |
Fields
id:<source id>for originals,<source id>__<transform>[+<transform>...]for variantsmodified_input: program with its invariant / assert / decreases lines removed (the task)output: the complete, verified programorig_id: source row id — group by this when splitting train/validation, so variants of one program never land on both sidestransform:original, a transform name, or+-joined names for combinations
Generated with augment_dafnybench.py --format reform-hints (seed 0).
License
CC-BY-NC-4.0, inherited from the source ReForm datasets — non-commercial use, attribution required. Cite the original ReForm project.
- Downloads last month
- 25