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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file unidecompiler-0.1.10.tar.gz.
File metadata
- Download URL: unidecompiler-0.1.10.tar.gz
- Upload date:
- Size: 174.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4d9efdd703f354b921fdda23413e9ba00e6a3ff1ada26aa754874968e2fe310
|
|
| MD5 |
fec77535a2c2c4ab68f575fe25056590
|
|
| BLAKE2b-256 |
8c3f862977822691f9b0be63bca9a26f620b93f106810bbf699a9f7b470147b2
|
File details
Details for the file unidecompiler-0.1.10-py3-none-any.whl.
File metadata
- Download URL: unidecompiler-0.1.10-py3-none-any.whl
- Upload date:
- Size: 189.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e62c82f7ae9d901382cbb8d7c2526f59d841967d0a069cf8df50e901c238f75
|
|
| MD5 |
93b8fad3cdec0b812c92638f28869d81
|
|
| BLAKE2b-256 |
5ddc8ae0ebae7a90a96077b18a67b98b0bbb30cf46f690eb3ca9f8c18dfc85a1
|