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: 103376,45a9122ddf5fcf5 X-Google-Attributes: gid103376,public From: Ken Garlington Subject: Re: Valid Attribute and Unchecked Conversion Date: 1996/10/14 Message-ID: <32620919.1C02@lmtas.lmco.com>#1/1 X-Deja-AN: 189326130 references: <1996Oct1.100608.1@eisner> <325D44F2.32F5@lmtas.lmco.com> content-type: text/plain; charset=us-ascii organization: Lockheed Martin Tactical Aircraft Systems mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 2.02 (Macintosh; I; 68K) Date: 1996-10-14T00:00:00+00:00 List-Id: Robert Dewar wrote: > > "Can't we go a little further, and write an AI (similar to the Ada 83 AI on > unchecked conversion between scalars of the same size) to formally document > what should happen? It's good that the AARM says "act sensibly," but wouldn't > an AI be better?" > > Well the first step is for someone to write a question and send it to > the appopriate email address (see Ada 95 RM). This will usually result > in an AI prepared by Bob Duff, although he will be happy to have help! > > But this is not an easy AI to write. In particular, I suggest restricting > it to discrete types rather than scalar types, since floating-point types > are contentious because of signalling Nan's. > > Also, be sure to think in terms of conversion between scalar *types* and > not scalar *objects*, since this is what UC is about. I am not quite > sure what the abbreviation scalars means above, but it smacks of scalar > object to me! It does, indeed, smack of scalar object, for the reason that 'Valid is applied to scalar objects, not scalar types. I agree that UC is defined in terms of types, but at some level it will have to be tied to the properties of scalar (more likely discrete, as you said) objects, won't it? Otherwise, we may still have the annoying proposition that: Y := Unchecked_Whatever(Z); if not Y'Valid then raise Whatever_Error; end if; is not guaranteed to work for any given compiler, even assuming some reasonable restrictions on Y and Z (e.g., Y'Size >= Z'Size, both are discrete). -- LMTAS - "Our Brand Means Quality" For more info, see http://www.lmtas.com or http://www.lmco.com