Commit d4f52ea7

d4f52ea7d0bbMerged

Yukihiro "Matz" Matsumoto <[email protected]> · 5 months ago · 2 files · ~2 modified

Description

docs: update RBS-EXTRACT.md for the C extractor and seed loader

The extractor is tools/spinel_rbs_extract.c and the seed loader is apply_rbs_seeds in src/analyze.c (reached via the SPINEL_RBS_SEED env var before the inference fixpoint), not the retired spinel_analyze.rb. Fix the intro and the seed-format section accordingly; the type vocabulary, member, subset, and format tables already match the C extractor's emitted tags and records. Refresh the same stale references in the box.seed worked example's comment header.

Co-Authored-By: Claude Opus 4.8 [email protected]

Details

Commit
d4f52ea7d0bb
Parent
03239254a1d7

docs/RBS-EXTRACT.mdmodifiedView file

@@ -1,10 +1,13 @@
11 # spinel_rbs_extract — supported RBS subset
22
3-`spinel_rbs_extract` reads `*.rbs` files and emits a line-oriented seed
4-file that `spinel_analyze` consumes when invoked with `spinel --rbs DIR`.
5-The seeded types are **advisory**: inference still runs on top, and the
6-analyzer widens on observed contradiction, so the seed file is never
7-load-bearing — a wrong or unrepresentable seed is at worst a no-op.
3+`spinel_rbs_extract` (`tools/spinel_rbs_extract.c`) reads `*.rbs` files
4+and emits a line-oriented seed file. When `spinel --rbs DIR` is given,
5+the driver runs the extractor over `DIR`, hands the seed file to the
6+compiler through the `SPINEL_RBS_SEED` environment variable, and the
7+analyzer applies it before the inference fixpoint. The seeded types are
8+**advisory**: inference still runs on top, and the analyzer widens on
9+observed contradiction, so the seed file is never load-bearing — a wrong
10+or unrepresentable seed is at worst a no-op.
811
912 Anything outside the subset below is silently dropped: the seed line
1013 isn't emitted, and the analyzer falls back to its normal inference for
@@ -103,8 +106,9 @@
103106
104107 ## Seed file format
105108
106-Consumed by `load_rbs_seeds` / `apply_rbs_seeds` in
107-`spinel_analyze.rb`:
109+Read and applied by `apply_rbs_seeds` in `src/analyze.c` (it both parses
110+the seed file and pins the named params / returns / ivars before the
111+inference fixpoint):
108112
109113 ```
110114 class <QualifiedName> # enter class scope; nested names use `_`