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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c9d5fc258548b22a X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!r19g2000prm.googlegroups.com!not-for-mail From: Shark8 Newsgroups: comp.lang.ada Subject: Re: How do I write directly to a memory address? Date: Wed, 9 Feb 2011 16:35:33 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <67063a5b-f588-45ea-bf22-ca4ba0196ee6@l11g2000yqb.googlegroups.com> <9a8njlwvey1p.1a96yvvgdf6yu.dlg@40tude.net> <4d52c5e5$0$19486$882e7ee2@usenet-news.net> <720b7e8f-1ae2-4b3b-851e-12b08b3c99e0@r4g2000prm.googlegroups.com> <4d52dd97$0$18057$882e7ee2@usenet-news.net> <9a8f406d-05ca-4bf3-8487-918d4e0dd634@o18g2000prh.googlegroups.com> <4d52ee47$0$18057$882e7ee2@usenet-news.net> <4d5306a0$0$18057$882e7ee2@usenet-news.net> <76c123ab-7425-44d8-b26d-b2b41a9aa42b@o7g2000prn.googlegroups.com> <4d5310ab$0$18057$882e7ee2@usenet-news.net> <9bff52ca-6213-41da-8fa4-3a4cdd8086d3@y36g2000pra.googlegroups.com> <4d5315c8$0$18057$882e7ee2@usenet-news.net> <159dca70-2103-46d7-beb2-c7754d30fe36@k15g2000prk.googlegroups.com> <4d53222d$0$18057$882e7ee2@usenet-news.net> NNTP-Posting-Host: 174.28.151.164 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1297298133 9943 127.0.0.1 (10 Feb 2011 00:35:33 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 10 Feb 2011 00:35:33 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: r19g2000prm.googlegroups.com; posting-host=174.28.151.164; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729; .NET4.0E),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:17193 Date: 2011-02-09T16:35:33-08:00 List-Id: On Feb 9, 4:24=A0pm, Hyman Rosen wrote: > On 2/9/2011 6:07 PM, Shark8 wrote: > > > In this context your "I really need to know what my subprogram > > is going to do" seems very much like some college-kid whining > > about how he "really needs to know what happens in book X," > > while decrying people telling him "read the book." > > > This is precisely to say that just as in reading the book the > > answer to the question is answered, so to is your "I need to > > know what happens" answered when a) contracts are made > > and enforced AND b) proofs of completeness& =A0correctness > > are done. > > OK, I see that my attempts at being Socratic and oracular > are failing. What I'm trying to demonstrate is that the > chatter here about requirements and specifications and > contracts fails to capture essential aspects of programs > and even in Ada there's a good chance that you'll have to > read the bodies to know what's going on. (Thanks for playing > into that with the "read the book" example.) > The problem with my SumTo subprogram is that it's liable to > raise Storage_Error for a wide range of legal arguments. But are they your intended arguments? As MANY here have pointed out having (int x) is NOT a guarantee that X is not zero, nor is it guarantee it is not negative. And yet many C programmers ASSUME that they *ARE* whether based on comments or just assumptions is irrelevant to that point. In Ada we *CAN* control our inputs, ie ( X : In Positive ) cannot be attempted when X < Positive'First. And as was shown earlier, with Ada 2012 we'll be able to constrain 'X' to be odd, or whatever. > The > problem with my Exponent subprogram is that its running time > is enormous. So, you didn't indicate that time was an issue. You assumed that I would believe it to be, but as we were discussing completeness/correctness and the running time was, in a word, irrelevant. > Neither of these aspects can be made visible > through Ada language facilities, and typical mathematical > proofs of correctness won't show you this either. So? In the context of our conversation NEITHER of those were an issue. > Just like C programmers, you Ada folks still find a way to > get your work done, though. Yep.