From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.7 required=3.0 tests=BAYES_00,NICE_REPLY_A, REPLYTO_WITHOUT_TO_CC,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 Path: eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: "G.B." Newsgroups: comp.lang.ada Subject: Re: Contracts in generic formal subprogram Date: Tue, 11 Apr 2023 07:56:45 +0200 Organization: A noiseless patient Spider Message-ID: References: <0c555ce7-0b2e-49f1-8930-c4f4796793e4n@googlegroups.com> Reply-To: nonlegitur@notmyhomepage.de MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 11 Apr 2023 05:56:46 -0000 (UTC) Injection-Info: dont-email.me; posting-host="77848faf56a99f3292bb4fbbfcbf873c"; logging-data="2723360"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/yo2UZ66HtpJIUi8Vx27duHCgMnuz/kG0=" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Cancel-Lock: sha1:p9OwrvRO61gqGR/UQoVdSOFr0RE= In-Reply-To: Content-Language: en-US Xref: feeder.eternal-september.org comp.lang.ada:65086 List-Id: On 08.04.23 10:02, Dmitry A. Kazakov wrote: > On 2023-04-08 09:00, mockturtle wrote: > >> Should the actual subprogram specify the same contract? I am not sure (and I guess this could be a stumbling block for the adoption of this idea). > > The general principle of substitutability is that the preconditions can be weakened, the postoconditions can be strengthened. Side track: "weak" and "strong" alone sounding like a valuation to the uninitiated, but neither technical nor precise; and the "objects" of comparison of sets of conditions being implicit; and the ARM not defining a technical term for these adjectives unless weak ordering helps. If these adjectives induce confusion, can they be avoided? E.g., by instead mentioning the sets of Pre- and Post-conditions of those actual/formal/overriding subprograms. I guess that super- and subset relations will permit helpfully defining an ordering to be understood (in general, if not in the ARM).