HydroRoll-Team / HydroRoll-Team/OneRoll
[RFC-0006] Program Sampling and Exact Analysis Scope
- Dominant language
- Python
- Stars
- 3
- Forks
- 1
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 2
Description
Status: Draft
Target: v2.1
## Context
OneRoll exposes sampling helpers today, while the Program language introduces typed list dice, validators, option pipelines, functions, and branches that are not all tractable for exact probability analysis. The product must distinguish deterministic sampling from exact analysis.
## Draft contract delivered
Commit `bf2feeb` adds the RFC-0006 draft and machine-checked artifacts:
- `Engine.sample` executes a complete Program through `Engine.run_batch` with the RFC-0002/RFC-0004 seed and budget protocols.
- `Engine.analyze_exact` accepts one Instruction, accepts no seed, and never falls back to sampling.
- `AnalysisValue` materializes RollSet items without inventing RFC-0003 RollNodes.
- The provisional matrix classifies every v2 construct as supported, bounded, or unsupported.
- Normative rational tables cover numeric dice, keep-high, weighted lists, and ordered weighted unique draws.
- Exact state, support, operation, byte, and rational-bit limits remain provisional pending #32 and #33.
## Decisions required
- Final exact-analysis support matrix by Value, dice source, Validator, Option, and control-flow construct.
- Acceptance of sequential probability-proportional-to-remaining-weight unique draws.
- Final complexity/cardinality defaults and hard maxima.
- Acceptance of Wilson 95% histogram intervals, unbiased sample variance, and nearest-rank quantiles.
- Acceptance of the one-Instruction exact boundary and explicit no-fallback rule.
## Acceptance criteria
- [x] A Draft RFC document and machine-checked contracts are committed under `docs/rfcs/`.
- [x] The Draft defines an explicit tested subset and prohibits silent fallback.
- [x] Weighted-list and without-replacement examples have normative rational distributions.
- [x] Repeat, conditionals, variables, and option combinations are provisionally classified.
- [x] Seeded sampling is specified against the same Engine semantics, typed results, and resource budgets as ordinary Program execution.
- [x] Stable unsupported and too-complex error codes are specified.
- [ ] #32 reproduces the tables and supplies complexity evidence.
- [ ] #33 accepts the final matrix and limits.
- [ ] Human review moves the RFC from Draft to Review/Accepted.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Draft RFC and machine-checked artifacts under docs/rfcs/, then inspect the Engine.sample and Engine.analyze_exact entry points described in the issue. Review #32 and #33 for the complexity evidence and final matrix decisions; done requires resolving the listed decisions and moving the RFC from Draft to Review or Accepted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100