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 AAA19264; Wed, 19 Nov 2003 00:49:19 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id AAA15877 for ; Wed, 19 Nov 2003 00:49:18 +0100 (MET) Received: from rabelais.socialtools.net (rabelais.socialtools.net [81.2.94.243]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id hAINnH111722; Wed, 19 Nov 2003 00:49:17 +0100 (MET) Received: by rabelais.socialtools.net (Postfix, from userid 108) id 7313F23327; Tue, 18 Nov 2003 23:49:16 +0000 (GMT) Received: from socialtools.net (chaucer.socialtools.net [81.2.94.242]) by rabelais.socialtools.net (Postfix) with ESMTP id AC8A9232DA; Tue, 18 Nov 2003 23:49:14 +0000 (GMT) Message-ID: <3FBAAFFA.1020104@socialtools.net> Date: Tue, 18 Nov 2003 23:49:14 +0000 From: Benjamin Geer User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-gb, en, fr, it MIME-Version: 1.0 To: Xavier Leroy Cc: Caml Mailing List Subject: Re: [Caml-list] GC and file descriptors References: <1069168323.18363.83.camel@pelican> <3FBA4D97.9060309@dcs.qmul.ac.uk> <3FBA6459.3000000@socialtools.net> <20031118202438.A9506@pauillac.inria.fr> In-Reply-To: <20031118202438.A9506@pauillac.inria.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on rabelais.socialtools.net X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham version=2.60 X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 infer:01 pessaux:01 pessaux:01 type-based:01 publi:01 first-order:01 monomorphic:01 higher-order:01 promotes:99 convincing:01 inference:01 caml:01 caml:01 descriptors:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Xavier Leroy wrote: >>If the type of a function included its exception specification, >>could Caml infer exception specifications? > > Yes, with the proviso that you need a fairly sophisticated exception > analysis to get enough precision in practice. See for instance the > PhD work of my former student, François Pessaux: > > François Pessaux and Xavier Leroy. Type-based analysis of uncaught > exceptions. ACM Transactions on Programming Languages and Systems, > 22(2):340-377, 2000. > http://pauillac.inria.fr/~xleroy/publi/exceptions-toplas.ps.gz I've just read this paper, and it looks like very promising work. I wholeheartedly agree with the presentation of the issues in the Introduction, which makes two very important points: (1) 'Our experience with large ML applications is that uncaught exceptions are the most frequent mode of failure.' (2) 'Declaring escaping exceptions in functions and method signatures works well in first-order, monomorphic programs, but is not adequate for the kind of higher-order, polymorphic programming that ML promotes.' (As the article points out, this problem comes up in Java as well; in an implementation of the Command pattern, it's difficult not to define the execute() method of the Command interface as being able to throw any exception.) The paper makes a convincing case for inference as a better approach. Has the work described in this paper been continued? Are there any plans to integrate it, or something like it, into Caml? Ben ------------------- 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