Skip to content

[AUTOMATED] Let data assertions name a processor address space - #1992

Open
thotypous wants to merge 2 commits into
Noelo-Lab:mainfrom
thotypous:kuna-named-data-assertions
Open

thotypous wants to merge 2 commits into
Noelo-Lab:mainfrom
thotypous:kuna-named-data-assertions

Conversation

@thotypous

Copy link
Copy Markdown
Contributor

A data assertion can identify a global in a named processor address space rather than the default one.

probe=$(mktemp)
printf '\x80\x91\x81\x01\x08\x95' > "$probe"
kuna decompile "$probe" 0x10 --raw-image --target avr8:LE:16:default:gcc \
  --base 0x10 --assert-strict --assert 'data [mem,0x181] unsigned char named_sample'
rm "$probe"

The load renders as named_sample in text and JSON. An unknown space is an error. The address uses the named space’s units; an unqualified assertion keeps its previous meaning. The AVR cases cover both byte- and word-addressed spaces.
DecBench (770 binaries) and multi-ISA Debian (146 binaries, 13 ABIs) showed no differences.

Dependency for the Carmel PR (#1936): it uses the same assertion syntax to name globals in DATA independently of CODE.

Model: openai-codex/gpt-6.2-sol

thotypous and others added 2 commits November 26, 2026 07:18
Validate and scale named-space addresses consistently in text and JSON output. Preserve existing unqualified address mappings.
… unknown

A rejected [space,addr] now lists the target's processor spaces, so a
miss such as RAM for x86's ram or intmem for 8051's INTMEM shows the
spelling to use. A bare address that does not parse keeps its earlier
message (data needs a hex <addr>). The spec records the console lowering,
map address data [space,addr] <decl>.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013BBaWTdjVzTz11WxPZmJ9b
@mahaloz

mahaloz commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

[AUTOMATED] Pushed d581909: an unknown space in data [space,addr] now lists the target's processor spaces (unknown processor space "RAM" (this target has: OTHER, ram, register)), a bare address that fails to parse keeps its earlier message (data needs a hex <addr>), and spec 00 names the console lowering map address data [space,addr] <decl>. The test pins the new message.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants