Context
specs/tri/collections/stack.t27 declares module TriStack in 70 lines. 5 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/stack.t27 2>&1 | grep -c 'not yet implemented'
5
$ t27c spec-status specs/tri/collections/stack.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 22 —
fn empty() -> Stack(T)
- line 27 —
fn push(stack: Stack(T)) -> void
- line 32 —
fn pop(stack: Stack(T)) -> void
- line 37 —
fn peek(stack: Stack(T)) -> void
- line 42 —
fn is_empty(stack: Stack(T)) -> 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/stack.t27 > /tmp/t27-gen.zig && grep -c 'not yet implemented' /tmp/t27-gen.zig prints 0
-
t27c spec-status specs/tri/collections/stack.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 5 names above still exist:
grep -cE '^\s*(pub )?fn (empty|push|pop|peek|is_empty)\(' specs/tri/collections/stack.t27 prints 5
-
grep -cE '^[[:space:]]*test[[:space:]]+("|[A-Za-z_])' specs/tri/collections/stack.t27 prints at least 5 (today: 10)
Boundary
specs/tri/collections/stack.t27
Context
specs/tri/collections/stack.t27declares moduleTriStackin 70 lines. 5 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() -> Stack(T)fn push(stack: Stack(T)) -> voidfn pop(stack: Stack(T)) -> voidfn peek(stack: Stack(T)) -> voidfn is_empty(stack: Stack(T)) -> 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/stack.t27 > /tmp/t27-gen.zig && grep -c 'not yet implemented' /tmp/t27-gen.zigprints0t27c spec-status specs/tri/collections/stack.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|push|pop|peek|is_empty)\(' specs/tri/collections/stack.t27prints5grep -cE '^[[:space:]]*test[[:space:]]+("|[A-Za-z_])' specs/tri/collections/stack.t27prints at least5(today: 10)Boundary
specs/tri/collections/stack.t27