Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] generating a call-graph
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jeff Henrikson <jehenrik@y...>
Subject: Re: [Caml-list] generating a call-graph
> Does anyone know a way of generating a call-graph from a set of ocaml
> sources?  What I want to do is, at a minimum, get a list of all the
> functions that could be called as a result of a given function 
> invocation.
>  Essentially, I'm looking for dependency information on the 
> function-call
> level, similar to what ocamldep provides on the module level.

I have a tree walker function generator for caml expressions in camlp4 
that would make short work of this.  But I don't know how to get an 
MLast datum for an entire file.  Anybody know how to do this?  It seems 
that MLast.The following does not work:

Grammar.Entry.parse str_item (Stream.of_string
   "let f x = x*x;; let g x = x+x;;");;

(It stops at the semicolon and returns just the f definition.)

Jeff Henrikson

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: