[MLton-devel] New release of MLton: call-graphs
Joe Hurd
MLton@mlton.org
Thu, 20 Mar 2003 17:52:45 +0000 (GMT)
> See Section 6.2 of the users guide.
Sorry: I didn't realize the latest users guide explained this.
In the situation with functions A -> B -> C, why would anyone ever
want to remove B with all of its edges? (*) I think my ideal would be
for -graph "not B" to remove B but add a DOTTED line from A to C to
represent an indirect call.
Having now carefully read the semantics of -ignore, I think its
behaviour is a bit simplistic. In the following situation:
fun f1 x = (g1 o h1) x;
fun f2 x = (g2 o h2) x;
I'd really like -ignore "o" to produce (solid) edges in the call graph
from f1 to g1 and h1, and from f2 to g2 and h2. But from my reading of
section 6.2 (and as I've verified in the appended program), it seems
that it also adds edges from f1 to g2 and h2, and from f2 to g1 and
h1. This would explain why my call-graphs seem to contain many more
edges than I'd expect. Would it be possible for -ignore to be
implemented the way I'd like?
Joe
(*) Of course, if you produce a killer application for this then I'll
go back to the drawing board :-)
_____________________________________________________________
fun fib 0 = 1 | fib 1 = 1 | fib n = fib (n - 1) + fib (n - 2);
val big = 30;
fun f o g = fn x => f (g x);
fun g1 x = (print "g1\n"; fib big; x);
fun g2 x = (print "g2\n"; fib big; x);
fun h1 x = (print "h1\n"; fib big; x);
fun h2 x = (print "h2\n"; fib big; x);
fun f1 x = (g1 o h1) x;
fun f2 x = (g2 o h2) x;
val _ = f1 1;
val _ = f2 2;
-------------------------------------------------------
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