Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[K-Bug] The LLVM backend ignores rule priorities

Aperta
#4,676 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
linux
Ambito
compilers

Direzione di ricerca

Start with the minimal definition in a.k and input in a.in, then run kompile followed by krun to reproduce the LLVM backend result. Compare the priority and requires cases described in the issue; done means both produce b rather than c and neither enters an infinite loop.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

What component is the issue in?

llvm-backend

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

v7.1.164-0-g459fdd7b84

Operating System

Linux

K Definitions (If Possible)

a.k:

module A
  imports K-EQUAL-SYNTAX

  syntax Stuff ::= "a" | "b" | "c"

  rule A:Stuff => b requires A ==K a [priority(10)]
  rule a => c

endmodule
Steps to Reproduce

use this a.in file:

a

Then, kompile a.k && krun a.in produces

<k>
  c ~> .K
</k>

This is wrong, it should have produced b instead of c.

A few more notes:
Commenting out rule a => c produces b as a result. Removing the requires clause from rule A:Stuff => b requires A ==K a makes the backend enter an infinite loop. Replacing the same rule with rule a => b, while keeping the priority produces the expected result.

Expected Results

The command above should have produced this (both in the main case described above and in the infinite loop one):

<k>
  b ~> .K
</k>
Lingua principale
Python
Stelle
591
Fork
163
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di runtimeverification/k

Tutte le issue di runtimeverification/k

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.