comp.lang.ada
 help / color / mirror / Atom feed
* SPARK code samples
@ 2010-08-11  8:44 Dmitry A. Kazakov
  2010-08-11 11:38 ` Ada novice
  2010-08-11 15:26 ` Yannick Duchêne (Hibou57)
  0 siblings, 2 replies; 28+ messages in thread
From: Dmitry A. Kazakov @ 2010-08-11  8:44 UTC (permalink / raw)


Since evidently growing interest in SPARK Ada and availability of public
SPARK compiler, I welcome those who are interested in learning and testing
SPARK to contribute their solutions to the Rosetta Code:

   http://rosettacode.org/wiki/Main_Page

The Rosetta Code has a half of thousand programming tasks defined. The
tasks are solved almost any programming language ever existed. Ada is well
represented in Rosetta, but SPARK is not. (Clearly, not all tasks could be
implemented in SPARK)

Rosetta is pretty liberal, everyone can register and contribute. The
SPARK's page is:

   http://rosettacode.org/wiki/SPARK

Thanks.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



^ permalink raw reply	[flat|nested] 28+ messages in thread
* Re: SPARK code samples
@ 2010-08-11 17:32 Mark Lorenzen
  2010-08-11 17:39 ` Ada novice
  0 siblings, 1 reply; 28+ messages in thread
From: Mark Lorenzen @ 2010-08-11 17:32 UTC (permalink / raw)


On 11 Aug., 18:33, "(see below)" <yaldni...@blueyonder.co.uk> wrote:
> On 11/08/2010 17:07, in article
> fa1507ef-77a8-4a28-b271-2293c5115...@j8g2000yqd.googlegroups.com, "Mark
>
> Lorenzen" <mark.loren...@gmail.com> wrote:
> > On 11 Aug., 13:38, Ada novice <ycalleecha...@gmx.com> wrote:
>
> >> Thanks for this information. I'm interested to learn SPARK. If I
> >> understand correctly, SPARK aligns itself well with Ada 95 and not yet
> >> with Ada 05. Is this because of the strictness of SPARK to provide
> >> highly reliable codes and hence it contains only well-tested features
> >> (subset of Ada features)? It would be interesting to see some SPARK
> >> codes on the wiki page building over time.
>
> > Not quite. SPARK is a proper subset of Ada and is amenable to static
> > analysis. This has (in principle) nothing to do with if an Ada feature
> > is well-tested or not. You should think of SPARK as a language in its
> > own right and not as a subset of some other language.
>
> Why?
>
> --
> Bill Findlay
> <surname><forename> chez blueyonder.co.uk

I take it you refer to my last sentence.

First of all because SPARK is not only a set of restrictions imposed
on the Ada language, SPARK also mandates the use of annotations (and
even more so if you want to prove program correctnes). As SPARK
annotations are written as Ada comments, it is true that every SPARK
program is also an Ada program and that may be why people often think
of SPARK as "just" a subset of Ada [1].

I also think there is a risk of getting stuck with SPARK if you try to
design a SPARK program with Ada in mind. You constantly bump into a
useful feature of Ada that is not in SPARK (discriminated types, array
slicing etc.) and you think "why the h... isn't that a part of SPARK
when it's so easy to do in Ada?". So it's probably a way of tuning
your mindset from "Ada with restrictions" into SPARK.

[1] Purists may argue that even with the presence formal annotations,
every SPARK program will be a member of the set of all Ada programs
that include every permutation of every legal comment in every legal
place. Or what?

- Mark L



^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2010-08-12 22:03 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-11  8:44 SPARK code samples Dmitry A. Kazakov
2010-08-11 11:38 ` Ada novice
2010-08-11 13:54   ` Yannick Duchêne (Hibou57)
2010-08-11 16:07   ` Mark Lorenzen
2010-08-11 16:33     ` (see below)
2010-08-11 16:45     ` Yannick Duchêne (Hibou57)
2010-08-11 16:50       ` Yannick Duchêne (Hibou57)
2010-08-11 17:10       ` Ada novice
2010-08-11 18:21         ` Yannick Duchêne (Hibou57)
2010-08-12 12:08           ` Ada novice
2010-08-12 22:03             ` Phil Thornley
2010-08-11 15:26 ` Yannick Duchêne (Hibou57)
2010-08-11 17:33   ` Dmitry A. Kazakov
2010-08-12  2:39     ` Yannick Duchêne (Hibou57)
2010-08-12  5:02       ` Jeffrey Carter
2010-08-12 13:31         ` Yannick Duchêne (Hibou57)
2010-08-12  7:16       ` cjpsimon
2010-08-12  7:29       ` Maciej Sobczak
2010-08-12 13:41         ` Yannick Duchêne (Hibou57)
2010-08-12  9:46       ` Jacob Sparre Andersen
2010-08-12 13:43         ` Yannick Duchêne (Hibou57)
2010-08-12 13:58           ` Jacob Sparre Andersen
2010-08-12  3:03     ` Yannick Duchêne (Hibou57)
  -- strict thread matches above, loose matches on Subject: below --
2010-08-11 17:32 Mark Lorenzen
2010-08-11 17:39 ` Ada novice
2010-08-11 17:45   ` (see below)
2010-08-11 18:00     ` Ada novice
2010-08-11 18:17       ` Yannick Duchêne (Hibou57)

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