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,69c50fc0d29ced1b X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,UTF8 Path: g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!usenet-fr.net!gegeweb.org!aioe.org!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Q: SPARK visibility rules and inherit annotations. Date: Tue, 25 May 2010 22:58:41 +0200 Organization: Ada At Home Message-ID: References: <4bf3fce5$0$2399$4d3efbfe@news.sover.net> <568bb04d-6ad6-46da-9eb2-8d81c8c52b59@v18g2000vbc.googlegroups.com> <4bf45732$0$2407$4d3efbfe@news.sover.net> <85kj72Fhu9U1@mid.individual.net> <85n6d9F9v4U1@mid.individual.net> 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:11992 Date: 2010-05-25T22:58:41+02:00 List-Id: Le Fri, 21 May 2010 12:42:53 +0200, Gavino a = =C3=A9crit: > Firstly, derived types can introduce overloaded enumeration literals, = = > which > SPARK prohibits. > Secondly, if the parent type is one declared immediately within the = > visible > part of a package, then certain subprograms declared there are implici= tly > declared for the derived type, again a form of overloading. Yes, I forget about it, and especially about the first one (about = enumeration literals). This part of the one which is the most troublesome to me with SPARK, as = I = like to =E2=80=9Ctype ... is new ...=E2=80=9D some types are not be mixe= d and the = interface defines special function when it is required. At least, when = mixed is done, this is clearly visible and this is a clear indication on= = source review to look at it three times better than two. Subtype is nice with SPARK, as validity conditions are checked. But if t= he = source is to be as nice with and without SPARK, some troubles comes : = subtype are not so much nice without SPARK. Ada with SPARK less needs = derived types, and subtype is enough, but Ada without SPARK, needs deriv= ed = types. So I can't have something which is good without SPARK too... or I= = have to make all numeric types independent, but doing so, I miss the = expression of relations between these types. Any way, thanks for your reply, which was the good one (this recalled me= a = detail I had forget, as I'm not really relying on it). -- = There is even better than a pragma Assert: a SPARK --# check.