Abstract

The traditional control flow diagram (CFG) only displays the overall framework of the program, but ignores its detailed control information and the complex inner structure. Programmers can hardly comprehend the whole program through traditional CFG. Therefore, an algorithm is proposed to generate a new kind of CFG with abundant details and inner structure. After parsing the compilation results of Clang static analyzer, the algorithm firstly extracts the key control information of a program, and then uses the control information to build up the basic display units. Secondly, the algorithm orders and packs these basic display units to form an intermediate XML file. Finally, the Jgraphx graphics library is introduced to parse the intermediate XML file and render the new CFG. Experiment shows that when comparing with the conventional CFG, the new CFG that drawn by the proposed algorithm can demonstrate more details, states, and data flows. The CFG drawn by the proposed algorithm can also offer strong support for complex software maintenance and testing.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call