comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: The future of Spark . Spark 2014 : a wreckage
Date: Mon, 08 Jul 2013 20:24:54 +0100
Date: 2013-07-08T20:24:54+01:00	[thread overview]
Message-ID: <lyvc4kyhvd.fsf@pushface.org> (raw)
In-Reply-To: d84b2eb2-eab3-4dec-917c-0498473c1e93@googlegroups.com

vincent.diemunsch@gmail.com writes:

> Same specification in Spark 2014 :
>    procedure Swap
>       with Global  => (In_Out => (X, Y)),
>            Depends => (X => Y,   -- to be read as "X depends on Y"
>                        Y => X);  -- to be read as "Y depends on X"
>
> How are we supposed to guess that "X => Y" means X depends on Y, if
> the arrow goes from X to Y ? In the literature, Flow analysis use
> always Information Flow where arrows follows the real move of
> information. See for instance "SPARK the proven approach of High
> Integrity Software" from John Barn page 311 or the "Dragon Book"
> (Compilers : principles, techniques and tools).

Maybe, but a UML dependency would be read the way that you have quoted.
I don't expect users would guess, I expect they'd RTFM.

> - the syntax makes a complete confusion between a precondition and a
> test : Preconditions are SPECIFICATIONS that insures that the runtime
> tests that the Ada compiler puts in the code will pass. What's the use
> of testing at the entry of a procedure what will be tested in the
> procedure ? Doing the test twice won't impove correctness ! That is
> why proconditions and postconditions must stay as comments.

I assume that after one has done a successful proof of correctness with
SPARK 2014 one will build with a configuration that says that assertions
and predicates are to be ignored (ARM 11.4.2). I suspect that for many
real-time systems you'd need to do this to get timely operation anyway;
nice if the compiler could ensure the Note, "Normally, the boolean
expression in a pragma Assert should not call functions that have
significant side effects when the result of the expression is True, so
that the particular assertion policy in effect will not affect normal
operation of the program.", but that's probably equivalent to the
halting problem.

I wonder whether the same consideration should apply to predicates?

> Expressions functions break the Ada Specification

Expression functions are *in* the Ada Specification! (assuming you mean
the ARM?)


  reply	other threads:[~2013-07-08 19:24 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-08 17:56 The future of Spark . Spark 2014 : a wreckage vincent.diemunsch
2013-07-08 19:24 ` Simon Wright [this message]
2013-07-08 20:59 ` Florian Weimer
2013-07-09  7:40   ` Dmitry A. Kazakov
2013-07-09  8:30     ` Georg Bauhaus
2013-07-09  8:58       ` Dmitry A. Kazakov
2013-07-09 10:27         ` G.B.
2013-07-09 11:13         ` G.B.
2013-07-09 15:14     ` Adam Beneschan
2013-07-09 22:51     ` Robert A Duff
2013-07-10  7:49       ` Dmitry A. Kazakov
2013-07-10  8:21         ` Georg Bauhaus
2013-07-08 21:32 ` Randy Brukardt
2013-07-09  7:28   ` Dmitry A. Kazakov
2013-07-09 11:29     ` Simon Wright
2013-07-09 12:22       ` Dmitry A. Kazakov
2013-07-09 20:37     ` Randy Brukardt
2013-07-10 10:03       ` Dmitry A. Kazakov
2013-07-10 23:21         ` Randy Brukardt
2013-07-11  7:44           ` Dmitry A. Kazakov
2013-07-11 22:28             ` Randy Brukardt
2013-07-12  8:02               ` Dmitry A. Kazakov
2013-07-12 21:16                 ` Randy Brukardt
2013-07-14 10:19                   ` Dmitry A. Kazakov
2013-07-14 15:57                     ` Georg Bauhaus
2013-07-16  0:16                       ` Randy Brukardt
2013-07-17  1:30                         ` Shark8
2013-07-17 23:08                           ` Randy Brukardt
2013-07-18  7:19                             ` Dmitry A. Kazakov
2013-07-19  4:36                               ` Randy Brukardt
2013-07-16  0:13                     ` Randy Brukardt
2013-07-16  8:37                       ` Dmitry A. Kazakov
2013-07-16 22:13                         ` Randy Brukardt
2013-07-17  7:59                           ` Dmitry A. Kazakov
2013-07-17 23:26                             ` Randy Brukardt
2013-07-18  7:37                               ` Dmitry A. Kazakov
2013-07-19  4:32                                 ` Randy Brukardt
2013-07-19  7:16                                   ` Dmitry A. Kazakov
2013-07-20  5:32                                     ` Randy Brukardt
2013-07-20  9:06                                       ` Dmitry A. Kazakov
2013-07-12  1:01           ` Slow? Ada?? Bill Findlay
2013-07-09  7:57   ` The future of Spark . Spark 2014 : a wreckage Stefan.Lucks
2013-07-09 20:46     ` Randy Brukardt
2013-07-10  8:03       ` Stefan.Lucks
2013-07-10 12:46         ` Simon Wright
2013-07-10 23:10         ` Randy Brukardt
2013-07-11 19:23           ` Stefan.Lucks
2013-07-12  0:21             ` Randy Brukardt
2013-07-12  9:12               ` Stefan.Lucks
2013-07-12 20:47                 ` Randy Brukardt
2013-08-05  5:43                 ` Paul Rubin
2013-07-10 12:19   ` vincent.diemunsch
2013-07-10 16:02     ` Simon Wright
2013-07-11  0:36     ` Randy Brukardt
2013-07-11  6:19       ` Simon Wright
2013-07-11 23:11         ` Randy Brukardt
2013-07-11 10:10       ` vincent.diemunsch
2013-07-11 14:23         ` Dmitry A. Kazakov
2013-07-12  0:07           ` Randy Brukardt
2013-07-12  0:00         ` Randy Brukardt
2013-07-12  7:25           ` Simon Wright
2013-07-12 20:07             ` Randy Brukardt
2013-07-12 14:23           ` Robert A Duff
2013-07-12 20:14             ` Randy Brukardt
2013-07-11 23:50       ` Shark8
2013-07-08 23:18 ` Peter C. Chapin
2013-07-09  7:34   ` Stefan.Lucks
2013-07-09 15:21     ` Adam Beneschan
replies disabled

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