[Soot-list] Programatically use a CFG

Steven Arzt Steven.Arzt at cased.de
Wed Jun 15 19:32:09 EDT 2016


Hi Tanzirul,

 

You can use the ExceptionalUnitGraph class if you only need an intra-procedural CFG. If you need an interprocedural one, have a look at the JimpleBasedInterproceduralCFG class.

 

Blocks correspond to the statements between labels. There is, as far as I know, no automatic way to extract these blocks. It should, however, be pretty easy to iterate over the code and check Unit.getBoxesPointingToThis() to see if you have arrived at a jump location, i.e., the end of a block.

 

Best regards,

  Steven

 

Von: soot-list-bounces at CS.McGill.CA [mailto:soot-list-bounces at CS.McGill.CA] Im Auftrag von Tanzirul Azim
Gesendet: Mittwoch, 15. Juni 2016 11:58
An: soot-list at CS.McGill.CA
Betreff: [Soot-list] Programatically use a CFG

 

Hi, I know soot has got an option to view the CFG of a method using soot.tools.CFGViewer

For my project I need to load the CFG in memory (full or partially) and want to do some analysis on it, for example in each block I want to add some instrumented code. More over I want to have some unique identification of the block.

 

So here is my questions:

 

1. Can I progrmmatically access the CFG?

2. Are there any built-in ways to identify blocks? 

 

---

Tanzir

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20160616/2d9acbe7/attachment.html 


More information about the Soot-list mailing list