Implementation:2akouwu Reverify prologue prior run
| Knowledge Sources | |
|---|---|
| Domains | Benchmarking, Verification |
| Last Updated | 2026-10-24 12:00 GMT |
Overview
Concrete tool for the headline prologue-prior benchmark that applies a textbook frame-pointer prologue blind to real binaries and checks for zero false VERIFIED, provided by the Reverify library.
Description
The run function in prologue_prior.py applies the textbook prologue prior (push rbp; mov rbp, rsp) to real binaries at their entry point or exported functions, runs the verifier, and records: prior verdict, actual instructions, false_verified (VERIFIED but prior was wrong), and recovered (actual instructions verified after one round). The headline result: ~97% of Windows files have a different prologue, yet 0 are falsely VERIFIED. The Wilson upper-95 bound on the false-verified rate is reported honestly.
Usage
Use this function when you need to:
- Reproduce the headline zero-false-VERIFIED benchmark.
- Test that the verifier never marks a wrong prologue as VERIFIED.
- Measure how often the textbook prior is wrong on real binaries.
Code Reference
Source Location
- Repository: Reverify
- File: benchmarks/prologue_prior.py
- Lines:
runat L106-185;mainat L235-269;markdownat L210-232
Signature
def run(
dirs: List[str],
per_dir: int = 12,
probe: str = "entry",
per_binary: int = 8,
) -> Dict[str, Any]:
"""Apply the prologue prior to real binaries; return result dict."""
def main(argv: List[str]) -> int:
"""CLI entry: run benchmark, print results, optionally write JSON/markdown."""
Import
from benchmarks.prologue_prior import run
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| dirs | List[str] | No | Corpus directories (defaults to System32/SysWOW64 or /usr/bin) |
| per_dir | int | No | Files per dir (default 12) |
| probe | str | No | "entry" or "exports" (default "entry") |
| per_binary | int | No | Exported functions per binary (default 8) |
Outputs
| Name | Type | Description |
|---|---|---|
| return | Dict | schema, benchmark, environment, corpus, rows (per-binary), inconclusive, totals (tested, prior_wrong, false_verified, recovered_after_1_round, false_verified_rate_upper95) |
Usage Examples
CLI Usage
# Run on system binaries; exit 2 if any false VERIFIED
python benchmarks/prologue_prior.py --fail-on-false-verified
# Run on a custom corpus
python benchmarks/prologue_prior.py corpus_output/ --per-dir 20 --json results.json
# Run on exported functions (for shared libraries)
python benchmarks/prologue_prior.py corpus_output/ --probe exports --markdown