non-evaluator attribute requires manual propagation across entire call chain
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by finding the original PR or issue that introduced the non-evaluator attribute, then survey its use outside mir-semantics, including the EXPERIMENT-no-llvm-kompile-updated branch. Trace how the Haskell backend sends call chains and requires clauses to the LLVM backend; done means identifying the root cause, choosing a solution direction, and implementing and verifying it.
Written by the indexing model from the issue text.
Description
Problem
The non-evaluator attribute marks a function so it is not evaluated by the LLVM backend. However, in practice, marking a single function as non-evaluator is not enough — every function in the call chain above it must also be manually marked, otherwise the Haskell backend will still send the caller to the LLVM backend, which then encounters a non-evaluator function it cannot handle.
Example:
syntax Int ::= A(Int) [function, non-evaluator]
syntax Int ::= B(Int) [function]
rule B(X) => A(X) +Int 1
Ais markednon-evaluatorBis not markednon-evaluator- When the Haskell backend simplifies
B(42), sinceBis notnon-evaluator, it sendsB(42)to the LLVM backend - The LLVM backend attempts to evaluate, unfolds the rule, and encounters
A(42)— butAisnon-evaluatorand the LLVM backend cannot handle it correctly - Workaround: manually add
non-evaluatortoBas well. But then all callers ofBalso need it, and so on — propagating up the entire call chain
The same issue occurs when a requires clause references a non-evaluator function.
This was discovered in the mir-semantics project (EXPERIMENT-no-llvm-kompile-updated branch), which has many functions unsuitable for LLVM backend execution.
Expected Behavior
non-evaluator should not require manual propagation. Possible directions:
- The compiler automatically analyzes the call graph and propagates the attribute
- The Haskell backend recognizes when a term contains
non-evaluatorfunctions and handles them itself - The LLVM backend gracefully returns unevaluated terms when encountering
non-evaluatorfunctions
Suggested First Steps
Before choosing a solution, some investigation is needed:
- Find the original PR/issue that introduced
non-evaluatorto understand the design intent - Survey
non-evaluatorusage in projects other than mir-semantics — do they encounter the same propagation problem? - Assess the semantics of
non-evaluatorin concrete execution (pure LLVM backend) scenarios (currently a potential concern, no observed issues yet)
Acceptance Criteria
- Research
non-evaluatorintroduction history and usage across projects - Identify root cause and solution direction
- Implement and verify
- 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