01 / First run
Open a local ELF
Build the app, open the PRISM showcase, select a function, and find disassembly, CFG, P-code, and output views.
HydIRDocumentation / Guide map
HydIR connects an ELF to source-linked program facts, intermediate representations, and generated artifacts. This guide maps the major workflows and explains what a result establishes.
01 / First run
Build the app, open the PRISM showcase, select a function, and find disassembly, CFG, P-code, and output views.
02 / System map
Follow the automatic Ghidra lane and native Rust lane through artifacts, consumers, and verification boundaries.
03 / Deep dives
Study Ghidra P-code, bitvector behavior, and the compiler theory behind HydIR's IRs.
Start with a workflow, then use its reference for commands, artifact contracts, and explicit boundaries.
Open a local little-endian x86-64 ELF in the hydir app. The overview shows the program inventory and analysis status. Select a function to connect its machine address and bytes to disassembly, control flow, P-code effects, and generated views. The Ghidra worker starts automatically for local ELF analysis and its project is cached for later selections.
demo/hydir-prism.elf includes named entry points. hydir_stage_decision shows branching control flow; hydir_stage_call_chain shows a direct call.The Ghidra P-code article explains the imported operations behind one x86 instruction. For the native pipeline's control flow and SSA, see From Graphs to Code.
Open a local ELF and select an analyzed function, then choose Frida → Session. Enter one program argument per line, or leave the editor empty. Use Observe selected function when analysis and runtime checks finish; successful observations open Events. Choose InputSpec file for file inputs or custom limits.
On Windows, install WSL2 separately and keep the release's workers/frida directory beside the executables. In Session, choose Recheck runtime then Install packaged worker. Source builds require a generated worker bundle; WSL2 alone is insufficient.
Observation and replay features · Setup, packaging, and diagnostics
hydirctl makes the same analysis useful in scripts. Start with doctor to check the local toolchain, use discover to enumerate function candidates, and request a specific stage with lift or a C view with decompile. Ghidra commands can save a binary-bound snapshot for later verification and coverage inspection.
cargo run --locked --bin hydirctl -- doctor
cargo run --locked --bin hydirctl -- discover demo/hydir-prism.elf
cargo run --locked --bin hydirctl -- lift demo/hydir-prism.elf --function hydir_stage_decision --ir state
cargo run --locked --bin hydirctl -- decompile demo/hydir-prism.elf --function hydir_stage_decision --view unit
The native analysis guide lists stage contracts, limits, supported instruction families, and reproduction commands. The Python SDK reference covers local Ghidra operations and authenticated service workflows.
| Artifact | Question it answers | Important boundary |
|---|---|---|
| ProgramSpec and FunctionIndex | What bytes, sections, symbols, and candidate functions were found? | A candidate extent is evidence, not proof that every byte belongs to one function. |
| MachineIR | Which instructions, effects, and control edges were decoded? | Unknown instructions and targets remain explicit. |
| StateIR | How do registers, flags, control, and memory regions change? | Unsupported effects are carried conservatively. |
| FunctionIR and CIR | What calls, objects, operations, and control structure can be represented? | Types and prototypes are labeled by their evidence. |
| DecompilationUnit | Which C views, provenance, diagnostics, and claims belong together? | Readable C and rewrite readiness are separate claims. |
| Ghidra snapshot | What headless Ghidra analysis and raw P-code were imported? | The effect inventory and bounded executable trace are different artifacts. Missing state or unsupported effects stop execution. |
Look for separate structural, semantic, verification, and rewrite-readiness claims. partial control-flow recovery means some edges remain unresolved. unknown or conservative semantics mean the representation retains uncertainty. not_run verification means no execution comparison has been made. Exactness is relative to the recorded machine and environment model.
For the distinction between native C generation and the restricted scalar LLVM path, read the architecture guide. The compiler-theory article explains why control-flow joins, memory effects, and SSA matter to both paths.
Browse the full feature inventory for typed analysis models, DWARF import, call tracing, slices, replay and recipes, patch bundles, region interchange, and saved projects. The tools reference indexes all first-party documentation, and maps evidence and release gates.
See how one instruction expands into typed varnode operations and explicit effects.
Follow dataflow, memory effects, and joins toward C output.
Work through modular arithmetic, flags, signed comparison, and proof obligations.