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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "G.B." Newsgroups: comp.lang.ada Subject: Re: Ada 2012 Constraints (WRT an Ada IR) Date: Wed, 14 Dec 2016 19:55:17 +0100 Organization: A noiseless patient Spider Message-ID: References: Reply-To: nonlegitur@notmyhomepage.de Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 14 Dec 2016 18:53:54 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="d7777aaea4e05f5460ede15b9236d665"; logging-data="15310"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+WXAcpzcVfaaEtZTab3VcocoRVgc9BFpM=" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 In-Reply-To: Cancel-Lock: sha1:yR6IwO76VspvKe1UYxxZR+e2t2k= Xref: news.eternal-september.org comp.lang.ada:32826 Date: 2016-12-14T19:55:17+01:00 List-Id: On 14/12/2016 17:55, Dmitry A. Kazakov wrote: > You cannot say it in Ada, as the example shows. You must do that in English or in SPARK or in any other language where you can *spell* it. In Ada you cannot. It? Boolean expressions or expressions about Boolean expressions? Rules of inference? Proofs? Why? A contract does not argue. Automatic quantifiers are obviously present when A and B are parameters, and they are of a MUST kind if the programmer doesn't reduce them in rank to SHALL or MAY by controlling checking, say. function ... (A, B: T) return ... with Pre => A > B; Pre is meant to hold for *any* pair of values A and B, to be passed to the function. So the programmer can infer a universal requirement. It is of no concern how any tool or any programmer arrives at Pre. If he arrives at Pre => True, then this can be well-reasoned. Does the client programmer care?