From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,85404311f8041f7a X-Google-Attributes: gidfa528,public X-Google-Thread: 1164f8,5747331edea7cbab X-Google-Attributes: gid1164f8,public X-Google-Thread: 102b75,85404311f8041f7a X-Google-Attributes: gid102b75,public X-Google-ArrivalTime: 2001-07-09 03:18:00 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!iad-peer.news.verio.net!news.verio.net!iad-read.news.verio.net.POSTED!kilgallen From: Kilgallen@eisner.decus.org.nospam (Larry Kilgallen) Newsgroups: comp.sys.dec,comp.unix.tru64,comp.arch Subject: Re: Compaq kills Alpha Message-ID: References: <3B37351D.5080503@cli.de> <4495ef1f.0106281109.4b460a70@posting.google.com> <8PS_6.265783$p33.5339568@news1.sttls1.wa.home.com> <9hhtur$1oj9$2@info.cs.uofs.edu> <9hi2q1$hbs@augusta.math.psu.edu> <9hj3ch$qmi$1@pyrite.mv.net> <_Ay07.62$G_1.10702@newsread2.prod.itd.earthlink.net> <3B462723.8938B09B@peoplepc.com> <3B469F39.618E0ADE@igs.net> <3B46C8C7.E2AFF889@peoplepc.com> <3B471A6C.EE8715F5@igs.net> <$KhLsMn0xNNj@eisner.encompasserve.org> <3Organization: LJK Software Date: 9 Jul 2001 06:17:33 -0500 NNTP-Posting-Host: 216.44.122.34 X-Complaints-To: abuse@verio.net X-Trace: iad-read.news.verio.net 994673863 216.44.122.34 (Mon, 09 Jul 2001 10:17:43 GMT) NNTP-Posting-Date: Mon, 09 Jul 2001 10:17:43 GMT Organization: Verio Xref: archiver1.google.com comp.sys.dec:5416 comp.unix.tru64:3249 comp.arch:13349 In article , andrew@gurney.reilly.home (Andrew Reilly) writes: > On Mon, 09 Jul 2001 04:56:18 -0400, Jack Patteeuw wrote: >> (So what would you do if you got a divide by zero exception on your >> engine controller while driving at 70 MPH, reboot and hope it doesn't >> happen again ?) > > Sure[1]. What else would your Ada divide exception do? It's > obviously a sign that something is very sereously broken. Your > engine controller can probably reboot ten times a second without > you noticing anyway. Along with Ada, unless you are extremely unlucky, comes a culture of software engineering. If Jack's automotive shop is as safety conscious as I hope they are, a culture of software engineering is something to be embraced, not abhored. Formal inspection will certainly check divides to ensure this cannot happen. One method is to perform the divide with the datatype Positive, which cannot be zero. Making that change and no other will lead to compilation failure at all other places in the program where a possibly-zero number is copied into the divisor-to-be. The only way to coerce a possibly-zero number into a Positive number is to use something called Unchecked_Conversion. They called it Unchecked_Conversion because they knew there would be objections to the typing involved for Red_Flag_Formal_Inspectors_Look_Here_For_The_Big_Bugs, but it serves the same purpose when the time comes for formal inspection. http://www.fastcompany.com/online/06/writestuff.html