Skip to main content

unidecompiler

unidecompiler is the frontend-neutral core for universal bytecode decompilation. It owns thin-IR lifting, recovery, generic IR, diagnostics, AST generation, and the stable DecompilerEngine facade used by CLI, GUI, and frontend plugin packages.

Frontend plugins decode VM-specific formats and submit neutral bytecode facts; they do not perform source-structure recovery.

The core may also carry optional ByteRange provenance for exact, absolute locations in the original input artifact. This is read-only presentation data for hosts such as the GUI; it has no execution, control-flow, or recovery semantics and is omitted whenever the decoder cannot prove the range.

Core recovery reaches a fixed point before the final AST is emitted:

thin IR -> generic IR / low-level CFG
                 |
                 v
          CFG structuring
                 |
                 v
  structured FunctionIR refinement
          |                 |
       changed            stable
          |                 |
          +--> CFG analysis/structuring ↺
                              |
                              v
                   final AST -> backend rendering

recovery_refinement.py owns the VM-neutral refinement loop. It accepts only rewrites that preserve the verified CFG and safety invariants; otherwise the existing low-level CFG/goto representation remains the preservation floor. The loop operates on structured FunctionIR inside core. It is not a frontend-specific pass, and backends do not infer or recover control flow.

CFG rewrites are edge-aware. Parallel edges retain deterministic concrete identity, and shared CFG analysis snapshots provide graph facts for structuring. Same-value Phi cleanup and explicit fallthrough-jump removal are performed only when predecessor edges, exception state, data-flow values, and evaluation order are proven equivalent. If that proof is unavailable, core keeps the low-level CFG/goto form rather than guessing.

The generic effect and IR layers preserve single evaluation, stack aliases, and values observed before later mutations. Writes and deletes have explicit targets for locals, globals, captured values, attributes, and items. Numeric operations retain domain, bit width, and wrapping or trapping overflow policy, while container literals retain tuple/list identity. These facts survive SSA, CFG rewriting, AST conversion, and backend rendering.

Calls may carry descriptive CallEffectSummary metadata for reads, writes, return arity, and possible raise/suspend/mutation behavior. The core never executes a summary. Unknown calls conservatively barrier deferred values, and the shared pass manager records fixed-point budget or non-progress diagnostics with available bytecode context.

Install

Install the core library directly from PyPI. Cloning this repository is not required for normal use:

python -m pip install unidecompiler

To decompile an artifact, also install a host such as unidecompiler-cli or unidecompiler-gui and the frontend plugin for the bytecode format you need.

Metadata

Release files for unidecompiler 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for unidecompiler 0.2.1
File Size Uploaded
unidecompiler-0.2.1.tar.gz 217.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for unidecompiler 0.2.1
File Interpreter ABI Platform
unidecompiler-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 453.0 kB

Release files / unidecompiler-0.2.1.tar.gz

Download URL unidecompiler-0.2.1.tar.gz
Size 217.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c660f2542414fd7a1947fc0acee10306e4ff858bc68d4d53e159e29d238aa058
BLAKE2b-256 checksum
How to use checksums
f0e88f8ad23541f350efa53698a0011151cfcf0de7f8ad732b1043af92171a2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release files / unidecompiler-0.2.1-py3-none-any.whl

Download URL unidecompiler-0.2.1-py3-none-any.whl
Size 235.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fc29e9fd732f796e12062ba3bc56975a9a2853faa71f818bbef4ae7953a56ede
BLAKE2b-256 checksum
How to use checksums
63975088b76bd34d1c767b68c887e94800525ce9ec4a3c8b01ec41e4ea2e0e68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release history Release notifications | RSS feed

0.2.2

2 release files

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page