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 autolearn=unavailable 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: Paul Rubin Newsgroups: comp.lang.ada Subject: Re: Ada 2012 Constraints (WRT an Ada IR) Date: Sun, 11 Dec 2016 15:58:51 -0800 Organization: A noiseless patient Spider Message-ID: <87eg1e2f2c.fsf@nightsong.com> References: <47366b42-c0a3-41bf-a44a-5241c109d60f@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="1b1f5d1902f589a0faa1ce74163e61b3"; logging-data="25598"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19xj3BCSP/XIMkA+PlpULkK" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:70WkPQHYWHL5eTICZGAk+VP/AB4= sha1:9p9H+xRtHCc42MPVsKtPYZKPL0Y= Xref: news.eternal-september.org comp.lang.ada:32733 Date: 2016-12-11T15:58:51-08:00 List-Id: "G.B." writes: > CLU uses "requires", Eiffel uses "require" for Pre, > perhaps preventing a misunderstanding: > Pre only happens to be descriptive in proven programs. > Pre is really meant for programmers unconditionally. > Pre produces a maximally informed start for programming. I thought Eiffel contracts could be checked at either compile time or run time. Dijkstra's original description of preconditions didn't involve any type of compile time checking. Preconditions/contracts state assumptions of the implementation, and if you can prove them, that's great, but I don't remember hearing this was required. Ada certainly allows Pre=> to be checked at runtime. I'd be interested to know what happens if you try to compile a SPARK program with outstanding verification conditions (proof obligations).