spec(port): gen_w388_lean as .t27 - #6251
Merged
Merged
Conversation
…loses #6211) Ports the decisions behind the generated Lean text as pure integer functions: the variable-name sequence with its keyword skips, the plus/minus/zero weight at each chain step, chain lengths, depth parity of the cancellation chain, and the first/last swap of the zero-weight chain. The text assembly (theorem_block, main) stays an undefined body because str + str does not compile in t27. Checked with t27c from this tree and Zig 0.16.0: typecheck OK, spec-status IMPLEMENTED, gen 157 lines with no "not yet implemented", test-report 11/11. Name codes were cross-checked against the original var_names for 66 names. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #6211
Adds
specs/port/scripts/gen_w388_lean.t27, the port ofscripts/gen_w388_lean.py. One file, nothing else.str + strdoes not compile in t27, so the Lean text assembly is not ported. What is ported are the decisions that shape the text, as pure integer functions: the variable-name sequence with its keyword skips (var_names, names packed as ASCII codes), chain lengths (nest_mac,plus_chain,minus_chain), the weight at each step (cancellation_weight,zero_chain_weight), the depth parity ofcancellation_chain,zero_weight_closuresize and the first/last reorder.theorem_blockandmainkeep their names withundefined;bodies (string formatting, file read/write), and no test calls them.Checks from this branch with
t27cbuilt from the same tree and Zig 0.16.0:t27c typecheck: OKt27c spec-status: IMPLEMENTEDt27c gen: 157 lines, 0 xnot yet implementedt27c test-report: 11 tests, 11 pass, 0 BLOCKEDvar_namesNot checked: CI result is pending. The signatures differ from the Python (integers instead of strings and lists), which is the point of the port.
🤖 Generated with Claude Code