Obligation chains re-parse the engine's text into SymPy for every obligation (GiNaC)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 53/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- python
- Domain
- performance
Research direction
Read ClosedForm.of, sympify_symbolic_string, and the shared-chain code introduced in #556 to trace how GiNaC expressions are converted for each obligation. Profile the rw_counter_23 certificate with GiNaC before and after the change, then run make golden; done means each distribution is converted at most once per check and the golden results do not change.
Written by the indexing model from the issue text.
Description
Found while profiling rule PR 3b (#552); new cost since the shared chains of #556, visible on GiNaC.
ClosedForm.of calls sympify_symbolic_string, which calls parse_expr on the GiNaC text, once per obligation. For one certificate of rw_counter_23 that is 5 parses of about 3 s each, and with to_product_form (together) it makes up nearly all of the 20 s per certificate on GiNaC (Ψ itself takes about 1 s).
Proposal
Convert a distribution to its ClosedForm once per distribution and cache it, or pass the engine expression without going through text.
Done when
- Each distribution is converted at most once per check.
- Measured before and after on
rw_counter_23(GiNaC).make goldenchanges no result.
- 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