Skip to content

(Question) Which jb phases in Soot are required for creating the Jimple body and full callgraph, and which are optional optimizations? #2167

Open
@barbosamaatheus

Description

@barbosamaatheus

I apologize for creating an issue to clarify doubts about how soot works, but I was unable to send it through the discussion list available in the wiki link.

I'm using Soot to analyze Java bytecode, generate Jimple representations, and build call graphs using both CHA and SPARK approaches.

While exploring the jb pack (Jimple Body creation and optimization), I came across multiple transformation phases such as jb.ls, jb.tr, jb.ule, etc. However, it's unclear which of these are strictly required to construct a valid Jimple body, and which are optional optimizations that can be applied later.

Here’s the full list I’m reviewing:

Jimple Body Creation (jb)
Duplicate CatchAll Trap Remover (jb.dtr)
Empty Switch Eliminator (jb.ese)
Local Splitter (jb.ls)
Shared Initialization Local Splitter (jb.sils)
Jimple Local Aggregator (jb.a)
Unused Local Eliminator (jb.ule)
Type Assigner (jb.tr)
Unsplit-originals Local Packer (jb.ulp)
Local Name Standardizer (jb.lns)
Copy Propagator (jb.cp)
Dead Assignment Eliminator (jb.dae)
Post-copy propagation Unused Local Eliminator (jb.cp-ule)
Local Packer (jb.lp)
Nop Eliminator (jb.ne)
Unreachable Code Eliminator (jb.uce)
Trap Tightener (jb.tt)
Conditional Branch Folder (jb.cbf)

🔗 Soot Phase Options Documentation (4.5.0)


My questions:

  1. Which of these jb phases are essential for building a correct and complete Jimple body from bytecode?

  2. Which ones are purely optimization passes and can be safely skipped or applied later?

  3. Is there any official documentation, list, or rule of thumb to distinguish between “construction” and “optimization” phases in Soot?

I'm aiming to build a custom Soot pipeline, and I’d like to better understand the role, dependencies, and impact of each transformation phase to avoid unnecessary overhead.

Any clarification, insight, or reference would be highly appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions