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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,23c0de5a42cf667e X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!b7g2000yqk.googlegroups.com!not-for-mail From: Phil Thornley Newsgroups: comp.lang.ada Subject: Re: GNAT packages in Linux distributions Date: Wed, 12 May 2010 08:59:21 -0700 (PDT) Organization: http://groups.google.com Message-ID: <4ebd36b8-ea2f-4879-aee6-2ac23a92ffc9@b7g2000yqk.googlegroups.com> References: <87mxw9x7no.fsf@ludovic-brenta.org> <16bz9kvbqa8y9$.155ntpwpwl29d.dlg@40tude.net> <4be97bea$0$2966$ba4acef3@reader.news.orange.fr> NNTP-Posting-Host: 80.177.171.182 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1273679961 29478 127.0.0.1 (12 May 2010 15:59:21 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 12 May 2010 15:59:21 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: b7g2000yqk.googlegroups.com; posting-host=80.177.171.182; posting-account=Fz1-yAoAAACc1SDCr-Py2qBj8xQ-qC2q User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:11557 Date: 2010-05-12T08:59:21-07:00 List-Id: On 12 May, 15:52, Yannick Duch=EAne (Hibou57) wrote: [snip] > > I'm just starting with SPARK, so I may be wrong : it seems to me recursio= n =A0 > is allowed if the stack usage is bounded (keep in mind I may be wrong). > Sorry, Yannick, but you are wrong. Recursion between subprograms in different packages is prohibited by the rule that mutual inheritance between packages is not allowed. Recursion between subprograms in a single package (including self- recursion) is prohibited by the rule that a subprogram cannot be called until all of its body has been declared. I don't think this is mentioned in the SPARK language description, but if you violate this rule you get semantic error 163: "Semantic Error :163: Subprogram XXX cannot be called from here. SPARK contains rules to prevent construction of programs containing recursive subprogram calls; this error message occurs if a procedure or function is called before its body has been declared. Re-ordering of subprogram bodies in the package concerned will be required." I haven't seen the latest SPARK version yet (still waiting for the GPL version) but I would be very surprised if this has changed since the last version. Cheers, Phil