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 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,2c6139ce13be9980 X-Google-Attributes: gidfac41,public X-Google-Thread: 103376,3d3f20d31be1c33a X-Google-Attributes: gid103376,public From: "W. Wesley Groleau x4923" Subject: Re: Separation of IF and Imp: process issue? Date: 1997/09/10 Message-ID: <3416D889.4A6C@pseserv3.fw.hac.com>#1/1 X-Deja-AN: 271349448 Sender: usenet@most.fw.hac.com (News Administration) X-Nntp-Posting-Host: sparc01 References: <33E9ADE9.4709@flash.net> <5upe9k$7he@newshub.atmnet.net> <5utag9$o6s@newshub.atmnet.net> <3416ad14.0@news.uni-ulm.de> Organization: Hughes Defense Communications Newsgroups: comp.lang.ada,comp.lang.eiffel Date: 1997-09-10T00:00:00+00:00 List-Id: > What about having pre- and postconditions in the spec file? At least > for preconditions this should be possible. Postconditions may depend > on internal and thus private class information, so there might be a > problem. Realize also that not everything from the Ada spec is > repeated ind the body: type or task declarations for instance. I claimed before (perhaps wrongly) that adding assertions to Ada seemed fairly trivial, but even if correct, there is one aspect that would NOT be trivial. Since an Eiffel-style assertion is part of the contract, BUT it is executed when a routine is called, how can it be put in an Ada spec in a form that is compilable AND associated with a particular declaration? One could make subprogram declarations consistent with tasks, i.e., a begin..end to contain the info the client needs. Or something like pragma Require ( , [Precondition =>] ); pragma Ensure ( , [Postcondition =>] ); pragma Invariant ( , [??????????? =>] ); A compiler could even use the presence of such a pragma (as with Inline) to affect optimization or checking in clients. But what would that do to the "no semntic effect" guideline for pragmas in RM 2.8(11,16,etc.) ? -- ---------------------------------------------------------------------- Wes Groleau, Hughes Defense Communications, Fort Wayne, IN USA Senior Software Engineer - AFATDS Tool-smith Wanna-be wwgrol AT pseserv3.fw.hac.com Don't send advertisements to this domain unless asked! All disk space on fw.hac.com hosts belongs to either Hughes Defense Communications or the United States government. Using email to store YOUR advertising on them is trespassing! ----------------------------------------------------------------------