Quellcode durchsuchen

docs: corpus snapshot + next language targets (T(x) conversions, SIZE)

After the two-phase/Check work: corpus 365 OK / 0 crash (vs 358
-notwophase). Recorded the two concrete bounded gaps the audit found
(ISO type conversions T(x); SIZE(TYPE)), with the hook points and the
layout caveat.
Eric Streit vor 1 Tag
Ursprung
Commit
858c928b29
1 geänderte Dateien mit 28 neuen und 0 gelöschten Zeilen
  1. 28 0
      docs/analysis_gaps.md

+ 28 - 0
docs/analysis_gaps.md

@@ -134,3 +134,31 @@ results — record/array/set/class — chained post-call method calls
 - **Backend** — procedure values / LONGINT are 8-byte in array load/
 - **Backend** — procedure values / LONGINT are 8-byte in array load/
   store and in the parameter prologue (were 32-bit); driver session
   store and in the parameter prologue (were 32-bit); driver session
   file cap 32 → 128.
   file cap 32 → 128.
+
+## 8. Corpus snapshot after the two-phase parse (2026-10-16)
+
+`tools/v3-corpus/corpus.sh` over the gm2 testsuite (612 files), current
+compiler: **365 compile-OK, 0 CRASH**, `-notwophase` **358** (the
+two-phase parse gains 7, loses none).  Top `LANG` buckets: `not
+supported yet` 36, `undeclared identifier` 35, `invalid call` 28.
+
+Two concrete, corpus-visible language gaps found while auditing those
+
+1. **ISO type conversions `T(x)`** — a type name applied to one value,
+   e.g. `INTEGER(c)`, `CARDINAL(i)`, `ind1(-200)` (a subrange/enum
+   conversion).  Also the `T(x)` form over subranges (`subrange10.mod`
+   uses `ind1(-200)`), and `minmaxreal3.mod`/`colour.mod` recycle it.
+   Today it is `invalid call` (233): the callee resolves to a *type*,
+   not a procedure.  `VAL(T, x)` already works for ordinal/real pairs,
+   so the fix is sugar — but it needs a hook in `Fact` (or `ActParam`)
+   that recognises `dk = KindType` + `(` and lowers to the existing
+   `NkCall("VAL", TypeIdent, expr)` path, plus the matching `Lower`
+   acceptance.  ~28 `invalid call` files are the upper bound.
+2. **`SIZE(TYPE)` / `TSIZE(TYPE)` as expressions** — `sizes.mod`
+   (`SIZE(INTEGER)`, `SIZE(BOOLEAN)`).  `SIZE`/`TSIZE` import fine but
+   are not callable expressions.  **Caution:** V3's layout is not gm2's
+   (`BOOLEAN`/`CHAR` are `w`-wide), so `SIZE` must be defined against
+   *V3's* model before implementing; a wrong value is worse than a
+   230.
+
+Neither is started; both are bounded and corpus-measurable.