Skip to content

[spectec] Cover Wasm 1.0 CVTOP constraints and refresh test expectations - #2358

Open
BLVCK-MAMBA-6 wants to merge 8 commits into
WebAssembly:mainfrom
BLVCK-MAMBA-6:tests/wasm1-cvtop-constraints
Open

BLVCK-MAMBA-6 wants to merge 8 commits into
WebAssembly:mainfrom
BLVCK-MAMBA-6:tests/wasm1-cvtop-constraints

Conversation

@BLVCK-MAMBA-6

Copy link
Copy Markdown

Test follow-up to #2357, covering the Wasm 1.0 conversion constraints reported in #2302.

This targets mechanization-spec-changes so the diff contains only the test updates.

Changes:

  • Add a direct SpecTec regression covering all 160 destination/source/operator combinations, with an independent list of the 25 legal conversions. Evaluate the actual constructor premises, including width restrictions.
  • Register the regression with Dune and include _specification as a data directory so its dependencies are available.
  • Modernize eight legacy NaN assertions that previously prevented the entire Wasm 1.0 conversion test file from parsing.
  • Refresh frontend, middlend, LaTeX, prose, splice, and interpreter expectations for the updated specification.

Validation on Linux with OCaml 5.4.0 and Dune 3.20.2:

  • SpecTec and the regression executable build successfully.
  • The CVTOP regression accepts 25 legal combinations and rejects 135 illegal combinations.
  • Against the pre-PR specification, it detects 95 incorrectly accepted combinations.
  • Mutations to reinterpret, extend, and promote width conditions are detected.
  • The restored conversion suite passes 411/411 executed checks.
  • dune runtest -j4 and git diff --check pass.

Seven existing Wasm 1.0 parsing failures remain recorded in the interpreter expectations. The prose snapshot also retains the unsupported soundness-premise diagnostics and placeholders introduced by the parent specification changes.

This branch has not been deployed

No deployments
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