Skip to content

Support development Menhir and Rocq 9.3 proof syntax - #590

Draft
JasonGross wants to merge 2 commits into
AbsInt:masterfrom
theorem-labs:claude/rocq-dev-compat
Draft

Support development Menhir and Rocq 9.3 proof syntax#590
JasonGross wants to merge 2 commits into
AbsInt:masterfrom
theorem-labs:claude/rocq-dev-compat

Conversation

@JasonGross

Copy link
Copy Markdown
Contributor

This draft fixes two development-toolchain compatibility issues.

The implementation was produced by a Claude coding-agent session working on Jason Gross's behalf. It:

  • accepts Menhir development builds whose version string is unreleased, while still verifying that the Menhir API library is available; and
  • moves three Proof. commands before their refine commands in the bundled MenhirLib, as required since Rocq 9.3.

The Menhir configure change matches the patch that CompCert opam packages have carried out of tree.

I independently validated the unchanged branch against rocq-dev-testing with an amd64-linux, 64-bit configuration. Configure recognizes the development Menhir, and the complete make -j4 build succeeds, including proofs, extraction, compiler, runtime, and clightgen.

Implementation credit: Claude Opus 5; both commits contain Claude session attribution and co-authorship trailers.

Authorship note: this was researched and written by an AI coding agent
(OpenAI Codex), working on Jason Gross's behalf; Jason reviews what is
posted from this account.

JasonGross and others added 2 commits July 28, 2026 04:16
`menhir --version` prints "menhir, version unreleased" for builds from the
upstream git repository (e.g. an opam pin on gitlab.inria.fr/fpottier/menhir).
The version-extraction sed only matched digits, so the version test fell
through to the catch-all case and reported

    Error: make sure Menhir version 20200624 or later is installed.

Recognise "unreleased" and treat it as recent enough, still checking that the
Menhir API library can be located.  This is the patch the opam packages
coq-compcert / coq-compcert-32 have been carrying out-of-tree since 2020.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9BGQT7XUuubV6C619DW4b
Rocq 9.3 turned "Proof must be the first command in an interactive proof"
into an error, so the three definitions in MenhirLib/Interpreter.v that open
with `refine`/`unshelve refine` and only then write `Proof.` no longer
compile:

    File "./MenhirLib/Interpreter.v", line 194, characters 0-6:
    Error: "Proof" must be the first command in an interactive proof.

Move each `Proof.` above its `refine`.  This only affects the bundled copy of
MenhirLib, which is what `./configure` uses unless `-use-external-MenhirLib`
is given; the coq-menhirlib opam package already carries the same fix.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9BGQT7XUuubV6C619DW4b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant