I need a tool for generating control flow in java, but not a visual draw, something that I can work with like with path conditions or so. Anyone ?
Asked
Active
Viewed 1.1k times
8
-
Err, "control flow"? "path conditions"? Care to elaborate? – Bart Kiers Jan 23 '11 at 12:48
-
Sorry, I didn´t see your comments. I think I´ve elaborated in my comment of the first answer. Thank you all – Louro Jan 23 '11 at 13:08
4 Answers
3
The ASM library can do that, at the JVM-bytecode level. See Method Analysis and Control flow analyses in http://download.forge.objectweb.org/asm/asm4-guide.pdf (page 121).

Arnaud Le Blanc
- 98,321
- 23
- 206
- 194
-
Thank you! I think ASM is the type of thing I need. Do you know what is the usual code representation of the graph? Is just like a tree of basic blocks, or it has some information about the conditions? For example in an if/else we 1 condition and 2 basic blocks. The condition is present in the graph ? – Louro Jan 23 '11 at 12:58
-
Yes, you will be able to see the conditions (compare, lower-than tests, test). Look at the PDF and the site, there is example code in it. – Arnaud Le Blanc Jan 23 '11 at 13:16
-
1@arnaud576875 the link you share does not open, this is the updated link i guess: http://download.forge.objectweb.org/asm/asm4-guide.pdf – alper Mar 07 '17 at 13:25
-
0
Atlas is an Eclipse plugin that enables program analysis. It has a querable graph database that includes the control flow graph (as well as data flow and other relationships).

Ben Holland
- 2,309
- 4
- 34
- 50