Fortran 的自动文档类型功能?

发布于 2024-07-20 05:44:34 字数 249 浏览 4 评论 0原文

过去我使用 Doxygen 来处理 C 和 C++,但现在我被投入到 Fortran 项目中,我想快速全面地了解该架构。

过去,我发现逆向工程工具在没有架构文档的情况下非常有用。

那么,有没有一种工具可以对 Fortran 代码进行逆向工程呢?

我尝试使用 Doxygen,但没有成功。 我将处理两个不同的项目 - 一个是 Fortran 90,我认为是 Fortran 77。

感谢您的任何见解和反馈。

In the past I've used Doxygen for C and C++, but now I've been thrown on Fortran project and I would like to get a quick all encompassing look at the architecture.

In the past I've found reverse engineering tools to be useful where no documentation of the architecture exists.

So, is there a tool out there that will reverse engineer Fortran code?

I tried to use Doxygen, but didn't have any luck. I will be working with two different projects - one Fortran 90 and I think is in Fortran 77.

Thanks for any insights and feedback.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

丑丑阿 2024-07-27 05:44:34

可能有助于逆向工程的工具:
SciTools 了解
链接更多工具(搜索“fortran”)

另外,也许其中一些单元测试框架会很有帮助(我没有使用过它们,所以我无法评论它们的优缺点):
FUnit
水果
Ftnunit
(这些链接链接到 fortranwiki,您可以在其中找到每个链接的花絮,并且从那里可以链接到他们的主页)。

Tools which may help with reverse engineering:
SciTools Understand
Link with some more tools (search "fortran")

Also, maybe some of these unit testing frameworks will be helpful (I haven't used them, so I cannot comment on the pros and cons of any of them):
FUnit
FRUIT
Ftnunit
(these links link to fortranwiki, where you can find a tidbit on every one of them, and from there there are links to their home sites).

白云悠悠 2024-07-27 05:44:34

Doxygen 1.6.1 将为自由格式 (F90) 格式的 Fortran 源代码生成文档、调用图等。 您无法使用 doxygen 自动记录固定格式(F77)代码。

然而,一切并没有失去。 从固定格式到自由格式的转换非常简单,并且可以在很大程度上实现自动化 - 将注释字符更改为“!”,将连续字符更改为“&”,并附加“&” 到待续行。 事实上,如果附加的继续字符位于第 73 列中,则标准 F77 编译器应忽略它(它仍然只识别第 1 列至第 72 列中的代码),但会被 F9x/F2003/F2008 编译器识别。 这允许将相同的代码识别为固定格式和自由格式,从而使您可以轻松地从一种格式迁移到另一种格式。

方便的是,大约有一千个小程序可以在某种程度上进行这种格式调整。 实际上,如果您要维护代码,您不妨将其从 Hollerith (IBM) 打孔卡的 1928 年规范中移走。 :)

Doxygen 1.6.1 will generate documentation, call graphs, etc. for Fortran source code in free-format (F90) format. You are out of luck for auto-documenting fixed-format (F77) code with doxygen.

All is not lost, however. The conversion from fixed to free format is straightforward and can be automated to a great degree - change comment characters to '!', change continuation characters to '&', and append '&' to lines to be continued. In fact, if the appended continuation character is placed in column 73, it should be ignored by standard F77 compilers (which still only recognize code in columns 1 through 72) but will be recognized by F9x/F2003/F2008 compilers. This allows the same code to be recognized as both in fixed and free format, which lets you gracefully migrate from one format to the other.

Conveniently, there are about a thousand small programs that will do this format adjustment to some degree or another. Realistically, if you're going to be maintaining the code, you might as well move it away from the 1928 spec for Hollerith (IBM) punched cards. :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文