[MLton-devel] New release of MLton: call-graphs

Matthew Fluet MLton@mlton.org
Thu, 20 Mar 2003 10:35:16 -0500 (EST)


> > > Shouldn't there always
> > > be a connection from <main> to every function?
> >
> > There should be, but the default call-stack graphs produced by mlprof will
> > remove nodes below the threshold, which can leave the graph disconnected.
>
> I must be mistaken in how the visualization algorithm works. Suppose
> the full graph is A -> B -> C, and B gets removed. I thought a link
> would then be inserted from A -> C, thus preserving the connectness
> property. Is that incorrect?

If the full graph is A -> B -> C and B gets "removed" then the graph will
be disconnected.  If B gets "ignored" then a link would be inserted from
A -> C and the graph would be connected.  See Section 6.2 of the users
guide.

There is an asymmetry with what you can accomplish with -graph and -ignore
options.  (-graph takes a graph expression while -ignore takes a regexp).
I'm tempted to suggest that we make -ignore also take a graph expression,
which would let you take:
-graph "exp"
that yields a disconnected graph to
-graph "all" -ignore "(not (exp))"
that should generate a connected graph.  But, I don't know if there are
technical issues with accomplishing that.



-------------------------------------------------------
This SF.net email is sponsored by: Tablet PC.  
Does your code think in ink? You could win a Tablet PC. 
Get a free Tablet PC hat just for playing. What are you waiting for? 
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel