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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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-24 00:31:06 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!dialin-145-254-039-034.arcor-ip.NET!not-for-mail From: "Dmitry A. Kazakov" 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: Sat, 24 May 2003 09:33:21 +0200 Organization: At home 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> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: dialin-145-254-039-034.arcor-ip.net (145.254.39.34) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: fu-berlin.de 1053761464 1626422 145.254.39.34 (16 [77047]) User-Agent: KNode/0.7.1 Xref: archiver1.google.com comp.lang.ada:37729 Date: 2003-05-24T09:33:21+02:00 List-Id: Robert A Duff wrote: > "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. This or that way (:-)) -- Regards, Dmitry A. Kazakov www.dmitry-kazakov.de