GiNaC term order of printed closed forms is not reproducible across processes
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
Research direction
Start in LKlinke/prodigy-ginac-bindings at the closed-form printing path and use the distribution_header and Tracer.snapshot workarounds referenced from #553 to identify order-dependent behavior. Add or adapt a test that prints the same expression in two fresh processes with different PYTHONHASHSEED values and compares the text. The change is complete when output is independent of hash seed and prior computations, and the call-order workarounds are removed or reworded.
Written by the indexing model from the issue text.
Description
Found in #553 (exists on main).
GiNaC's term order in printed closed forms depends on the hash seed and on what the process computed before, since GiNaC's symbols are shared within a process. Two fresh runs of main print 17_die_even_invariant with different term orders. The values are the same; only the text of closed forms differs.
Consequences:
- A byte comparison of GiNaC output (golden and JSON comparisons in refactoring PRs) needs
PYTHONHASHSEED=0and a fresh process per program. - Users can see the same result printed differently between runs.
- A refactoring that only reorders engine calls changes the printed output (#553 had to restore the call order in
distribution_headerandTracer.snapshot).
The fix belongs in LKlinke/prodigy-ginac-bindings (a canonical print order), not in Prodigy.
Done when
- The printed form of a GiNaC closed form is the same across processes and hash seeds, and independent of earlier computations in the process.
- A test in the bindings (or in Prodigy's engine tests) prints the same expression in two fresh processes with different hash seeds and compares the text.
- Prodigy's workarounds that depend on the call order (the comments in
distribution_headerandTracer.snapshotfrom #553) are removed or reworded.
- 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