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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,d3770aac68211766 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Received: by 10.180.104.167 with SMTP id gf7mr2111512wib.4.1352353220479; Wed, 07 Nov 2012 21:40:20 -0800 (PST) From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Class wide preconditions: error in the Ada 2012 Rationale? Date: Mon, 05 Nov 2012 21:43:01 +0100 Organization: Ada @ Home Message-ID: References: NNTP-Posting-Host: 80Danr8LSk+wZCZOQUcJiA.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.02 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Path: q13ni187518wii.0!nntp.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!209.197.12.246.MISMATCH!nx02.iad01.newshosting.com!newshosting.com!216.196.98.146.MISMATCH!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.mccarragher.com!news.grnet.gr!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!rt.uk.eu.org!aioe.org!.POSTED!not-for-mail Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Date: 2012-11-05T21:43:01+01:00 List-Id: Le Mon, 05 Nov 2012 21:41:48 +0100, Yannick Duch=C3=AAne (Hibou57) = a =C3=A9crit: > I have a doubt, and this one disturb me, so this topic. > > I was reading the revised version (fourth draft) of the Ada 2012 = > Rationale, when I saw this: > >> However, the rules regarding preconditions are perhaps surprising. >> The specific precondition Pre for Equilateral_Triangle must be true = >> (checked in the body) but so long as just one of the class wide = >> preconditions Pre'Class for Object and Triangle is true then all iswe= ll. > > Then later, a summary of the rule: > >> In summary, class wide preconditions are checked at the point of call= . = >> Class wide postconditions and both specific pre- and postconditionsar= e = >> checked in the actual body. > Oh no! I forget the link: http://www.ada-auth.org/standards/12rat/html/Rat12-2-3.html Pardon me. -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [1] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [1] [1]: Epigrams on Programming =E2=80=94 Alan J. =E2=80=94 P. Yale Univers= ity