cli: search expected source types iteratively
This commit is contained in:
1 parent
e862e03f2b
commit
e3f4695efe
5 files changed
+504
-57
No files matched your search
@@ -529,4 +529,6 @@ The [expression-query increment](source-expression-depth-audit.md#expression-typ
|
||||
|
||||
A subsequent finite source probe, `let n = 1; return - … n;` in an i64 function, accepts 1,024 negations but aborts without stdout JSON at 16,384 in `useIn`, during expected-use inference for the unsuffixed binding. Its raw evidence is in the linked audit. Q-061 remains open for that confirmed path and the other unverified paths above.
|
||||
|
||||
The [expected-use increment](source-expression-depth-audit.md#expected-use-query-continuations) repairs that mutual expression/statement/block query path. It preserves lazy hint queries, search order, cast hint removal and the outer let rebinding barrier; deep inferred unary checks accept through 65,536 and missing hints retain E7007. No new inference or acceptance limit is introduced. Follow-up finite probes now confirm separate native failures at 1,024 levels in binary lowering, parenthesized parsing and generic expression transformation. Q-061 remains open for those observed paths and the remaining inventory.
|
||||
|
||||
Audit these paths separately with finite public/generated source inputs before claiming whole-frontend bounded native-stack processing. Prefer explicit continuations preserving existing syntax, evaluation/query order, diagnostics and OOM behavior. A new depth rejection requires a normative decision; Q-059's type-traversal resolution does not authorize one.
|
||||
@@ -166,20 +166,66 @@ No normative rule, source/AIR format, feature, error code, bundle text,
|
||||
ownership/runtime behavior or acceptance limit changes. Q-061's other paths
|
||||
remain open; this increment has no fresh Claude review.
|
||||
|
||||
## Remaining work
|
||||
## Expected-use query continuations
|
||||
|
||||
After the query repair, `let n = 1; return - … n;` in an i64 function accepts
|
||||
After the preceding query repair, `let n = 1; return - … n;` in an i64 function accepts
|
||||
16 and 1,024 negations, but at 16,384 aborts in `useIn` while inferring the
|
||||
unsuffixed binding's type. The failing check returns -6 with empty stdout and
|
||||
repeated `useIn` frames. Evidence is retained as `inferred-use-depth-before.json`
|
||||
and `inferred-use-neg-16384.stdout/.stderr`. This confirms the next expected-use
|
||||
query failure independently of the repaired `peekType` path.
|
||||
|
||||
Other expression and statement paths, including parenthesized/nested primary
|
||||
parsing, `useIn`, generic `expression`/`walk` and lowering's other recursive
|
||||
expression/block handlers, need separate probes and repairs. Beyond the `useIn`
|
||||
case above, their complete depth behavior is unverified here. The formatter's
|
||||
expression-marking traversal
|
||||
already uses a worklist, as inspected and exercised by the deep syntax-only
|
||||
probes. Q-061 and Phase 6 remain open; Q-060's unfinished full GC validation is
|
||||
independent. No fresh Claude review covers these expression increments.
|
||||
`useIn`, `usesInStmt` and `usesInBlock` now share an explicit request worklist.
|
||||
It retains first-known use, left/right and call-argument order, condition/then/
|
||||
else order, statement-before-tail order, return hints and cast hint removal.
|
||||
Comparison/shift right-hand hints and the second for bound are queried only
|
||||
after the earlier use fails. The outer `inferUses` rest cursor and top-level
|
||||
let rebinding barrier are unchanged; nested blocks and skipped expression/
|
||||
statement kinds retain their original policy. No new inference is introduced.
|
||||
|
||||
The requests are host metadata, released on success/error; hint type nodes
|
||||
retain their caller-arena lifetime. As in other best-effort type queries,
|
||||
metadata OOM produces unknown without a diagnostic or instructions. This adds
|
||||
allocation requests and does not promise identical failure-index outcomes.
|
||||
Plain unary descent is a loop without work allocations. Runtime memory,
|
||||
ownership, fuel and verifier rules are unchanged; no normative rule, format,
|
||||
feature, error code, source/reference bundle or acceptance limit is added.
|
||||
|
||||
The independent old expected-use descent and outer cursor compare 967 shallow
|
||||
expression, statement/block and two-scope combinations. Name/signature/type
|
||||
queries are shared and outside that oracle's independence. Separate tests cover
|
||||
32,768 unary and mixed branch/call groups, 32,768 nested statement blocks,
|
||||
deferred-hint allocation traps and every worklist backing-allocation failure.
|
||||
They check complete cleanup and no query diagnostic/output; helper fixtures do
|
||||
not establish arbitrary deep source acceptance.
|
||||
|
||||
The baseline 16,384-negation source now accepts without stdout/stderr
|
||||
(`inferred-use-depth-repaired.json`). Permanent CLI tests check inferred
|
||||
negations through 65,536, exact instruction counts and fuel/source/AIR/hosted
|
||||
results through 1,024. Cast-cleared context still returns E7007 at the unsuffixed
|
||||
initializer through 65,536 negations across check/lower/run/report/explore.
|
||||
|
||||
Final build/unit/format checks and all 1,793 ordinary conformance cases pass
|
||||
with exact unique corpus coverage (`source-use-query-conformance.jsonl` and its
|
||||
audit). The permanent expression-depth suite passes 186 checks; non-value and
|
||||
independent-error suites pass 635/234 checks. These do not complete Q-060's
|
||||
per-step GC validation or measure model capability.
|
||||
|
||||
Fixed pre/post executables retain exact exit/stdout/stderr for all 1,423 public
|
||||
source checks and 506 successful lowerings (`source-use-query-cli-compatibility.json`).
|
||||
|
||||
## Remaining work
|
||||
|
||||
Follow-up probes after the expected-use repair accept 16 levels but abort at
|
||||
1,024, with empty stdout, in three independent paths: a left-associated
|
||||
`1i64 + … + 1i64` chain in `Lowerer.binary`; nested parentheses in the parser's
|
||||
primary/postfix expression path; and a unary chain in a specialized generic
|
||||
function body in `generics.expression`/`walk`. Evidence is retained as
|
||||
`post-use-query-depth-probes.json` and `post-use-*.stdout/.stderr`. These are
|
||||
observed native failures, not normative depth rejections.
|
||||
|
||||
Other expression/block handlers and their complete depth behavior need further
|
||||
auditing. The formatter's expression-marking traversal already uses a worklist,
|
||||
as inspected and exercised by the deep syntax-only probes. Q-061 and Phase 6
|
||||
remain open; Q-060's unfinished full GC validation is independent. No fresh
|
||||
Claude review covers these expression increments.
|
||||
Reference in new issue
Block a user