comp.lang.ada
 help / color / mirror / Atom feed
From: Stefan.Lucks@uni-weimar.de
Subject: Re: The future of Spark . Spark 2014 : a wreckage
Date: Tue, 9 Jul 2013 09:34:59 +0200
Date: 2013-07-09T09:34:59+02:00	[thread overview]
Message-ID: <alpine.DEB.2.10.1307090916480.23845@debian> (raw)
In-Reply-To: <Vf-dnV9q9Z5F1UbM4p2dnAA@giganews.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 2463 bytes --]

On Mon, 8 Jul 2013, Peter C. Chapin wrote:

> On 07/08/2013 01:56 PM, vincent.diemunsch@gmail.com wrote:
>
>>     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 ?
>
> Well the phrase "X depends on Y" has X on the left and Y on the right just as 
> X => Y does. So it reads fairly naturally to me. I understand there is value 
> in being consistent with existing notations although I get the impression 
> there is already conflicting practice in that area.
>
> More significantly, though, I think you may be assigning too much semantic 
> weight to the '=>' token in this case. In the aspect syntax it is used more 
> as a separator than anything else. Consider
>
>  Pre => X < 0

Fair enough! The "=>" is not an arrow, it is just a syntactic token to 
separate two other tokens.

Unfortunately, this token greatly (and certainly intentionally, at the 
early days of Ada) resembles an arrow. And this is relly confusing in 
situations where an arrow would make sense, but where the "=>" goes into 
the wrong direction. "Pre =>" isn't an issue, but X => Y above is.

Actually, this has been irritating me when using named notation for out 
parameters, since I have learned Ada. If Y is an out parameter, it should 
be Do_Something (X <= Y), shouldn't it?

This isn't such a big issue that Ada will actually need another separator 
token, such as "<=" ... we'll have to live with "=>". But maybe, one could 
turn this "bug" into a feature, by defining an alternative to the Depends 
annotation^H^H^H^H^H^H^H^H^H^H aspect, where the "=>" points into the 
correct direction, e.g.:

      procedure Swap
         with Global           => (In_Out => (X, Y)),
              Information_Flow => (Y => X,   -- "X depends on Y"
                                   X => Y);  -- "Y depends on X"

as a legal replacement for the usage of "Depends". That would be a lot 
more intuitive!

Alas, it is probably too late for SPARK 2014 ... sigh!


------  I  love  the  taste  of  Cryptanalysis  in  the morning!  ------
     <http://www.uni-weimar.de/cms/medien/mediensicherheit/home.html>
--Stefan.Lucks (at) uni-weimar.de, Bauhaus-Universität Weimar, Germany--

  reply	other threads:[~2013-07-09  7:34 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
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 [this message]
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