comp.lang.ada
 help / color / mirror / Atom feed
* Q: SPARK visibility rules and inherit annotations.
@ 2010-05-19 15:04 Peter C. Chapin
  2010-05-19 15:54 ` Phil Thornley
  2010-05-19 16:22 ` Yannick Duchêne (Hibou57)
  0 siblings, 2 replies; 10+ messages in thread
From: Peter C. Chapin @ 2010-05-19 15:04 UTC (permalink / raw)


I'm working on a SPARK program. Right now I'm just doing design so my focus is
on package specifications; there are no package bodies. I'm having some
trouble with the following:

with TMLib.Cryptographic_Services;

--# inherit TMLib.Cryptographic_Services;
package TMLib.Credentials is
   type Credential_Type is private;

   -- Converts the raw bytes of a certificate transfer format to a credential.
   procedure Certificate_To_Credential
     (Raw_Data   : in TMLib.Cryptographic_Services.Octet_Array;
      Credential : out Credential_Type;
      Valid      : out Boolean);
   --# derives Credential from Raw_Data &
   --#         Valid      from Raw_Data;

   -- Other stuff not shown here...
end TMLib.Credentials;

The SPARK Examiner complains about the use of "Cryptographic_Services" in the
declaration of the Raw_Data parameter to the procedure. Specifically I get
error 754 that says (roughly) "The identifier Cryptographic_Services is not
declared or not visible." I am then told that I probably need both a 'with'
statement in the context clause and an 'inherit' annotation. Don't I have
those things?

Note that TMLib.Cryptographic_Services examines without error but it does
generate a warning because the private section is empty and currently hidden
from SPARK with a 'hide' annotation. It seems unlikely to me that has
anything to do with my problem. Note that TMLib.Cryptographic_Services is a
public child of TMLib.

I tried adding a 'with TMLib;' in the context clause but that didn't have any
effect. I realize the problem is probably something silly but I'm a bit
baffled here. Any pointers would be appreciated.

Thanks!

Peter




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-05-25 20:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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