From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,583275b6950bf4e6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-23 14:21:40 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!feed2.news.rcn.net!rcn!nntp.abs.net!uunet!dca.uu.net!ash.uu.net!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Quality systems (Was: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died)) Date: 23 May 2003 17:21:38 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <3ec4b1c9$1@news.wineasy.se> <9fa75d42.0305161748.1735fc32@posting.google.com> <4W%xa.28765$cK5.11964@nwrdny02.gnilink.net> <1053353256.804734@master.nyc.kbcfp.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1053724898 30700 199.172.62.241 (23 May 2003 21:21:38 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Fri, 23 May 2003 21:21:38 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:37717 Date: 2003-05-23T17:21:38-04:00 List-Id: "Dmitry A. Kazakov" writes: > Randy Brukardt wrote: > > > Virtually every time I use a modular type, I end up tracking down some > > bug at runtime that would have been caught had there been an overflow > > check. (Typically in the creation of an array index or the like.) Most > > of the these types are 'indexes' (handles) that have to fit in a > > particular size, and I often write checks like: > > if Index-1 > 0 then > > Index := Index - 1; > > end if; > > which is wrong for a modular type. (Consider Index=0). > > But a modular type should have no "<" defined! A transitive "<" is > incompatible with modular "+" and "-". But I think Randy and I are saying that a type with transitive "<" should not have modular semantics. - Bob