Language: accept well-defined programs with parameters in constants, typed/bounded parameters, loop(n) and block-local declarations
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
Start with the parser, scope lowering, type checker, and analysis paths named in the issue, then read docs/source/language-design.md and locate language.md. Add coverage for each listed program on both engines, plus a fuzzer or checker test. Done means all cases parse and type-check, analysis either computes a sound result or reports "not implemented" with the construct named, and both language documents describe the accepted forms.
Written by the indexing model from the issue text.
Description
Found while writing the P6 design note (#513). Programs with a well-defined semantics that the parser, the scope lowering or the type checker reject today (all on main). Per the language principle (docs/source/language-design.md), they must be accepted; what the analysis cannot compute ends with "not implemented" naming the construct.
Cases
- A constant defined from a parameter:
param p: real; const q = 1 - p;→ "Variable used in constant definition is not a constant". - Parameters of other types or with bounds:
param b: bool;,param n: nat[0, 5];→ parser error. (A result innholds for all naturaln, so ignoring the bound in the analysis is sound; the bound may still be checked where values are known.) loop(n)withparam n: nat→ parser error; it should parse and end in "not implemented" (or be unrolled symbolically, if a rule covers it).- Scope lowering: the same name declared in two blocks with different types, and local
real/distdeclarations, are rejected at parse time.
Not in scope: param x: dist (an unknown distribution has no simple PGF semantics).
Decided on #513: the keyword param stays (no rename to const).
Done when
- Each case parses and type-checks; the analysis computes it or ends with "not implemented" naming the construct — never a wrong or approximate result.
- Tests per case on both engines, and a fuzzer or checker test that generates such programs.
language.mdandlanguage-design.mddescribe the accepted forms.
- 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
-
Test: to_hijri() accepts datetime.datetime and uses only the date partPossibly taken A pull request linked to this issue is open or already merged. Opengood first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 · 3 comments ·
Maintainers usually reply within 1 day