Repository navigation
test(specs): exact encodings and non-P cases so constant bodies fail (Closes #7575) - #7583
Conversation
…loses #7575) encode_r_type and encode_i_type in specs/fpga/assembler.t27 were tested only for `> 0`, so `return 1;` passed 19/19. They now assert the exact words 78002176 and 145096746. on_comb in specs/ternary/gft_mlp2.t27 had two tests, both expecting P(2), so `return 2;` passed; two tests now expect N(0) and Z(1). Function bodies are unchanged. The three seal files are regenerated with the t27c built from this tree; the conformance descriptions name the exact words. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Needed action, outside this PR: re-bless the t27b ledger on master ( |
|
|
Closes #7575
Three functions passed their own tests with a constant body. Only tests change; function bodies are untouched.
What changes
specs/fpga/assembler.t27: testsencode_r_typeandencode_i_typeasserted> 0. They now assert the exact words:r_instruction(1, 5, 6, 7)->78002176,i_instruction(2, 5, 6, 42)->145096746(the arithmetic is in a comment above each test).specs/ternary/gft_mlp2.t27: both tests expected P(2). Addedall_neg_out(expects N,0) andcancel(expects Z,1)..trinity/seals/fpga_Assembler.json, its twinAssembler.json, andternary_GftMlp2.json: regenerated witht27c seal --save, using the t27c built from this tree (cargo build --release -p t27cat the PR commit). Onlyspec_hash,gen_hash_candgen_hash_zigmove (tests are emitted into C and Zig); Rust and Verilog hashes are unchanged.conformance/fpga_assembler.json: the two case descriptions name the exact words. Prose only; the vector-data census is unchanged.Checks (local, t27c built from this tree, Zig 0.16.0)
t27c test-report specs/fpga/assembler.t27t27c test-report specs/ternary/gft_mlp2.t27t27c parse-complete --showon both specst27c seal <spec> --verifyon both specstools/ci/check_specs_still_parse.py --base origin/master --head HEADtools/check_json_parses.pytools/check_vector_data.py,check_assertionless_spec_tests.py,check_seal_coverage.pytools/check_seal_currency.pyConstant-body probe (body replaced by
return <c>;, thentest-report):return 0;return 1;return 2;On master the same probe passes
return 1;andreturn 2;for both encoders (19/19) andreturn 2;for on_comb (2/2).Not covered here
tools/dupe_scan.pyreports five groups (bytes32_eq,bytes64_eq,nibble,price_tokens,run_die_level_with) in specs this PR does not touch.specs/fpga/formal.t27(is_posedge) was also flagged during the bench run, but the whole spec isblocked_compilewith this t27c, so its tests could not be judged; left out of this PR.🤖 Generated with Claude Code