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: 103376,ad06d2d7cb045687 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Received: by 10.68.135.231 with SMTP id pv7mr4621902pbb.8.1328269239063; Fri, 03 Feb 2012 03:40:39 -0800 (PST) Path: lh20ni255643pbb.0!nntp.google.com!news2.google.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Silly and stupid post-condition or not ? Date: Fri, 03 Feb 2012 12:40:36 +0100 Organization: Ada @ Home Message-ID: References: <82wr86fzos.fsf@stephe-leake.org> <5af407fc-2868-44ca-84d2-c51a2a64104d@o4g2000pbc.googlegroups.com> <82k445fu9n.fsf@stephe-leake.org> <1q29nqwr7e7u4.1qrz4gd6twxim.dlg@40tude.net> NNTP-Posting-Host: N28wZESBPSigY/7WFxFowQ.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/11.61 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Date: 2012-02-03T12:40:36+01:00 List-Id: Le Fri, 03 Feb 2012 12:09:10 +0100, Dmitry A. Kazakov = a =C3=A9crit: > On Fri, 03 Feb 2012 10:48:34 +0100, Yannick Duch=C3=AAne (Hibou57) wro= te: > >> Le Fri, 03 Feb 2012 10:12:25 +0100, Dmitry A. Kazakov >> a =C3=A9crit: >>> In the OP example, >>> Format_Error of unspecified semantics is to be used heavily. >> >> Format_Error as a specified semantic: Error. Which turns to disallow = any >> access to any parsed Instance. > > If that is *the semantics* then the prostcondition is > > Result.Status =3D Format_Error =3D> Result.Instance raise Constrain= t_Error Format_Error is a possible value of a discriminant. The postcondition = applies to the Image function. I see no way to drift from the latter to = = the former. I understood you asked me what is the meaning of the value = Format_Error, not what is the meaning of the postcondition. > which is of Ada's variant record type. Are you designing compiler test= s? Excuse me, I don't understand. -- = =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