comp.lang.ada
 help / color / mirror / Atom feed
From: xorque <xorquewasp@googlemail.com>
Subject: Hide annotations on procedures.
Date: Fri, 12 Jun 2009 06:35:10 -0700 (PDT)
Date: 2009-06-12T06:35:10-07:00	[thread overview]
Message-ID: <ad97349f-ddb7-4a9d-8ce6-004088016827@b9g2000yqm.googlegroups.com> (raw)

Having failed to take the day off from learning SPARK, I've run into
a strange problem regarding procedure annotations.

I have the following in a package body:

  procedure C_Readlink_Boundary
    (File_Name     : in String;
     Buffer        : out String;
     Buffer_Size   : in File.File_Name_Index_t;
     Returned_Size : out C_Types.Signed_Size_t)
  is
    --# hide C_Readlink_Boundary
  begin
    null;
  end C_Readlink_Boundary;

The body of the procedure is obviously not implemented yet. The
procedure
itself is defined only in the body of the package, not accessible from
outside.
The body of the procedure is intended to be hidden from SPARK. The
problem
I have is that SPARK doesn't seem to get it:

   7    procedure C_Readlink_Boundary
                  ^
***        Semantic Error    :154: The subprogram or task body
C_Readlink_Boundary
           does not have an annotation.

The procedure doesn't touch any global variables. Any 'derives'
annotation added to the procedure is rejected by SPARK (as it would
need to
go on the procedure specification - which doesn't exist). I've used
the same
pattern on functions, not procedures, and SPARK has accepted it.

What have I done wrong here?



             reply	other threads:[~2009-06-12 13:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-12 13:35 xorque [this message]
2009-06-12 13:51 ` Hide annotations on procedures Phil Thornley
2009-06-12 20:47   ` xorque
replies disabled

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