Skip to content

Adapt to coqutil Word.Naive on stdlib bits; drop Rocq 9.0 from CI - #561

Merged
andres-erbsen merged 1 commit into
mit-plv:masterfrom
JasonGross:fable/zmod-naive
Sep 15, 2026
Merged

andres-erbsen merged 1 commit into
mit-plv:masterfrom
JasonGross:fable/zmod-naive

Conversation

@JasonGross

@JasonGross JasonGross commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Adapts to coqutil Word.Naive being represented as stdlib bits (mit-plv/coqutil#186): pins deps/coqutil to that branch, rewrites the two division-by-zero cases and three shift cases in compiler/src/compiler/NaiveRiscvWordProperties.v (the only file that unfolded the old record), and adjusts CI. Rocq 9.0 and 9.1 are dropped from CI: their rocq/rocq-prover docker images ship rocq-stdlib 9.0.0 (no Zmod), so CI tests 9.2 and dev; the opam bound stays rocq-stdlib >= 9.1, which does allow Rocq 9.1. Everything in make all (compiler, processor, end2end, LiveVerif) builds; no other source changes were needed.

Depends on mit-plv/coqutil#186; CI cannot fetch the pinned coqutil commit until that merges, so this stays a draft until then.

Written by Claude Fable 5.1.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YJbiRBkJtM7x6PvYV6hmEm

@JasonGross

JasonGross commented Sep 12, 2026

Copy link
Copy Markdown
Contributor Author

Stacked follow-up: #562 (Kami words on stdlib bits via mit-plv/kami#51; its last four commits are the Kami part).


Written by Claude Fable 5.1 via Claude Code (session https://claude.ai/code/session_01YJbiRBkJtM7x6PvYV6hmEm).

rewrite Z_mod_same_full.
reflexivity.
+ cbn in *. exfalso. congruence.
(* destr already substituted z := word.of_Z 0; word.divu y 0 is Zmod.udiv y zero = opp one *)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments that narrate immediately adjacent code are not useful, please remove

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed, and swept the whole diff of this PR and of the two stacked ones (#562, #563) for comments that narrate adjacent code or describe the change; the substance is in the commit messages now.


Written by Claude Fable 5.1 via Claude Code (session https://claude.ai/code/session_01YJbiRBkJtM7x6PvYV6hmEm).

@JasonGross
JasonGross force-pushed the fable/zmod-naive branch 2 times, most recently from 9d693f1 to 5202bcf Compare September 14, 2026 18:28
…m CI

NaiveRiscvWordProperties.v proves riscv_ok by unfolding the Naive
instance: word.ok says nothing about shift amounts of width or more or
about division by zero, and these five facts are exactly about those
cases. The shift cases reduce to the shift amounts agreeing, the
division cases to Zmod.udiv_0_r and Zmod.umod_0_r.

The rocq/rocq-prover docker images for 9.0 and 9.1 ship rocq-stdlib 9.0,
which has no Zmod, so CI tests 9.2 and dev.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YJbiRBkJtM7x6PvYV6hmEm
@JasonGross
JasonGross marked this pull request as ready for review September 14, 2026 22:07
@andres-erbsen
andres-erbsen merged commit 257a21d into mit-plv:master Sep 15, 2026
5 checks passed
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.

2 participants