Browse thread
[Caml-list] unused function detection
-
skaller
-
David MENTRE
-
Nicolas Cannasse
- skaller
- Michael Furr
- Eric Dahlman
-
Nicolas Cannasse
-
David MENTRE
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ 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. -Eric On Jun 22, 2004, at 12:59 PM, Nicolas Cannasse wrote: >> skaller <skaller@users.sourceforge.net> 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 caml-list-request@inria.fr Archives: > http://caml.inria.fr > Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: > http://caml.inria.fr/FAQ/ > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners