I need a tool to generate a control flow graph from java source code. Are there such tools available? Is there a possibility to also generate source code if I have a control flow graph?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
See my company’s (Semantic Designs) Java Front End. It will compute control flow graphs for methods from source code.
The Java Front End is built on top of DMS Software Reengineering Toolkit, which provides generic machinery for manipulating (parsing, analyzing [e.g., extracting control flow graphs]), transformating, and generating) code.
If one has a particular control flow graph, DMS provides the machinery to enable you to build a graph walker, and from that you could reasonably build Java ASTs that can then be used to produce Java source code. Obviously your control flow graph would have to use vocabulary that translates into Java concepts easily (e.g., no Prolog “unify this” operators), or you will have much harder time generating corresponding Java code. If you generated the graph from Java code, this would clearly be the case.