Re: [abc-users] Determine a basic block

From: Eric Bodden <>
Date: Wed, 16 Apr 2008 14:54:48 -0400

Hi all.

> What do you mean by exceptional block graph? How can i imagine that?
> After i have seend that i can not identify pure blocks in jimple i am
> looking for alternatives.

I think the problem is that you are talking about different blocks.
Amjad uses basic blocks which are defined using branching instructions
(which exist in Jimple) and Thomas is talking about source-level
blocks (which do not exist in Jimple).

> Perhaps it will work if I transform my argument block in the frontend into
> try { ....} catch (Throwable t) {throw t;}
> I suppose that this block must have a representation in jimple.

Yes that could work but that would certainly be overkill. try/catch is
modeled via traps in Jimple which is also cumbersome. Adding tags as I
proposed earlier would be a lot easier. You can add tags to any
soot.Unit just by calling unit.addTag(...).

> My problem is that i am totally new to jimple and have some
> difficulties to reconstruct the transformation from my JastAdd-AST to
> jimple.

I do not have much experience with JastAdd yet but from my
understanding, the Java to Jimple conversion is implemented in the
following file:

In particular this file has no definition of Block.jimplify1phase1()
or Block.jimplify1phase2(), which means that the default behavior is
inherited from ASTNode (a simple recursive descend). If you implement
one of the methods for Block and make this implementation add tags to
the generated Jimple statements then that should do the job.


Eric Bodden
Sable Research Group
McGill University, Montréal, Canada
Received on Wed Apr 16 2008 - 19:54:51 BST

This archive was generated by hypermail 2.2.0 : Mon Apr 21 2008 - 09:50:10 BST