[Haskell-cafe] Graph theory analysis of Haskell code

Ketil Malde ketil+haskell at ii.uib.no
Thu Dec 6 03:34:30 EST 2007


"Tim Chevalier" <catamorphism at gmail.com> writes:

> aka a "call graph". This is called "control flow analysis" and the
> classic paper on it is Olin Shivers' dissertation

> This is very well-trodden ground, but if you familiarize yourself with
> the literature on the subject, then who knows, you may discover
> something new.

I'll just add that having a tool visualizing this would be very useful
for refactoring code.  If you e.g. use color to distinguish
nodes/functions from different modules, you could use that information
to decide to merge or split modules to minimize external interfaces.

You could also try to automatically cluster nodes, which would be more
interesting theoretically, but IMO less likely to be practical.

Another option would be to couple this with profiling or coverage
information to visualize something about the usage of paths and nodes
in the call graph.

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants


More information about the Haskell-Cafe mailing list