comp.lang.ada
 help / color / mirror / Atom feed
From: Alexandre K <alexandre.nospam@gmail.com>
Subject: Re: Spark, pragma
Date: Fri, 28 May 2010 02:08:37 -0700 (PDT)
Date: 2010-05-28T02:08:37-07:00	[thread overview]
Message-ID: <9df19165-c809-48e5-b14b-b69f8af64e87@c13g2000vbr.googlegroups.com> (raw)
In-Reply-To: op.vden1ph0ule2fv@garhos

> Hi Alex,
>
> I've just tried the same as you did, a “pragma Style_Checks ("-s", Off);”  
> at the start of a package body, and could only get the classic warning,  
> not the one about SLI generation. Additionally, I could not find any  
> reference to a Warning 430 in the Examiner_UM documentation. Warning codes  
> exposed there stop at Warning 420, no code beyond.

But it exists in my manual, just after warning 420, and this is the
last one. (for me page 91)
Maybe as you mentionned this is due to Spark version, as I am using
Spark PRO v 9.0 with ada 2005 option.

> If this is not private stuff, can you post your body file here ?

It is not the real package, but I was experimenting few things on a
simple example, which has the error too.

 Spec:
package Test is
	type A is private;
	--# function V (I : A) return Boolean;
	function C (I : A) return Boolean;
	--  # return V (I);
	procedure Make_A (I : out A);
	--# derives I from ;
private
   subtype R is Integer range 0 .. 10;
   type A is record
      Z : R;
   end record;

end Test;

Body :
pragma Style_Checks ("-s");
package body Test is
   type E is record
      I : Integer;
   end record;
   type D is record
      J : Integer;
   end record;

   function C (I : A) return Boolean
   --# return I.Z > 10;
   is
   begin
      return I.Z > 10;
   end C;

   procedure Make_A (I : out A) is
   begin
      I := A'(Z => 3);
   end Make_A;
end Test;



>
> Cheers
>
> --
> There is even better than a pragma Assert: a SPARK --# check.
> --# check C and WhoKnowWhat and YouKnowWho;
> --# assert Ada;
> --  i.e. forget about previous premises which leads to conclusion
> --  and start with new conclusion as premise.




  reply	other threads:[~2010-05-28  9:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-28  7:34 Spark, pragma Alexandre K
2010-05-28  7:50 ` Yannick Duchêne (Hibou57)
2010-05-28  9:08   ` Alexandre K [this message]
2010-05-28  9:26     ` Yannick Duchêne (Hibou57)
2010-05-28  9:54       ` Alexandre K
2010-05-28 13:09         ` Alexandre K
replies disabled

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