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.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1e5c102037393131 X-Google-Attributes: gid103376,public From: stimuli@my-dejanews.com Subject: Re: Assertions Date: 1999/05/20 Message-ID: <7i2015$jut$1@nnrp1.deja.com>#1/1 X-Deja-AN: 480261584 References: <3736D243.1EEBF1AB@globalnet.co.uk> <3736F549.E3DDCDEB@pwfl.com> <7h83lc$rd$1@nnrp1.deja.com> <3739CECA.6A49865B@averstar.com> <7hqe7m$q7i@sjx-ixn1.ix.netcom.com> <3742eba6@eeyore.callnetuk.com> <7hv6bb$1l9@dfw-ixnews6.ix.netcom.com> X-Http-Proxy: 1.0 x41.deja.com:80 (Squid/1.1.22) for client 207.17.59.240 Organization: Deja.com - Share what you know. Learn what you don't. X-Article-Creation-Date: Thu May 20 21:49:25 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.07 [en] (X11; I; Linux 2.0.36 i486) Date: 1999-05-20T00:00:00+00:00 List-Id: In article <7hv6bb$1l9@dfw-ixnews6.ix.netcom.com>, Richard D Riehle wrote: > The Require, Ensure, and Invariant conditions may be applied to > a subprogram, a type, or a even some variable. The designer of > Eiffel (who did not invent these ideas but incorporated them into > the design of his language), calls this "design by contract." It > is important to understand that this is a run-time contract. Many > safety-critical software practitioners feel this is the wrong place > to evaluate assertions. The SPARK language takes a more conservative > approach to the same idea. Ada probably needs an approach somewhere > between SPARK and Eiffel. This isn't entirely true, although I think I understand your point. The Eiffel contract is not a run-time concept, it is a static property of correct Eiffel systems (read: correct Eiffel programs). How an Eiffel compiler goes about testing these is implementation dependant. In fact, they needn't actually be checked as they have null semantics within a correct program. It would be correct Eiffel for a compiler to check the validity of the assertions at compile time and a correct Eiffel program needn't check them at all. Now, given that a general theorem checker for Eiffel is, in practical terms, very unlikely, most Eiffel implementations perform runtime checks of the assertions. This is a useful tool for testing and debugging, but it is not the greater part of what assertions are. -- Jeffrey L. Straszheim stimuli@my-dejanews.com --== Sent via Deja.com http://www.deja.com/ ==-- ---Share what you know. Learn what you don't.---