[mercury-users] Module dependency graphs

Nicholas Nethercote njn at csse.unimelb.edu.au
Thu Jul 20 09:12:33 AEST 2006


On Thu, 20 Jul 2006, Julien Fischer wrote:

>> I find it very useful to look at module dependency graphs sometimes.
>> I figure the Mercury compiler has to deduce them for the --make option.
>> Is there any easy way to get it to spit them out in a readable form?
>
> It easy to get it to spit them out: mmc --generate-module-order Readability 
> is another issue.

That isn't quite what I want.  Ultimately I want to generate a graph showing 
the inter-module dependencies.  I've done this before using 'dot' to draw 
the graphs.  For this I need to know "module A imports modules B, C, D; 
module B imports modules E, F, G, etc".

If mmc doesn't do that, it's not hard to write a program from scratch that 
scans Mercury files just looking for 'import_module' and 'use_module' 
statements.  I might do that.  If I get it working, I'll try running it on 
the Mercury compiler code and see how it looks.

Nick
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at csse.unimelb.edu.au
administrative address: owner-mercury-users at csse.unimelb.edu.au
unsubscribe: Address: mercury-users-request at csse.unimelb.edu.au Message: unsubscribe
subscribe:   Address: mercury-users-request at csse.unimelb.edu.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list