c4tablestats

command
v0.55.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Command c4tablestats is the C4 stage-2 table-shape analyzer.

spec.c4-bytecode-isa.v1 section 2 marks every static table-shape number in the design brief an estimate and makes running this analyzer the stage-2 precondition: "Stage 2 runs it and pins the outputs before any superinstruction lands." This command produces the committed receipt.

Run it against the grammar blobs the spec names:

go run ./cmd/c4tablestats -out testdata/c4_table_shape.json \
    grammars/grammar_blobs/go.bin \
    grammars/grammar_blobs/javascript.bin \
    grammars/grammar_blobs/json.bin

With -check the command re-measures and compares against the committed receipt instead of rewriting it, so CI can prove the pinned numbers still describe the shipped tables.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL