From: "Peter C. Chapin" <pcc482719@gmail.com>
Subject: Q: SPARK visibility rules and inherit annotations.
Date: Wed, 19 May 2010 11:04:05 -0400
Date: 2010-05-19T11:04:05-04:00 [thread overview]
Message-ID: <4bf3fce5$0$2399$4d3efbfe@news.sover.net> (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
next reply other threads:[~2010-05-19 15:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-19 15:04 Peter C. Chapin [this message]
2010-05-19 15:54 ` Q: SPARK visibility rules and inherit annotations 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
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox