From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA29789; Tue, 22 Jun 2004 20:00:35 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA29744 for ; Tue, 22 Jun 2004 20:00:33 +0200 (MET DST) Received: from postfix3-1.free.fr (postfix3-1.free.fr [213.228.0.44]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i5MI0WSH009432 for ; Tue, 22 Jun 2004 20:00:32 +0200 Received: from warp (chateaudeau-4-82-225-176-25.fbx.proxad.net [82.225.176.25]) by postfix3-1.free.fr (Postfix) with SMTP id 0525B17361B; Tue, 22 Jun 2004 20:00:32 +0200 (CEST) Message-ID: <008201c45882$b3532560$19b0e152@warp> From: "Nicolas Cannasse" To: , "David MENTRE" Cc: References: <1087924126.3755.151.camel@pelican.wigram> <874qp3mrdg.fsf@linux-france.org> Subject: Re: [Caml-list] unused function detection Date: Tue, 22 Jun 2004 19:59:44 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Miltered: at concorde with ID 40D873C0.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; cannasse:01 warplayer:01 caml-list:01 sourceforge:01 cannasse:01 ocaml:01 ocaml:01 nicolas:01 nicolas:01 command:98 writes:01 compile:02 compile:02 algorithm:03 behavior:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > 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 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