From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA23674 for caml-redistribution; Tue, 7 Sep 1999 11:46:31 +0200 (MET DST) 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 TAA12927 for ; Mon, 6 Sep 1999 19:31:17 +0200 (MET DST) Received: from nef.ens.fr (nef.ens.fr [129.199.96.12]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id TAA02982 for ; Mon, 6 Sep 1999 19:31:16 +0200 (MET DST) Received: from basilic.ens.fr (basilic.ens.fr [129.199.98.74]) by nef.ens.fr (8.9.3/beig-1.0) with ESMTP id TAA00963 for ; Mon, 6 Sep 1999 19:31:15 +0200 (MET DST) Received: from localhost by basilic.ens.fr (8.9.2/jb-1.1) id TAA10833 for ; Mon, 6 Sep 1999 19:31:15 +0200 (MET DST) X-Authentication-Warning: basilic.ens.fr: monniaux owned process doing -bs Date: Mon, 6 Sep 1999 19:30:59 +0200 (MET DST) From: David Monniaux X-Sender: monniaux@basilic.ens.fr To: Liste CAML Subject: throws Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: weis [resume: suggestion d'implementer une analyse statique et sommaire de detection de fuites potentielles d'exceptions semblable a celle de Java] The Java language has a nice feature: static detection of exception leaks (or, more exactly, a conservative and simple approximation of it, since the full problem is of course undecidable). That is, functions must declare the exceptions they can throw (except those generated by the runtime system); exceptions that can be thrown from function f are inferred by looking at those that can be thrown by the functions called from f, those that are explicitely thrown in f and those that are caught in f. Pardon me if I'm mistaken, but this sounds easy and cheap to implement. Could it be possible to add a construct like this: throws in ? Only terms tagged such as above would be checked so as to allow upwards compatibility. Does this sound nifty? And implementable? --- David Monniaux Tel: +33 1 44 32 20 66 Fax: +33 1 44 32 20 80 Laboratoire d'informatique de l'École Normale Supérieure, 45 rue d'Ulm - 75230 PARIS cedex 5 - FRANCE