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,aa0ebfe6afda2b3 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Path: g2news2.google.com!news3.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!138.195.8.3.MISMATCH!news.ecp.fr!aioe.org!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: =?utf-8?B?U1BBUksgc3ludGF4IGFuZCDigJx1c2UgdHlwZeKAnSA6IGxhY2sgb2YgZmU=?= =?utf-8?B?YXR1cmUgPw==?= Date: Tue, 25 May 2010 22:16:02 +0200 Organization: Ada At Home Message-ID: References: <17c936fc-66ce-4bb9-ba5a-069d9ed5a2fe@l6g2000vbo.googlegroups.com> <2ad2886d-3d2c-44b2-bcfe-59172f76436d@q8g2000vbm.googlegroups.com> NNTP-Posting-Host: lwoedXCBwVNAtSGnEUHIWA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: Opera Mail/10.53 (Win32) Xref: g2news2.google.com comp.lang.ada:11987 Date: 2010-05-25T22:16:02+02:00 List-Id: Le Tue, 25 May 2010 09:29:43 +0200, Rod Chapman = a =C3=A9crit: >> On May 25, 12:01 am, Phil Thornley = >> wrote: > > Phil is basically correct. > > "use type" is only permitted in the language definition in two places:= > > 1) As a context clause > > 2) Directly following an embedded package specification. > > BUT... > > 1) is fully implemented. > > 2) is NOT implemented by any version of the Examiner. > > This is documented (somewhat briefly) in section 11.1.1 of > the toolset release note, and page 402 of the book. > - Rod Unfortunately, I've understood the documentation is somewhat incorrect o= r = at least is missing some stuffs, so I'm not always referring to it. As an example, the SPARK 95 reference states that renames clause can be = = use to drop parent part of package path only and the package have to be = = renamed using its original name exactly ; so, Parent.Child should only b= e = renamed as Child to be able to refer to it without having to write the = =E2=80=9CParent.=E2=80=9D every where. But I could rename some package using other names. The same with = procedures renaming. The same with generics. The SPARK reference say the only generic = instantiation allowed is instantiation of Unchecked_Conversion. However,= I = have some generic packages instantiation, and the syntax checker do not = = complain at all about it. Well, may be it will fail later at the semanti= c = analysis, I hope not, or else I will have to drop SPARK... I believe it = = will be OK, as I saw some words somewhere stating SPARK now support = generic. Time to say I've also encountered strange things with generic = instantiation. I can instantiate a generic package only if the package = name has no prefix and trying to instantiate something like =E2=80=9Cis = new = Parent.Child (Formal_Parameter =3D> ...)=E2=80=9D fails, and =E2=80=9Cis= new Child = (Formal_Parameter =3D> ...)=E2=80=9D is accepted. -- = There is even better than a pragma Assert: a SPARK --# check.