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-Thread: 103376,7d3cb5920e882220 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!news.banetele.no!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Message-Id: <19324822.xTIGfPqStl@linux1.krischik.com> From: Martin Krischik Subject: Re: Contracted exceptions for Ada Newsgroups: comp.lang.ada Date: Sun, 09 Dec 2007 20:04:44 +0100 References: <5947aa62-2547-4fbb-bc46-1111b4a0dcc9@x69g2000hsx.googlegroups.com> <7m9wkymyi5h7.1235e72is9mp9.dlg@40tude.net> <1355376.ahPdGlRDJW@linux1.krischik.com> <1bvj0n3ana6zj.1b1q7na2q2i0a.dlg@40tude.net> User-Agent: KNode/0.10.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit Organization: SunSITE.dk - Supporting Open source NNTP-Posting-Host: 84.75.162.66 X-Trace: news.sunsite.dk DXC=BJG9 Dmitry A. Kazakov wrote: > On Sun, 09 Dec 2007 16:11:13 +0100, Martin Krischik wrote: > >> Dmitry A. Kazakov wrote: >> >>> (Maybe a wild guess, but this could save Ariane V. A program assumed >>> Constraint_Error exception free was recompiled for the hardware where >>> that was not the case.) >> >> My understanding is that the system was brought down by an unexpected >> hardware exception - i.E. one which the CPU's floating point unit >> generated. > > Yes, and that would be detected by the compiler: > > function Integer (X : Float) return Integer; > > which was contracted as exception-free on one platform will not be on > another. So the compiler would reject either its implementation that > raises Constraint_Error or else its use contracted as > Constraint_Error-free. So the idea. > > (Contracted exceptions would mean a damn LOT of work for the compiler > vendors.) I forgot to mention mentioned that they used pragma Suppress to speed thing up (the old 'pedia article mentioned that). With pragma Suppress in place the HW-exception was never converted into an Ada-exception. Even the best exception handling won't help if you switch it off :-( . Martin -- mailto://krischik@users.sourceforge.net Ada programming at: http://ada.krischik.com