Tools for generating Haskell function dependency (control flow) graph?

后端 未结 1 1910
抹茶落季
抹茶落季 2020-12-23 11:54

Note not \"functional dependency\". Are there tools available that allow me to build a static function dependency graph from source code? Something which indicates to me whi

相关标签:
1条回答
  • 2020-12-23 12:31

    Yes, there certainly are. If you look in the Development category on Hackage, you'll find tools for:

    • graphing package dependencies -- n.b requres older cabal
    • graphing module dependencies
    • graphing function calls
    • graphing running data structures

    In particular, SourceGraph contains many analysis passes, including:

    • visualizing function calls
    • computing cyclomatic complexity
    • visualizing module imports

    Other tools that you might be interested in are:

    • HPC, for visualizing test coverage
    • ThreadScope, for visualizing runtime behavior
    • lscabal, extract modules from a package

    Here is the functional call graph produced by SourceGraph run over cabal2arch:

    alt text

    0 讨论(0)
提交回复
热议问题