[K-Improvement] <Allow Fragment-Style Configuration Cell Operations for Concatenation? >
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Domain
- compilers
Research direction
Start with the SIMPLE-DYNAMIC tutorial's ControlCellFragment examples and reproduce the kompile mismatch for the concatenated C and A fragment. Trace how configuration fragments are matched; done should be a confirmed single-rule approach or a precisely scoped change that supports the requested concatenation.
Written by the indexing model from the issue text.
Description
Configuration cell operations are very common in semantic implementations. Stack push/pop operations are required when implementing function calls/returns. In the SIMPLE-DYNAMIC tutorial, because it only needs to change the values of the fstack and returnType cell, it uses ControlCellFragment to quickly select other parts of the control cell, as shown below:
<control>
<fstack> .List => ListItem(fstackFrame(T',Env,K,C)) ...</fstack>
<returnType> T' => T </returnType>
C
</control>
Here, fstackFrame is the structure for stack information, with its definition consistent with SIMPLE-DYNAMIC:
syntax KItem ::= fstackFrame(Type,Map,K,ControlCellFragment)
However, in my project, the control cell has been expanded with several other modules, structured as:
<control>
<fstack> .List ...</fstack>
<xstack> .List ...</xstack>
<lstack> .List ...</lstack>
<otherStacks> .List ...</otherStacks>
// some other cells here
<returnType> T => T' </returnType>
</control>
In most cases, my function call operations, like those in SIMPLE-DYNAMIC, only need to modify the fstack and returnType values. However, in a few instances, modifications and stack operations are required for other parts of the control cell simultaneously, as below:
<control>
<fstack> .List => ListItem(fstackFrame(T',Env,K, <This place should store `C` and `<A> OLDA </A>`>)) ...</fstack>
<returnType> T' => T </returnType>
C
<A>
OLDA =>
<A1> some new value here </A1>
<A2> some new value here </A2>
</A>
</control>
The issue arises when I find that C <A> OLDA </A> cannot be recognized as a ControlCellFragment class; kompile tells me it does not match, even though concatenating them still forms part of the control cell.
I wish to maintain consistency in push/pop operations, so I prefer not to modify the definition of fstackFrame. Due to certain limitations in my language, I aim to complete this modification and stack operation in a single rule (i.e., it cannot be split into two KItems to perform the configuration modifications).
Could you advise on allowing fragment-style configuration cell operations for concatenation, or suggest an alternative approach to achieve this within a single rule?
- 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