Disallow sorts with case-insensitive equal names
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- macos, python
- Domain
- compilers, operating-systems
Research direction
Reproduce the issue with the shown kompile and krun commands on macOS, then inspect the generated LblisFoo.yaml and LblisFOO.yaml files and the decision-tree compilation path. Done means sorts equal up to casing are rejected before their generated files can collide, with coverage for the reported example.
Written by the indexing model from the issue text.
Description
Consider the following definition:
module TEST
imports BOOL
syntax Foo ::= "Foo"
syntax FOO ::= "FOO"
syntax KItem ::= result(KItem, Bool, Bool)
rule F:Foo => result(F, isFoo(F), isFOO(F))
rule F:FOO => result(F, isFoo(F), isFOO(F))
endmodule
We can see by inspection that there is no term X for which isFoo(X) and isFOO(X) are both true. However, on macOS, we can observe the following executions:
$ kompile test.k
$ krun -cPGM='Foo'
<k>
result ( Foo , false , false ) ~> .K
</k>
$ krun -cPGM='FOO'
<k>
result ( FOO , true , true ) ~> .K
</k>
That is, isFoo(Foo) => false, and isFOO(Foo) => true! Both of these rewrites are incorrect.
Some digging reveals that the reason for this is the case-insensitive filesystem on macOS; when decision trees are compiled, files LblisFoo.yaml and LblisFOO.yaml are both generated. However, one of them overwrites the other because of case-insensitivity. This means that the logic for all case-insensitive-equal sorts gets collapsed into one.
The solution (I think) is to disallow sorts that are equal up to casing.
- Dominant language
- Python
- Stars
- 591
- Forks
- 163
- PR merge metrics
- No merged PRs in 30d
Contributor 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 runtimeverification/k
-
runtimeverification/k#4939 · 1 assignee ·
-
Concolic Explorer Open
Difficulty 5/5 Over a week Newbie friendliness 32/100
runtimeverification/k#4937 ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
runtimeverification/k#4936 ·
-
type:epic
runtimeverification/k#4934 · 4 comments · 1 assignee ·
-
runtimeverification/k#4924 · 1 assignee ·
All issues in runtimeverification/k
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100