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 13:21:01 +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 12:19:38 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="d7777aaea4e05f5460ede15b9236d665"; logging-data="26573"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ashbP3VPzUEV14HxEOD8JeFYvSK4HQdY=" 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:C/DqS/PEjS1DSS98nDsVXRDIciw= Xref: news.eternal-september.org comp.lang.ada:32814 Date: 2016-12-14T13:21:01+01:00 List-Id: On 13/12/2016 22:11, Dmitry A. Kazakov wrote: >> Right, Pre aspects are *not* body! > > They are being executed at run time. Actually, Pre aspects do not need to be executed at run-time. Nor do they need to be part of "the program" if checking, so not part of a body there. But they can be physically separate, so they could even be prevented from having side effects. Like the source of an interrupt that can be blocked. > But Ada expression A>B is not a predicate To any programmer concerned with the intent of ">", i.e. not with the LRM exegesis of operation ">", nor with some "unruly" user defined ">", etc. I bet that "A>B" is a sentence that has two variables, universally quantified, the universe being T. T is the type of both A and B and has the set of values for both A and B. So, as far as contract based programming by programmers goes, Pre => A > B is to mean that (forall A)(forall B)[A in T -> (B in T -> A > B)] SHALL be true so that the client gets what it deserves. Including the effects of unruly ">" if that Pre is checked somehow, somewhere, but that's for human lawyers and contract law because a failure (a) needs to be attributed, and (b) can actually be attributed: There is a contract stating Pre. >> I only asked for a relation between A and B as inputs to Plus_Too. > > No, you asked for an Ada program that evaluates a relation in connection with the semantics of Plus_To. And ... see above.