Repository navigation
[TS PBT] Search bounded generator choices while preserving dependent input structure #400
Description
Current state (2026-10-14)
Audited against usvm main at 19866c959d.
Declared ArrayIndexGenerator joint support is projected directly after #407. This preserves a bounded dependency but does not execute or symbolically search native fast-check generator choice traces.
Remaining acceptance boundary
Implement bounded generator-choice capture/search/replay with pinned generator identity and valid dependent construction. Keep direct support projection distinct from distribution/bias and preserve generator validity during shrinking.
Original report and acceptance context, retained for traceability
Part of the full #345 delivery. Builds on #395, #351/#352/#353 and #354. This is a required bounded research implementation, not a promise to symbolically execute arbitrary JavaScript generators.
Delivery stage
This is a stage-two extension of #345. Complete and record the core assessment in #405 before accepting this extension's end-to-end integration and results. Literature, interface design and focused experiments may start earlier; the extension never blocks #355 or #405.
Reuse the completed core contracts. This issue owns any extension-specific changes to observation, binding, scheduling, replay, shrinking and feedback integration, with focused follow-up PRs; do not retroactively broaden #351/#352 or require already completed core issues to reopen. A negative or inconclusive pilot is recorded honestly and informs design; it does not silently cancel this full-roadmap obligation.
Publish a separately identifiable extension configuration and evaluate it against the same original oracle with the extension disabled. Its final held-out evaluation belongs to #357 and is reported separately from the development pilot.
Goal
Reuse PBT generator construction semantics by searching a bounded sequence of generator choices when independent symbolic input domains lose essential structure.
Scope
- Choose and document a supported generator subset from development examples: bounded dependent tuples/collections, constrained indices, and at least one structured construction beyond independent primitives.
- Retain the concrete generator as authoritative. Expose a versioned-by-source-hash deterministic choice trace through a small adapter, with decision kind, bounds, dependencies and size/depth limits. Do not mistake a PRNG seed for an invertible description of all generator choices.
- Define the exact relation x = G(choices) for the supported construction; either lower the bounded construction to EtsIR or provide explicit checked combinator semantics. Respect concrete rejection, map/filter/chain dependencies and generation limits.
- Search choices using the original predicate or feedback target on x; replay the choice trace through the original generator, then validate x using the original property. Distinguish invalid choice traces from domain/precondition rejection and symbolic divergence.
- A bound on choice count/size defines a bounded search space. Report omitted support; no claim of full generator coverage or uniform sampling.
- Preserve useful native shrinking context when available. Integrate choice/value reduction with [TS PBT] Confirm, classify and shrink symbolic property and hypothesis witnesses #353 and prove by concrete recheck that dependent relationships and the same failure remain. Replay tokens are revision-specific.
- Compare direct domain projection, rejection-based generation and choice-space search at equal total budgets. Keep concrete-only generators usable without fabricating symbolic support.
Definition of Done
- One supported dependent generator with a nontrivial structural relationship works end to end: PBT trace, symbolic choice search, original-generator replay, original-oracle confirmation and reduction or explicit shrink limitation.
- Invalid/stale traces, filtered choices, dependence on earlier choices and bounded recursion/size have tests.
- A capability table and actual author/adapter effort are reported; unsupported native arbitrary objects/closures are explicit.
- [TS PBT] Evaluate causal contributions of property-aware feedback and bounded extensions #357 evaluates benefit and regressions on a held-out supported subset; the full version cannot substitute an unsupported-only placeholder for this implementation.
Activity