---
name: icfp-reproducibility
description: Use when keeping literate sources, proofs, benchmarks, and AI logs of an ICFP paper consistent so that listings compile and the revision diff is clean. Does not package.
---

# ICFP reproducibility

Use this from the first listing.

Call: https://icfp27.sigplan.org/track/icfp-2027-icfp-papers

## One source

The paper's code and the code that runs are the same file. Literate style (lhs2TeX, Agda LaTeX, Lean or Coq extraction, org) or includes by marker. A listing typed by hand contains an error in the version that is printed, always in the base case.

```bash
test -d code || { echo "STOP: no code folder"; exit 1; }
grep -nE '\\begin\{(lstlisting|verbatim|minted|alltt)\}' paper/*.tex 2>/dev/null | wc -l | sed 's/^ */hand-typed listings: /'
grep -ohE '\\input(code|minted|listing)?(\[[^]]*\])?(\{[a-z]+\})?\{code/[^}]+\}' paper/*.tex 2>/dev/null | sed -E 's/.*\{(code\/[^}]+)\}/\1/' | sort -u | while read -r f; do test -s "$f" || echo "MISSING $f"; done
if [ -f code/Makefile ]; then (cd code && make -s check) && echo "code checks" || echo "CODE DOES NOT CHECK"; else echo "LOOK: no code/Makefile with a check target"; fi
```

Examples "evaluates to" in the text are doctests. Rejected programs are tests that expect the error.

## Toolchain

Compiler and package set pinned (cabal freeze, stack resolver, opam lock, lake manifest, Agda library versions, nix). The proof assistant's version on page 1 of the supplement. Rebuild from nothing weekly.

## Names

A table: paper's theorem, formal name, file, axioms printed by command. Generated. The correspondence between claim and formal statement is what reviewers will check, since the call says that the scripts are requested for that.

## Proof holes

`sorry`, `Admitted`, `postulate`, `believe_me`, `unsafeCoerce`, `TODO`. List with file and reason. Zero at submission, or the claim says otherwise.

## Benchmarks

Raw times, machine, flags, heap, forcing, number of runs, in files. A plot is a function of these files. Intermediate code for the headline example stored with the compiler version.

## AI log

For the AI Use section: date, tool, version, what it made (function, lemma, test, translation, plot), what was kept, who understood it. Understanding is the important column: somebody has to answer questions about that lemma in April.

## Revision in May

Tag the submission with sources **and** PDF. The diff must be a PDF: try the tool in February, as `latexdiff` fails on literate code and custom macros at the worst moment. Keep one sentence per line in the source.

## Output

```text
[ICFP record] hand-typed listings <0>, doctests <n>, rejected programs <n>
[Clean rebuild] <date>, <minutes>, versions pinned
[Theorem table] rows <n>, axioms printed
[Holes] <0 / list with changed claims>
[AI log] entries <n>, understood by <who>
[PDF diff] tried on <date>, tool <x>
```

## Reverify each cycle

- Requirements for scripts, AI section, and diff.
