Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

non-evaluator attribute requires manual propagation across entire call chain

オープン
#4,904 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
haskell
領域
compilers

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

area:haskell-backend area:llvm-backend priority:p2 status:icebox type:feature

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
  • A is marked non-evaluator
  • B is not marked non-evaluator
  • When the Haskell backend simplifies B(42), since B is not non-evaluator, it sends B(42) to the LLVM backend
  • The LLVM backend attempts to evaluate, unfolds the rule, and encounters A(42) — but A is non-evaluator and the LLVM backend cannot handle it correctly
  • Workaround: manually add non-evaluator to B as well. But then all callers of B also 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-evaluator functions and handles them itself
  • The LLVM backend gracefully returns unevaluated terms when encountering non-evaluator functions

Suggested First Steps

Before choosing a solution, some investigation is needed:

  1. Find the original PR/issue that introduced non-evaluator to understand the design intent
  2. Survey non-evaluator usage in projects other than mir-semantics — do they encounter the same propagation problem?
  3. Assess the semantics of non-evaluator in concrete execution (pure LLVM backend) scenarios (currently a potential concern, no observed issues yet)

Acceptance Criteria

  • Research non-evaluator introduction history and usage across projects
  • Identify root cause and solution direction
  • Implement and verify
主要言語
Python
スター
591
フォーク
163
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

runtimeverification/k のほかの issue

runtimeverification/k の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。