Case splits for conditions on sums: guards, observe, and two variables of infinite support

Open
#320 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
backend, testing

Research direction

Start with #316 to understand how the existing case split computes Pr[x + y < 3] when one summand has finite support, then trace the guard and observe handling and the three engine entry points. Check how the loop strategies discussed in #225 handle guards comparing variables. Done means both cases work exactly for Pr, if, while guards, and observe on all three engines, with tests.

Written by the indexing model from the issue text.

Description

area: analysis area: language enhancement priority: medium

Found in #316. Exists on main.

#316 computes Pr[x + y < 3] by a case split when one summand has finite support. Still missing:

  • Guards and observe on such conditions (if (x + y < 3) with finite-support x and infinite-support y) end the analysis with "not computable on infinite generating function"; the same case split applies.
  • Both variables of infinite support (two geometric variables): only finitely many values of each can satisfy x + y < 3, so a case split can first restrict x to the values the condition allows.

Done when

  • Both cases are computed exactly on all three engines for Pr, if, while guards and observe; tests. Related: #225 (guards comparing two variables in loop strategies).

🤖 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from LKlinke/Prodigy

All issues in LKlinke/Prodigy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.