Repository navigation
Conversation
A rule cap that counts rule applications per thread and can stop one rule after its first n, checked once per rule attempt in ActionPool::process_op and inert unless armed; Funcdata::vararg_folded, the register-save stores the varargsave fold removes; kuna_narrowext::rules_for for a given mode; IfaceStatus::last_command; and interface::quote_filename, moved from kuna-cli so other callers can reach it. With every hook unset kuna's output is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…inst the machine code kuna-verify runs a function's SLEIGH p-code and kuna's final Funcdata from the same random machine state, and compares the calls each makes and their arguments, the memory written outside the frame and the value returned. `check` runs it on functions of a binary, `corpus` on every decompile the datatest corpus makes, and `mutate` plants faults on kuna's side to measure how many the check catches. Slices C1, C2 and C4 of the diffverify proposal. Rule localization, concolic inputs, single-instruction (Tier L) and symbolic (Tier S) checks, the function oracle, the calling-convention model check and the CI baseline come in their own changes. Every corpus verdict matches the unsplit tool's on the same base. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… which a function differs For a function kuna-verify finds DIFFERS, `localize` holds one rule back at a time through the rule cap and bisects how many of its applications are allowed, so that with k - 1 the function agrees over every run and with k it differs. It reports those applications by rule and address, under the same contract and options as `check`. Slice C3 of the diffverify proposal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d baseline `make verify-corpus` checks every function tests/datatests and tests/stages decompile and compares each verdict with docs/baseline-verify.json; a non-gating step of the parity-gates job runs it and uploads the verdicts. A function that agreed (or a new one) and now differs, or a file that can no longer be checked, is a regression. A function that agreed and is now UNKNOWN, or agrees on at most half the runs it agreed on, is lost coverage. A DIFFERS is recorded with the place it first differs, without values, so a difference that moves is listed as a notice instead of passing unseen or failing the run. Baseline recorded on this base: 5,837 functions, 5,073 agree. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After the random runs, the machine side records each run's path as expressions over the input bytes. `--concolic N` negates one recorded branch condition at a time and asks z3 (a subprocess speaking SMT-LIB 2) for an input that takes the other way, up to N queries per function. z3 only picks inputs; the verdict still comes from running both sides. With no z3, the report says no concolic run was made. Slice C5 of the diffverify proposal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…st Unicorn `kuna-verify step` runs one instruction's SLEIGH p-code from random register values and prints each case as JSON; `scripts/diffverify/tier_l.py` runs the same cases under Unicorn and compares registers, flags, memory writes and the next address. Both sides of the Tier C check share the SLEIGH specs and the p-code op semantics, so this is the check that can see an error in either. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ase) `kuna-verify oracle-case` runs one explicit x86-64 case (named input registers and memory bytes, external entries that stop the run) on the function's raw p-code and on kuna's final IR, and prints both observations as JSON with the ELF and spec digests. `scripts/diffverify/function_oracle.py` runs the same case in Unicorn and compares the three. `make test-diffverify-tools` runs the scripts' tests, as a CI step that installs Unicorn, z3 and clang. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sjkim1127
force-pushed
the
diffverify-oracle
branch
from
December 5, 2026 01:36
3d3bdb5 to
a811541
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A follow-up to the #1830 split, on top of #2112 (whose commits it carries; review from
a81154158). The Tier C check samples random states; this gives one explicit case that can be saved and run again, on kuna's raw p-code, kuna's final IR and Unicorn, which uses neither SLEIGH nor p-code.kuna-verify oracle-caserecords the function's bytes, entry registers, mapped memory and launch address, runs both kuna interpreters on exactly that state, and prints the case and both observations with the ELF and spec digests.--input-reg,--memory-byteand--external-entry(a call that ends the run) fix the state.oracle_compare.pycompares the three on the return, the memory written and the calls, and names which backend disagrees.make test-diffverify-toolsruns these scripts' tests; CI gets a step that installs Unicorn, z3 and clang for it.Tests: the runner and the comparison on canned observations (13), and end to end on the fixture once the next PR (Tier S) adds its integration suite.
🤖 Generated with Claude Code
Model:
anthropic/claude-opus-5-5