[antlr-interest] CFG tool for Java

Miguel Ping miguel.ping at gmail.com
Fri Apr 13 03:10:39 PDT 2007


What do you mean with a control flow graph analysis? a tool that can
interpret a control flow description and infer something? My guess is
that's a graph problem, and there should be a library somewhere on the
web that does that :) Anyway, if you want to write your own, you
should first specify the language that specifies the graph.
Eventually, something like this:

startRule: graphComponent+ EOF;
graphComponent : conditional | functional | etc...
conditional : 'IF' exprDescr THEN nextState ELSE nextState;

For what I recall of UML, control graphs only have simple units, that
either do something or are conditionals. So, after figuring the
grammar for the language of your control structures, either with an
approach like the one i presented, or another (hey, you can define a
control graph in xml - maybe some apps can export a control graph to
xml), antlr can kick in and help you parse the control graph language
definition, whatever that will be.

Hope it helps,
Miguel Ping

On 4/13/07, Naimal Khan <naimal_khan at hotmail.com> wrote:
> Hi..
> Is there a contrl flow graph analysis tool available for Java written in
> ANTLR? Can you kindly give me some guidance how to begin writing one of my
> own?
> Thanks a lot
> Naim
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today it's FREE!
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

More information about the antlr-interest mailing list