有没有一种方法可以自动生成数据流程图和流程图?

问题描述:

我最近正在研究一些其他聪明人编写的冗长而晦涩的代码。
我正在考虑生成数据流程图和流程图以方便我的工作。是否有任何软件可以自动完成此工作?
P.S.大部分代码都在C和Fortran中。

I am recently working on some long and obscure codes written by some other smart guys. I'm thinking of generating the Data Flow Diagrams and the Flowcharts to facilitate my work. Is there any kinds of software that can do this job automatically? P.S. Most of the codes are in C and Fortran.

数据流图更加困难,因为它们需要大多数编译器前端来派生绘制它们所需的基本信息。但是您可以从 Doxygen 中通过 Graphviz

Dataflow diagrams are harder because they require most of a compiler front end to derive the basic information needed to draw them. But you can get call and caller graphs as well as some kinds of entity relationship diagrams out of Doxygen with Graphviz.

此外,Graphviz通常可用于绘制各种图形原始数据具有可读布局的图形集。例如,很容易走树结构并以DOT语言输出描述以供Graphviz绘制。

Also, Graphviz is generally useful for drawing all kinds of graphs with readable layouts from raw data. It is easy to walk a tree structure and output a description in the DOT language for Graphviz to draw, for example.

用正确的选项设置Doxygen,然后将其打开松散地使用遗留代码,您将获得内部文档的开头,也可以帮助您找到解决方法。

Set Doxygen up with the right options, and turn it loose on the legacy code and you will get the beginnings of an internals document to help find your way around too.