runtimeverification / runtimeverification/llvm-backend

[GDB] Can't print builtin types on LHS of rules in `K Match`

Open
#746 16 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug debugger
Dominant language
C++
Stars
43
Forks
22
PR merge metrics
No merged PRs in 30d

Description

GDB Types to Fix:

  • Int
  • Float
  • Bool
  • String
  • List
  • Map
  • Set

Given the K definition:

module TEST
  imports INT
  imports STRING
  
  syntax Foo ::= foo(Int)
  syntax FooString ::= fooString(String)

  rule [test]: foo(42) => .K
  rule [testString]: fooString("Hello World!") => .K
endmodule

Kompile:

kompile test.k --enable-llvm-debug --syntax-module TEST

Krun and GDB with Int:

krun -cPGM='foo(0)' --debugger

(gdb) k start
...
(gdb) k match TEST.test subject
INT.size_int(0) => 0
Traceback (most recent call last):
  File "<string>", line 794, in invoke
gdb.error: No type named SortMInt{Sort32{}}.

Python Exception <class 'gdb.error'>: No type named SortMInt{Sort32{}}.
Error occurred in Python: No type named SortMInt{Sort32{}}

Krun and GDB with String:

 krun -cPGM='fooString("Hi")' --debugger 

(gdb) k start
...
(gdb) k match TEST.testString subject
KEQUAL.eq(0x7ffff5400080, 0x2e5310 <token_48656c6c6f20576f726c6421>) => false
Traceback (most recent call last):
  File "<string>", line 794, in invoke
gdb.error: No type named .

Python Exception <class 'gdb.error'>: No type named .
Error occurred in Python: No type named .

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is identified. Reproduce the issue with the shown kompile, krun, and GDB commands, starting with k match TEST.test subject for the Int case and then the String case. Done means GDB can print or match rules with the listed builtin types without reporting missing types.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.