comp.lang.ada
 help / color / mirror / Atom feed
From: "Peter C. Chapin" <pcc482719@gmail.com>
Subject: Re: Q: SPARK visibility rules and inherit annotations.
Date: Wed, 19 May 2010 17:29:22 -0400
Date: 2010-05-19T17:29:22-04:00	[thread overview]
Message-ID: <4bf45732$0$2407$4d3efbfe@news.sover.net> (raw)
In-Reply-To: 568bb04d-6ad6-46da-9eb2-8d81c8c52b59@v18g2000vbc.googlegroups.com

Phil Thornley wrote:

> Peter,
> 
> The problem comes from the reference in one child of TMLib to another
> child of TMLib.
> 
> Where this is the case, in the code and annotations - but not in the
> inherit or context clauses - the common parent must not appear in the
> name.
> 
> So change the line:
>    (Raw_Data   : in TMLib.Cryptographic_Services.Octet_Array;
> to:
>    (Raw_Data   : in Cryptographic_Services.Octet_Array;

That did the trick, thanks. Now that you mention it, I seem to recall this
coming up for me before, although it was a while ago now.

Thanks for your explanation as well.

One thing I like about Ada in general is how you can express a design in
package specifications and then let the compiler check a few things about its
consistency before embarking on the implementation. With SPARK that effect is
even greater. For example in my Cryptographic_Services package the Examiner
initially complained about how there was no way to initialize one of my
private types. It was an oversight on my part (I was missing a critical
operation). I would have figured it out eventually, I'm sure, but it was nice
to have the issue caught earlier rather than later. It made me reflect on
what I was really trying to accomplish with the package and that can only be
a good thing.

Peter




  reply	other threads:[~2010-05-19 21:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-19 15:04 Q: SPARK visibility rules and inherit annotations Peter C. Chapin
2010-05-19 15:54 ` Phil Thornley
2010-05-19 21:29   ` Peter C. Chapin [this message]
2010-05-20  1:47     ` Yannick Duchêne (Hibou57)
2010-05-20 11:03       ` Gavino
2010-05-20 15:58         ` Yannick Duchêne (Hibou57)
2010-05-21 10:42           ` Gavino
2010-05-25 20:58             ` Yannick Duchêne (Hibou57)
2010-05-19 16:22 ` Yannick Duchêne (Hibou57)
2010-05-19 20:41   ` Gavino
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox