can anyone give me the C++ source code to make a control flow graph generator for C language. here i need to show any C program code as a control flow graph. that's why i want to need the source code to make control flow graph generator.

  • Just browse github.
    – albert
    Feb 19 '18 at 18:15
  • ohh..but i can not found any c++ source code to make control flow graph from c program....if you will find ,then pls give me the link....
    – Shahriyar
    Feb 19 '18 at 19:16
  • Just a quick browse on the repositories and one can see repositories with C code (e.g. github.com/Kitware/CMake) and c++ code (e.g. github.com/gahansen/Albany).
    – albert
    Feb 19 '18 at 19:25
  • sorry, i searched almost all the respositories but i can not find anything about control flow graph in those two links........
    – Shahriyar
    Feb 19 '18 at 19:55
  • The question suggested to me that you want to create a program to create control flow graphs and for this you need example C / C++ code. But from the comment I understand you want to have a C++ program and revert this to a C program.
    – albert
    Feb 20 '18 at 9:02

I suggest to take a look at doxygen and its possibility to generate flow graphs via graphviz visualization software. You find the sources and documentation through the provided links.

I use both libraries for code documentation and flow graph generation extensively, but myself never made customization to the source.

  • doxygen does not output the control flow, but can output a list / graph of used functions and variable. Might be that Moritz (moritz.sourceforge.net) might be something that can do something you want although its is more or less for Nassi-Schneiderman diagrams.
    – albert
    Mar 1 '18 at 18:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.