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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,bbe592428babd509 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!npeer01.iad.highwinds-media.com!feed-me.highwinds-media.com!cyclone01.ams2.highwinds-media.com!news.highwinds-media.com!eweka.nl!lightspeed.eweka.nl!news.netcologne.de!newsfeed-fusi2.netcologne.de!news.buerger.net!uucp.gnuu.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Tue, 27 Apr 2010 19:09:43 +0200 From: Georg Bauhaus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Integer overflow is int overflow (Re: Web browser in Ada) References: <02c2bf63-260d-4acc-bd58-c8fb8a591ec3@b6g2000yqi.googlegroups.com> <0bf9425c-32a1-4b93-b938-ae4a4e24a761@c21g2000yqk.googlegroups.com> <4bd1b090$0$7651$9b4e6d93@newsspool1.arcor-online.net> <4bd6d6e8$0$6892$9b4e6d93@newsspool2.arcor-online.net> <4bd70325$0$7666$9b4e6d93@newsspool1.arcor-online.net> <1k01d6ghve2o7.15fw3tjmkbb7s.dlg@40tude.net> In-Reply-To: <1k01d6ghve2o7.15fw3tjmkbb7s.dlg@40tude.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <4bd71a58$0$6889$9b4e6d93@newsspool2.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 27 Apr 2010 19:09:44 CEST NNTP-Posting-Host: e7ded3d0.newsspool2.arcor-online.net X-Trace: DXC=9?n;dODVWV>85[]]\]T081A9EHlD;3Yc24Fo<]lROoR18kF:Lh>_cHTX3j=CJUe_BnoAY6 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:11210 Date: 2010-04-27T19:09:44+02:00 List-Id: On 27.04.10 18:13, Dmitry A. Kazakov wrote: > On Tue, 27 Apr 2010 17:30:44 +0200, Georg Bauhaus wrote: > >> My conclusions would be that: >> >> Standard.Integer is a constrained subtype. Its objects are >> not like (what is commonly known as) integers, a set that can >> be extended at will. > > The set of integers is not extensible "at will." You probably meant that > for any integer there exists at least one [actually an infinitely countable > set] of greater or lesser integers. Nevertheless the set of integers (Z) is > fixed. Thanks for adding clarity. It is much needed. > The value is determined by the expression and the > language rules. (OK, nitpicking, there is no value denoted by a named number if determination does not actually happen. Words mean nothing unless they are given meaning. ;-) ;-) >> they are not objects, and they can hit compiler capacity limits. > > Whether they are [run-time] objects is up to compiler. The compiler in Ada > has certain freedom to "objectize" and "deobjectize" things. Thanks, I didn't know this. > You need overflow in order to define the behavior of the operations closed > only in Z. E.g. "+". True if it is not possible to define "+" in terms of saturation or wrap-around, I think. Correct? However, programmers do not define "+" in their C programs. They use "+"! Then overflow occurs, and not to prove the soundness of the language definition, but as a mishap.