I need to automatically construct flowcharts out of C++ code, ideally one flowchart per source file. Is there any tool (preferably C++/Python and either open-sourced or highly configurable - so I may change the look) that I can use to create flowcharts?
To access Excel's shape library, go to the insert tab and click “Shapes.” A gallery will appear with a variety of basic shapes including lines, arrows, and geometric shapes. Scroll down to find the flowchart section. Click the flowchart shape you want to add, then drag the shape to size on the Excel sheet.
clang/llvm
can generate graphviz dot files.
Example:
clang -S -emit-llvm -o hello.ll hello.cpp
opt hello.ll -dot-cfg -o hello.dot
This will output several .dot
files, one for each function defined in hello.cpp
.
You can also generate dominance graph, post dominance graph and more (see here).
After you have your .dot
files you can use dot
to convert it to a .png
file.
The .dot
file itself contains only the structure of the graph, so the output of dot
should be highly configurable (but I am not really familiar with it).
Use Enterprise Architect tool.
http://www.sparxsystems.com/enterprise_architect_user_guide/9.2/execution_analyzer/generating_sequence_diagram.html
You can generate sequence diagram while you debug the code.
Demonstration: Online Demo
Note:- This works with C++ code as well. Just use Native debugger.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With