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] unused function detection
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-06-22 (18:38)
From: Eric Dahlman <edahlman@a...>
Subject: Re: [Caml-list] unused function detection

Some old lisp systems had this ability they would identify that bit of 
your program needed to support a given set of functions and allow you 
to purge the rest.  There were some constraints on what the program 
could do (no applying random symbols for example) and possibly some 
heuristics as well.  The name for this process was "tree shaking" if 
anyone is interested in looking into what was involved.  A quick google 
search on my part surprised me with the size of both the christmas tree 
and pecan industries on the net, but little of real interest.


On Jun 22, 2004, at 12:59 PM, Nicolas Cannasse wrote:

>> skaller <> writes:
>>> Can Ocaml find unused functions, or does someone happen
>>> to have a tool lying around that does so?
>> Use ocaml profiling tools to find function called zero times?
>> Yours,
>> d.
> That's not complete enough, since the behavior - then the code 
> executed - of
> the application might depend of different kind of inputs : network, 
> user,
> command line, ...
> Since there is no guarantee that after removing the functions called 
> zero
> time, you program will even compile , what he needs is actually a 
> statical
> analysis tool using a code coverage algorithm, given one or more entry
> points. This analysis can find without even executing the program the 
> most
> small subset of functions needed in order to compile the applications.
> That's actually quite an interesting piece of code to write in a 
> functional
> language, and it would be nice if it can detects also unused *types*.
> Regards,
> Nicolas Cannasse
> -------------------
> To unsubscribe, mail Archives: 
> Bug reports: FAQ: 
> Beginner's list:

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