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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!138.195.8.3.MISMATCH!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Specifying the order of ops on an ADT with aspects Date: Fri, 5 Feb 2010 16:15:12 -0600 Organization: Jacob Sparre Andersen Message-ID: References: <4b6aaed4$0$7625$9b4e6d93@newsspool1.arcor-online.net> <91ab6070-fc9e-4575-a967-8fe43353ba26@36g2000yqu.googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1265408112 32378 69.95.181.76 (5 Feb 2010 22:15:12 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 5 Feb 2010 22:15:12 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5843 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Xref: g2news1.google.com comp.lang.ada:8925 Date: 2010-02-05T16:15:12-06:00 List-Id: "Hibou57 (Yannick Duch�ne)" wrote in message news:91ab6070-fc9e-4575-a967-8fe43353ba26@36g2000yqu.googlegroups.com... >AI05-0145-2 says >http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ai05s/ai05-0145-2.txt?rev=1.4 >> This is based on the previous alternative AI05-0145-1. The >> Pre/Post aspects are specified using the aspect_specification >> syntax defined in AI05-0183-1. There is no message associated >> with the failure of a precondition or postcondition check: it >> was deemed that these annotations are intended for verification, >> and that for debugging purposes the Assert pragma is sufficient. >The last sentence is the most important for you topic. > >All providing I've really understood your question > >� intended for verification, and that for debugging purposes the >Assert pragma is sufficient � I think you guys miss the point of that statement. A Precondition that fails raises Assert_Error (unless suppressed, of course). That gets handled in the normal way, whatever your implementation does for unhandled exceptions. Nothing new here. But the original proposal included an optional message string, similar to the one the Assert pragma has. We decided to drop that because programs that fail Preconditions are just wrong, and there is no need to go into detail *why* they're wrong. I'd expect Janus/Ada to report something like: ** Unhandled Assert_Error - precondition check failed In any case, Ada has nothing to say about how unhandled exceptions are reported. We're working hard on a proposal to give the compiler enough information to be able to do static analysis of preconditions/postconditions, etc. We won't mandate that this time, but we surely want the possibility to exist -- otherwise there is little value to specifying these over plain old Assert pragmas. (Perhaps next time we'll be able to mandate some static checking.) Randy.