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 QAA19213; Sat, 20 Jul 2002 16:33:40 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA19214 for caml-list@pauillac.inria.fr; Sat, 20 Jul 2002 16:33:40 +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 WAA20146 for ; Tue, 16 Jul 2002 22:54:29 +0200 (MET DST) Received: from ns2.filemaker.com (ns2.filemaker.com [192.35.50.17]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g6GKsRT22423 for ; Tue, 16 Jul 2002 22:54:28 +0200 (MET DST) Received: from mail.filemaker.com (mail.filemaker.com [17.184.4.95]) by ns2.filemaker.com (8.9.0/8.9.0) with ESMTP id NAA13511; Tue, 16 Jul 2002 13:54:24 -0700 (PDT) Received: from troglodytes ([17.184.101.237]) by mail.filemaker.com (Post.Office MTA v3.5.1 release 219 ID# 0-63480U1000L2S100V35) with SMTP id com; Tue, 16 Jul 2002 13:54:22 -0700 Message-ID: <01fe01c22d0b$2b59f0c0$ed65b811@filemaker.com> From: hao-yang_wang@filemaker.com (Hao-yang Wang) To: =?iso-8859-1?Q?Johan_Balti=E9?= , References: <200207081952.PAA28813@hickory.cc.columbia.edu> <20020714142540.A4150@gogol.zorgol> <3D348085.1040809@ozemail.com.au> <200207162236.18697.johan.baltie@wanadoo.fr> Subject: Re: [Caml-list] Re: Statically detecting arrays bound exceptions ?? (was: Universal Serializer) Date: Tue, 16 Jul 2002 13:55:51 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > > >Hey, wait a minute, how do you plan to statically detect bounds exceptions > > > ? It's as undecidable as detecting infinite recursions. > > > > Nah. Just depends on your mindset. > > In Pascal, array indexes have a specific type, > > (possibly a subrange type). So it isn't possible to > > get an array bounds error, only a type error > > if the index is the wrong type. > > What about defining type that are subranges of int ? > à la ADA... Then how do you make sure that the result of an arithmetic expression is still within that sub-range? For example, m.( i + j ) ? Cheers, Hao-yang Wang ------------------- 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