[K-Bug] Two configuration declarations in a single module produces an unhelpful error message
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- compilers
Research direction
Start by saving the provided definition as tmp.k and running kompile tmp.k to reproduce the malformed external cell error. Trace the configuration-declaration validation in the kompile front end; done means two declarations in one module produce a clear diagnostic explaining the one-declaration limit and how to resolve it.
Written by the indexing model from the issue text.
Description
What component is the issue in?
Front-End
Which command
- kompile
- kast
- krun
- kprove
- kprovex
- ksearch
What K Version?
v7.1.170-0-g5c84d48f69
Operating System
Linux
K Definitions (If Possible)
module TMP
imports INT
configuration <extraLocalConfig> 1 </extraLocalConfig>
configuration <mainConfig> <extraLocalConfig/> </mainConfig>
endmodule
Steps to Reproduce
Save above definition to tmp.k and run kompile tmp.k.
An error message of the form below will be emitted:
[Error] Compiler: Malformed external cell in configuration declaration.
Source(/home/stephen/rv/tmp.k)
Location(4,30,4,49)
4 | configuration <mainConfig> <extraLocalConfig/> </mainConfig>
. ^~~~~~~~~~~~~~~~~~~
[Error] Compiler: Had 1 parsing errors.
Expected Results
I expect to get an error that says something like:
A module may only have up to one configuration declaration; please merge the two configuration declarations into one (or) put the two configuration declarations into separate modules.
I just made this on the fly --- there is definitely a better way to word it, but this is just for a start.
- 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