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

[K-Bug] Broken "Non-exhausive match" warning

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

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

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
領域
compilers

調査の方向性

The reproducer is in a.k; begin by running kompile a.k with K v7.1.104 and confirm the non-exhaustive match warning. Compare it with the version where the parentheses around item are removed, and consider the issue complete when the original definition compiles without that warning.

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

説明

What component is the issue in?

Front-End

Which command
  • kompile
  • kast
  • krun
  • kprove
  • kprovex
  • ksearch
What K Version?

K version: v7.1.104-0-g34892bf1cc Build date: Mi aug 14 01:57:38 EEST 2024

Operating System

Linux

K Definitions (If Possible)

a.k:

module A
    syntax Item ::= "item"
    syntax ItemList ::= List{Item, ","}

    syntax ItemList ::= reverse(ItemList)  [function, total]
                      | #reverse(ItemList, ItemList)  [function, total]
    rule reverse(L:ItemList) => #reverse(L, .ItemList)
    rule #reverse(.ItemList, R) => R
    rule #reverse((P:Item , L:ItemList), R)
        => #reverse(L, (P , R))

    syntax A  ::= "a"
                | b(ItemList)
    rule a => b((item))
endmodule
Steps to Reproduce
$ kompile a.k
[Warning] Compiler: Non exhaustive match detected:
`#reverse(_,_)_A_ItemList_ItemList_ItemList`(_,_)
        Source(/mnt/data/pi-squared/rust-demo-semantics/tmp/a.k)
        Location(6,25,6,72)
        6 |                           | #reverse(ItemList, ItemList)  [function, total]
          .                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Note that if the parentheses around item in rule a => b((item)) are removed, the warning dissapears.

Expected Results

No "Non-exhausive match" warning.

主要言語
Python
スター
598
フォーク
164
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

runtimeverification/k のほかの issue

runtimeverification/k の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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