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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,640b65cbfbab7216 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Ada.Strings.Bounded Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <47F26C46.3010607@obry.net> <44d88b93-6a90-4c18-8785-2164934ba700@a9g2000prl.googlegroups.com> <47F652F7.9050502@obry.net> <47f7028d$1_6@news.bluewin.ch> <47F749CB.30806@obry.net> <96x8my4o4m7e.fskzcb6i31ty$.dlg@40tude.net> <276e98e3-3b3b-4cbf-b85c-dcae79f11ec5@b5g2000pri.googlegroups.com> <013e1d52-c25f-49ea-83ef-6ac4860858bf@s13g2000prd.googlegroups.com> <8g2rpvi2ahu0$.1ebsyq5yu1whf.dlg@40tude.net> <9a3ad8ca-9f44-42db-9f7c-c5f9e3ee60f3@w1g2000prd.googlegroups.com> Date: Mon, 14 Apr 2008 20:52:16 +0200 Message-ID: <1jdzw15tbj376$.nyv9yml75wj4$.dlg@40tude.net> NNTP-Posting-Date: 14 Apr 2008 20:52:16 CEST NNTP-Posting-Host: 48ae97dc.newsspool4.arcor-online.net X-Trace: DXC=j^YK2d2J2TBBSN>>[6LHn;2LCV>COgUkn_?_Y?bhT2iZhmfR45MOk5^;a^]3 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:20944 Date: 2008-04-14T20:52:16+02:00 List-Id: On Mon, 14 Apr 2008 08:50:21 -0700 (PDT), Eric Hughes wrote: > On Apr 14, 3:07 am, "Dmitry A. Kazakov" > wrote: >> If you are aiming at Liskov substitutability >> principle, > > But I'm not aiming for that. It's related, to be sure, but it's not > the same. If you don't acknowledge that a universal type is a > different creature than an ordinary type, then you would have to see > only preexisting relationships. I think it is wrong to consider N and universal_integer equivalent. >>> So I can now outline what the relationship ought to be: >>> -- The set of values of an implemented type is >>> a _subset_ of the terms of the universal type. >> >> Counterexample: NaN of Float. > > I take from what you're saying that the ordinary way of bringing > floating point arithmetic into a language is not an implementation of > universal Real numbers. That's true. It is not a subset of R. Subseting is not a sufficient condition for a successful modeling. Actually it is the opposite, a perfect subset cannot be a good model. The best models of R aren't even close to subsets. For example intervals with rational bounds. >> The set of values of a derived type is neither subset or superset. It is a >> different set. > > If you insist, but this is not derivation. It makes life a lot easier. Otherwise you will need to introduce encodings, have to define the underlying bit patterns, and will never be able to abstract implementations. >>> -- The set of operators on an implemented type >>> _satisfy_ the axioms of the universal type. >> >> This cannot work because any implementation is necessarily a DFA. > > ??? Programs are DFA (except hardware interrupts etc). -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de