Context
specs/tri/collections/bitvector.t27 declares module TriBitvector in 92 lines. 8 of its functions are declared with a body that holds no statement — a signature and a comment where the implementation belongs.
.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.
Current state — re-run these yourself
$ cd /Users/playom/t27
$ t27c gen specs/tri/collections/bitvector.t27 2>&1 | grep -c 'not yet implemented'
8
$ t27c spec-status specs/tri/collections/bitvector.t27
IMPLEMENTED
Use t27c, not the t27c on PATH: the PATH build prints no parse metrics at all, so the grep above returns nothing and an empty result reads as a pass.
What to write
Keep every signature exactly as it is — the signature is the contract. Quoted verbatim from the file:
- line 23 —
fn empty() -> BitVector
- line 28 —
fn with_capacity(bits: usize, allocator: std.mem.Allocator) -> !BitVector
- line 33 —
fn push(bv: *BitVector, bit: bool, allocator: std.mem.Allocator) -> !void
- line 38 —
fn pop(bv: *BitVector) -> ?bool
- line 43 —
fn get(bv: BitVector, index: usize) -> bool
- line 48 —
fn set(bv: *BitVector, index: usize, value: bool) -> void
- line 53 —
fn len(bv: BitVector) -> usize
- line 58 —
fn append(bv: *BitVector, other: BitVector, allocator: std.mem.Allocator) -> !void
The file already has 0 test block(s). Add one for each function you implement; a body with nothing asserting on it is a claim, not a result.
Acceptance criteria
-
t27c gen specs/tri/collections/bitvector.t27 > /tmp/t27-gen.zig && grep -c 'not yet implemented' /tmp/t27-gen.zig prints 0
-
t27c spec-status specs/tri/collections/bitvector.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.)
-
- with criterion 1 satisfied, all 8 names above still exist:
grep -cE '^\s*(pub )?fn (empty|with_capacity|push|pop|get|set|len|append)\(' specs/tri/collections/bitvector.t27 prints 8
-
grep -cE '^[[:space:]]*test[[:space:]]+("|[A-Za-z_])' specs/tri/collections/bitvector.t27 prints at least 8 (today: 19)
Boundary
specs/tri/collections/bitvector.t27
Context
specs/tri/collections/bitvector.t27declares moduleTriBitvectorin 92 lines. 8 of its functions are declared with a body that holds no statement — a signature and a comment where the implementation belongs..t27is the hand-authored source language.t27ccompiles it out to C, Rust, Verilog and Zig. You are writing source, not compiler output, and not prose about an implementation.Current state — re-run these yourself
Use
t27c, not thet27con PATH: the PATH build prints no parse metrics at all, so the grep above returns nothing and an empty result reads as a pass.What to write
Keep every signature exactly as it is — the signature is the contract. Quoted verbatim from the file:
fn empty() -> BitVectorfn with_capacity(bits: usize, allocator: std.mem.Allocator) -> !BitVectorfn push(bv: *BitVector, bit: bool, allocator: std.mem.Allocator) -> !voidfn pop(bv: *BitVector) -> ?boolfn get(bv: BitVector, index: usize) -> boolfn set(bv: *BitVector, index: usize, value: bool) -> voidfn len(bv: BitVector) -> usizefn append(bv: *BitVector, other: BitVector, allocator: std.mem.Allocator) -> !voidThe file already has 0
testblock(s). Add one for each function you implement; a body with nothing asserting on it is a claim, not a result.Acceptance criteria
t27c gen specs/tri/collections/bitvector.t27 > /tmp/t27-gen.zig && grep -c 'not yet implemented' /tmp/t27-gen.zigprints0t27c spec-status specs/tri/collections/bitvector.t27does not printNOPARSE- 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.)grep -cE '^\s*(pub )?fn (empty|with_capacity|push|pop|get|set|len|append)\(' specs/tri/collections/bitvector.t27prints8grep -cE '^[[:space:]]*test[[:space:]]+("|[A-Za-z_])' specs/tri/collections/bitvector.t27prints at least8(today: 19)Boundary
specs/tri/collections/bitvector.t27