Sound numeric representation: finite weight tables with intervals
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Read prodigy/analysis/loops/invariants/bounds/explicit.py and the Measure/GeneratingFunction design in issue #572 first. The issue raises open questions about representation, interval semantics for observe, and how bounds relate to Kleene iteration, so the implementation scope and completion criteria need to be decided before work can start.
Written by the indexing model from the issue text.
Description
Idea
prodigy/analysis/loops/invariants/bounds/explicit.py runs loops on finite weight tables in floating point. Today it only explores loops and plans template parameters; it proposes, it proves nothing. Decided for v0.7.0 (#572): it stays a planner and its type is renamed WeightTable.
A sound numeric representation behind the Measure interface could give fast bounds for every program, also outside the closed-form and product-form fragments:
- Truncation gives lower bounds. A finite table of a non-negative measure misses mass but never adds any, so it is a lower bound, and the missing mass is known exactly.
- Rounding needs directed rounding or interval arithmetic. Each weight is kept as an interval (or rounded down for lower and up for upper bounds), so the reported bound stays proven. egcalc already has
directed_decimal.
The results would be lower bounds, or two-sided bounds where an upper bound on the missing mass is available. They would never be reported as exact.
Open questions
- Is this a representation of
Measure(a "table" next to the generating functions) or only a source of candidates and bounds for the loop rules? - What are the interval semantics of
observe(normalisation divides by an interval)? - How does it relate to Kleene iteration (lower bounds by unrolling), which already gives lower bounds?
Depends on: the Measure/GeneratingFunction design of #572.
- Dominant language
- Python
- Stars
- 6
- Forks
- 2
- Avg merge
- 1h 52m
- Merged PRs (30d)
- 187
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from LKlinke/Prodigy
-
area: engines bug priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
area: gui bug priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
area: gui bug priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
area: engines bug priority: medium
Maintainers usually reply within 1 day
-
area: maintenance priority: low
Maintainers usually reply within 1 day
Similar issues
-
docs(contributing): the two things that silently block a PRPossibly taken A pull request linked to this issue is open or already merged. Openavailable documentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 95/100
Nixitov/Riptide-Native#944 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
JTHCode/secretguard#24 ·
Maintainers usually reply within 1 day
-
area: middleware documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 ·
Maintainers usually reply within 1 day