Skip to content

Implement part 2 of 2 of the empty bodies in specs/vm/jit_semantics.t27 (4 functions) #4370

Description

@gHashTag

Re-filed from #3939. An attempt claimed that issue on 2026-09-18 and left an empty branch, and a dispatch row that has spent its retry ceiling keeps its issue for good - so no bee could take it again, however much the brief improved. The work below is carried over unchanged.


Implement part 2 of 2 of the empty bodies in specs/vm/jit_semantics.t27 (4 functions)

Context

specs/vm/jit_semantics.t27 holds 12 functions declared with a body that contains no statement. It is split into 2 issues because one turn cannot carry them all.

All 2 parts name the same file, so they share one boundary and cannot run at the same time - the swarm holds the file for whoever has it. They must be done in order, and the check below stops you if you arrived out of turn.

.t27 is the hand-authored source language. t27c compiles it out to C, Rust, Verilog and Zig. You are writing source, not compiler output, and not prose about an implementation.

Before you start

$ cd /Users/playom/t27
$ t27c gen specs/vm/jit_semantics.t27 2>&1 | grep -c 'not yet implemented'
4      # if it is not 4, this part is not yours yet - stop

What to write

Keep every signature exactly as it is. Quoted verbatim:

  1. line 127 - pub fn getOrCompile(cache: &JitCache, op: VsaOperation, dimension: usize) -> ?JitVsaFn
  2. line 137 - pub fn jitBind(cache: &JitCache, a: &HybridBigInt, b: &HybridBigInt)
  3. line 143 - pub fn jitBundle(cache: &JitCache, a: &HybridBigInt, b: &HybridBigInt)
  4. line 150 - pub fn jitDotProduct(cache: &JitCache, a: &HybridBigInt, b: &HybridBigInt) -> f64

Add a test block for each function you implement.

Acceptance criteria

    1. t27c gen specs/vm/jit_semantics.t27 > /tmp/t27-gen.zig && grep -c 'not yet implemented' /tmp/t27-gen.zig prints 0 (on arrival: 4)
    1. t27c spec-status specs/vm/jit_semantics.t27 does not print NOPARSE - the file still parses. (This replaces a parse-metrics criterion. The compiler in the container prints no such metrics, so the command printed nothing and no work could ever satisfy it.)
    1. with criterion 1 satisfied, all 4 names above still exist: grep -cE '^\s*(pub )?fn (getOrCompile|jitBind|jitBundle|jitDotProduct)\(' specs/vm/jit_semantics.t27 prints 4

Boundary

specs/vm/jit_semantics.t27

The instruments

Every one of these reads and prints; none of them writes. Run them from the repository root, with <spec> replaced by the file in `## User Scenarios & Testing

  • Given specs/vm/jit_semantics.t27 as it stands today,
    when the work described above is done and the commands under Acceptance criteria are run from the repository root,
    then each of those commands prints the value stated beside it.

Requirements

  • FR-001: every signature already in the file MUST stay exactly as it is - the signature is the contract, and a caller elsewhere is holding it.
  • FR-002: the file MUST still parse afterwards. t27c parse specs/vm/jit_semantics.t27 is the check, and a spec that stops parsing generates nothing, so every test it already carried stops running too.
  • FR-003: no function MUST be deleted to satisfy a count.

Boundary`:

  • t27c spec-status <spec> - the compiler's one-word verdict: IMPLEMENTED, PARTIAL, UNWRITTEN, NOPARSE, NOFN. Exit code is 0 whatever it says, so read the word.
  • t27c symbols <spec> - every name the file declares, with its kind. Answers "does this already exist here?" before you add it.
  • t27c outline <spec> - per function: its locals, what it calls, what it returns. The contract you are implementing against.
  • t27c coverage <spec> - which functions have a test and which do not. The issue asks for tests; this is how you check you wrote them.
  • t27c lint <spec> - style and shape warnings. It OVER-REPORTS has no test or invariant: measured 2026-09-20 over 60 specs it printed 677 of those where coverage found 190 untested functions, disagreeing on 59 of the 60 - it warns about bit_to_trit_pair in specs/base/ternary_encoding.t27, which test bit_to_trit_pair_zero calls on line 249. Read it as a hint; coverage is the answer.
  • t27c typecheck <spec> - types, before generation. Prints Typecheck OK (0 errors, 0 warnings) or the errors.
  • t27c test-report <spec> - builds this spec and runs its own tests, which is what the oracle does. BLOCKED means the generated Zig does not compile, with the error beside it.
  • python3 tools/dupe_scan.py --name <function> - where that function already lives, if it does. 576 of 4021 bodies here are byte-identical copies.

The rest of the toolbelt is in docs/BEE_TOOLBELT.md.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions