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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c8d893e8045967db X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-04-16 06:37:11 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!iad-peer.news.verio.net!news.verio.net!newsfeed.vmunix.org!news-FFM2.ecrc.net!news.iks-jena.de!not-for-mail From: Lutz Donnerhacke Newsgroups: comp.lang.ada Subject: Re: [Spark] Using defered constants Date: Wed, 16 Apr 2003 13:37:11 +0000 (UTC) Organization: IKS GmbH Jena Message-ID: References: NNTP-Posting-Host: taranis.iks-jena.de X-Trace: branwen.iks-jena.de 1050500231 26020 217.17.192.37 (16 Apr 2003 13:37:11 GMT) X-Complaints-To: usenet@iks-jena.de NNTP-Posting-Date: Wed, 16 Apr 2003 13:37:11 +0000 (UTC) User-Agent: slrn/0.9.7.4 (Linux) Xref: archiver1.google.com comp.lang.ada:36184 Date: 2003-04-16T13:37:11+00:00 List-Id: * Rod Chapman wrote: > Lutz Donnerhacke wrote in message news:> 7 private >> 8 --# hide t; >> 9 type x is new Integer; >> 10 cx : constant x := 0; >> 11 end t; > > Tricky! You are trying to arrange a package as follows: > Visible spec: SPARK > Private part of spec: hidden, Ada95 > Body: SPARK Ack. > This is actually very difficult, since logically the private is > _is_ part of the body! But the initialisation of deferred constants is elaborated before the body of the package. It's impossible to move the initialisation into the body itself. Therefore the examiner must assume, that the hidden part will initialisation the deferred constant. > In partiular, the Examiner does not assume anything much about the > content of the private part when analysing the body, hence the error that > you're seeing. Bad. Sad. > Obvious point: why "type x is new Integer;"?? Do you really > need an explicit derived type there? It's an example. I need an access type there.