comp.lang.ada
 help / color / mirror / Atom feed
From: roderick.chapman@googlemail.com
Subject: Re: SPARK Examiner -- visibility of Ada.Strings.Unbounded (and probably lots of other packages)
Date: Thu, 26 Mar 2009 08:35:15 -0700 (PDT)
Date: 2009-03-26T08:35:15-07:00	[thread overview]
Message-ID: <aab0062e-9734-406c-aa30-db9adae577b1@y13g2000yqn.googlegroups.com> (raw)
In-Reply-To: 49cb9cd8$0$31344$9b4e6d93@newsspool4.arcor-online.net

On Mar 26, 3:18 pm, Georg Bauhaus <rm.dash-bauh...@futureapps.de>
wrote:

> My outdated copy of the SPARK book describe a Spark I/O package.
> Also, package Interfaces does not pass, so if that is an important
> base for run-time support ...

You'll need what we call a "shadow" package specification that
offers a SPARK-friendly (i.e. legal SPARK) version of an
otherwise non-SPARK package.

You then use the Examiner's "index file" mechamisn to
make the Examiner read in the shadow specification, while
your compiler, of course, uses the "real" Ada version.

More info in the book in section 13.1.

Ada.Strings.Unbounded is likely to be very hard
to shadow, though, since it is full on non-SPARK
things like String_Access and returning String
from a function, which is beyond the run-time
library profile support by SPARK.


Same goes for Interfaces - most of it is legal SPARK,
but (in GNAT anyway) the overloading of the various
Shift_ and Rotate_ functions is not legal in SPARK.

If you really need access to those things, then
create a "thick binding" that "un-overloads" those
functions in a distinct package.   SPARK_IO
is an example of this - it offers a thick-binding
to the underlying Ada.Text_IO package.

 - Rod Chapman, SPARK Team




  reply	other threads:[~2009-03-26 15:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-26 14:50 SPARK Examiner -- visibility of Ada.Strings.Unbounded (and probably lots of other packages) Tim Rowe
2009-03-26 15:13 ` Ludovic Brenta
2009-03-26 15:18   ` Georg Bauhaus
2009-03-26 15:35     ` roderick.chapman [this message]
2009-03-26 17:06       ` Tim Rowe
2009-03-26 19:13         ` Tim Rowe
2009-03-27  8:27           ` JP Thornley
2009-03-27  8:34             ` roderick.chapman
2009-03-27 16:03               ` Tim Rowe
2009-03-26 15:40     ` roderick.chapman
2009-03-26 16:15   ` Tim Rowe
2009-03-26 16:26     ` roderick.chapman
2009-03-26 16:30     ` JP Thornley
2009-03-26 16:51     ` roderick.chapman
replies disabled

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