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:00)
From: Nicolas Cannasse <warplayer@f...>
Subject: Re: [Caml-list] unused function detection
> 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*.

Nicolas Cannasse

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