Guards and observe: split conditions by cases like get_probability_of
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 43/100
Research direction
Start by reading the shared PGF logic where filter and CASE_SPLIT_LIMIT are defined, then compare it with Distribution.get_probability_of and the guard and observe analysis paths. Add conformance coverage for both engines, including conditions beyond the limit, and run the relevant tests plus guard fuzzing. Done means eligible conditions are analysed exactly through shared case analysis, while over-limit conditions still raise “not implemented” naming the condition.
Written by the indexing model from the issue text.
Description
Found in #532 (P4d). Distribution.get_probability_of splits a condition by cases when filter cannot compute it directly (e.g. x + y < 2 with y of infinite range but x of finite range). Guards of if and while and observe conditions use filter directly, which raises "not implemented" for the same conditions.
Making filter itself split by cases (with the same CASE_SPLIT_LIMIT and the same order of cases, in the shared PGF logic) would let the analysis handle more programs. This is a feature, not part of the behaviour-preserving v0.7.0 milestone.
Done when
- Guards and
observeconditions thatget_probability_ofcan decide by cases are analysed exactly on both engines, through one shared case analysis (no copy per engine). - Conditions beyond the limit still end with "not implemented" naming the condition.
- Conformance tests on both engines; fuzzing covers guards of this shape.
🤖 Generated with Claude Code
- 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