comp.lang.ada
 help / color / mirror / Atom feed
From: "Peter C. Chapin" <chapinp@acm.org>
Subject: Re: Another question about fixed point types.
Date: Sun, 29 Aug 2010 10:20:47 -0400
Date: 2010-08-29T10:20:47-04:00	[thread overview]
Message-ID: <4c7a6d04$0$2390$4d3efbfe@news.sover.net> (raw)
In-Reply-To: <fe942a67-b3f8-4195-bf7e-6e10201cb715@i13g2000yqe.googlegroups.com>

On 2010-08-29 08:31, Phil Thornley wrote:

> I was referring to the SPARK annotation that tells the Examiner which
> predefined type the compiler will use as the base type of a type
> declaration - it's needed for overflow checks and looks like:
> 
>    type An_Int is range -10_000 .. 10_000;
>    --# assert An_Int'Base is Short_Integer;
> 
> where the range for Short_Integer is defined in the SPARK
> configuration file

I see, okay. So am I right in saying that one should provide one of
these annotations for every scalar type definition in a SPARK program?
I'm guessing that by doing so SPARK could prove more automatically since
it would have more information. On the other hand it then becomes my
responsibility to get the base type right.

Peter




  parent reply	other threads:[~2010-08-29 14:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-28 22:45 Another question about fixed point types Peter C. Chapin
2010-08-29  6:32 ` Yannick Duchêne (Hibou57)
2010-08-29 11:23   ` Peter C. Chapin
2010-08-29  9:02 ` Phil Thornley
2010-08-29 11:29   ` Peter C. Chapin
2010-08-29 12:31     ` Phil Thornley
2010-08-29 13:49       ` Jeffrey Carter
2010-08-29 14:20       ` Peter C. Chapin [this message]
2010-08-29 17:50         ` Phil Thornley
2010-08-29 22:03           ` Peter C. Chapin
2010-08-30  8:50           ` Mark Lorenzen
2010-08-29 10:24 ` Simon Wright
2010-08-29 14:02 ` Stephen Leake
replies disabled

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