Repository navigation
v2.65.0: Structurizer: ISA-neutral dominator-based structured control-flow pass.
Structurizer: ISA-neutral dominator-based structured control-flow pass.
New module: ablation/analyzers/structurizer.py.
3 things that were not possible before in Ablation:
- No structured output for any ISA. Every CFG-backed lifter produced
goto-based IR. Structural reconstruction (if/while/for) was absent. - No post-dominator tree. Post-dominators are needed to find the "join"
point after an if/else diamond.PostDomTreefills this gap. - No ISA-neutral decompiler pass. The structurizer works on any CFG that
exposes.blocks,.entry,.flow,.flow_r()— the same interface as
dataflow_engine.CFG. Any ISA CFG module can plug in.
New:
Structurizer(cfg): builds dominator tree + loop info + post-dominator tree,
then walks RPO to emitWhileNode,IfNode,SequenceNode,ReturnNode,
BreakNode,ContinueNode.Structurizer.structure() -> StructuredNode: returns the tree.Structurizer.emit(insn_emitter, func_name) -> str: renders to pseudo-C.PostDomTree(cfg): immediate post-dominator tree via reversed-CFG DomTree.
Used to find if/else join points.- All node types exported:
SequenceNode,InsnNode,IfNode,WhileNode,
BreakNode,ContinueNode,ReturnNode. - Docs:
docs/module-reference/structurizer.md.