comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Generic-Package Elaboration Question / Possible GNAT Bug.
Date: Fri, 25 Nov 2011 10:47:42 +0100
Date: 2011-11-25T10:47:42+01:00	[thread overview]
Message-ID: <1u91r9gjh5ep7.5o1zfpumqbfu$.dlg@40tude.net> (raw)
In-Reply-To: 011f483a-e0d7-4475-89e6-506802e88b9b@i6g2000vbe.googlegroups.com

On Thu, 24 Nov 2011 14:48:46 -0800 (PST), Shark8 wrote:

> On Nov 24, 4:10�am, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
> wrote:
>> On Wed, 23 Nov 2011 19:07:55 -0800 (PST), Shark8 wrote:
>>> On Nov 22, 10:23�am, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
>>> wrote:
>>>> I don't care about trade marks and definitions given by reference
>>>> manuals...
>>
>>> Why not; definitions are essential to understanding each other.
>>> If someone saying 'hammer' means 'shotgun' then what does "I need a
>>> hammer." mean?
>>
>> That is the reason. TM and RM are inclined to name hammer shotgun.
>>
>> DbC (TM) considerably deviates from design by contract (common sense),
> 
> Unfortunately "common sense" is not intuitively obvious to everyone;
> furthermore, "common sense" is hampered by the fact that natural-
> language tends to contain connotations not within the actual
> definitions of the words.

It is still better than arbitrary slogans and advertising TMs and some RMs
tend to. If you want definitions, they should be from scientific sources,
peer reviewed, commonly accepted, [not funded by large vendors we all have
in mind...].

Then a definition must *define* some really existing phenomenon. It is
pointless to discuss DbC (TM) because it is not something which really
exists.

>> as
>> Georg has explained willingly or not. For example disregarding separation
>> of interface and implementation is not how things are designed by contract.
> 
> I actually fail to see exactly where the interface/implementation
> separation is an issue in Ada 2012.

Executable code in declarations is. Dynamic contracts are.

> In other words, it seems to me to be the natural progression of Ada
> 2005's Null Exclusion.
> Procedure Delete( Param : Not Null Access Link_List_Node ) is
>  begin
>    [Deletion operation] -- Hey, we can get rid of checking for Param =
> Null here!
>  end Delete;

Passing null is not a contract violation.

If the goal was to extend composition means in Ada, .e.g. an ability to
compose new operation F as

   F = Epilogue o G o Prologue 

I am not against that because I proposed such stuff myself. Just do not
call Prologue precondition, because it is not.

BTW, precondition, postcondition etc were introduced by Dijkstra for
correctness proofs. It is DbC (TM) which misuses established terms, not me.

> By moving the null-exclusion logic "to the parameter" we can get rid
> of all the cases where, previously, we had to handle Null.

Only when provable, i.e. when the compiler and the program reader *know*
that the check is superfluous in the body.

Note that there is much more use in statically enforced Prologue and
Epilogue. E.g. it would allow to solve the notorious problem of handling
dimensioned values in Ada. It is also necessary to have broken Ada
constructors and destructors working.

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



  parent reply	other threads:[~2011-11-25  9:48 UTC|newest]

Thread overview: 86+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-19 21:14 Generic-Package Elaboration Question / Possible GNAT Bug Shark8
2011-11-19 22:12 ` Robert A Duff
2011-11-19 23:36   ` Shark8
2011-11-20  9:55     ` Dmitry A. Kazakov
2011-11-21  7:25       ` AdaMagica
2011-11-21  8:43         ` Dmitry A. Kazakov
2011-11-21 10:25           ` AdaMagica
2011-11-21 13:08           ` Robert A Duff
2011-11-21 13:50             ` Dmitry A. Kazakov
2011-11-21 19:41               ` Robert A Duff
2011-11-22  8:21                 ` Dmitry A. Kazakov
2011-11-21 20:40               ` J-P. Rosen
2011-11-22  8:29                 ` Dmitry A. Kazakov
2011-11-22 10:25                   ` Georg Bauhaus
2011-11-22 14:32                     ` Dmitry A. Kazakov
2011-11-22 15:02                       ` Georg Bauhaus
2011-11-22 16:23                         ` Dmitry A. Kazakov
2011-11-22 17:46                           ` Georg Bauhaus
2011-11-22 19:15                             ` Dmitry A. Kazakov
2011-11-22 21:03                               ` Randy Brukardt
2011-11-22 21:26                                 ` Dmitry A. Kazakov
2011-11-23  0:07                                   ` Georg Bauhaus
2011-11-23  8:44                                     ` Dmitry A. Kazakov
2011-11-23  9:32                                       ` Simon Wright
2011-11-23  9:56                                         ` Dmitry A. Kazakov
2011-11-23 11:03                                           ` Georg Bauhaus
2011-11-23 11:13                                             ` Dmitry A. Kazakov
2011-11-23 11:25                                               ` Georg Bauhaus
2011-11-23 13:14                                                 ` Dmitry A. Kazakov
2011-11-23 13:59                                                   ` Georg Bauhaus
2011-11-23 14:43                                                     ` Dmitry A. Kazakov
2011-11-23 16:10                                                       ` Georg Bauhaus
2011-11-23 19:51                                                         ` Dmitry A. Kazakov
2011-11-24  0:59                                                           ` Georg Bauhaus
2011-11-24  9:14                                                             ` Dmitry A. Kazakov
2011-11-23 15:12                                           ` Simon Wright
2011-11-23 19:53                                             ` Dmitry A. Kazakov
2011-11-24  8:07                                               ` Simon Wright
2011-11-24  9:27                                                 ` Dmitry A. Kazakov
2011-11-24 10:49                                                   ` Georg Bauhaus
2011-11-24 13:14                                                     ` Dmitry A. Kazakov
2011-11-24 14:31                                                       ` Georg Bauhaus
2011-11-24 16:32                                                         ` Dmitry A. Kazakov
2011-11-24 11:15                                                 ` Brian Drummond
2011-11-24 18:12                                                   ` Simon Wright
2011-11-24 23:52                                                     ` Brian Drummond
2011-11-23 10:35                                         ` Brian Drummond
2011-11-23  9:54                                       ` Georg Bauhaus
2011-11-23 10:30                                         ` Dmitry A. Kazakov
2011-11-23  4:08                                 ` Yannick Duchêne (Hibou57)
2011-11-23  4:11                                 ` Yannick Duchêne (Hibou57)
2011-11-22 23:52                               ` Georg Bauhaus
2011-11-23  9:04                                 ` Dmitry A. Kazakov
2011-11-23 11:15                                   ` Georg Bauhaus
2011-11-23 13:30                                     ` Dmitry A. Kazakov
2011-11-23 14:42                                       ` Georg Bauhaus
2011-11-23 19:48                                         ` Dmitry A. Kazakov
2011-11-24  1:36                                           ` Georg Bauhaus
2011-11-24 10:52                                             ` Dmitry A. Kazakov
2011-11-24 11:30                                               ` Georg Bauhaus
2011-11-24 12:52                                                 ` Dmitry A. Kazakov
2011-11-24 14:45                                                   ` Georg Bauhaus
2011-11-25  9:54                                                     ` Dmitry A. Kazakov
2011-11-24  7:46                                           ` stefan-lucks
2011-11-24  3:07                           ` Shark8
2011-11-24  6:07                             ` Yannick Duchêne (Hibou57)
2011-11-24 10:10                             ` Dmitry A. Kazakov
2011-11-24 11:15                               ` Georg Bauhaus
2011-11-24 22:48                               ` Shark8
2011-11-25  9:25                                 ` Yannick Duchêne (Hibou57)
2011-11-26 21:59                                   ` Shark8
2011-11-25  9:47                                 ` Dmitry A. Kazakov [this message]
2011-11-25 10:15                                   ` Georg Bauhaus
2011-11-25 10:51                                     ` Yannick Duchêne (Hibou57)
2011-11-25 15:45                                   ` Georg Bauhaus
2011-11-25 16:05                                     ` Yannick Duchêne (Hibou57)
2011-11-25 16:19                                     ` Yannick Duchêne (Hibou57)
2011-11-23  3:49                         ` Yannick Duchêne (Hibou57)
2011-11-23  8:50                           ` Georg Bauhaus
2011-11-23  9:45                             ` Yannick Duchêne (Hibou57)
2011-11-23 10:55                               ` Georg Bauhaus
2011-11-23  3:20             ` Yannick Duchêne (Hibou57)
2011-11-23 15:05               ` Robert A Duff
2011-11-21 17:00 ` Adam Beneschan
2011-11-23  3:13 ` Yannick Duchêne (Hibou57)
2011-11-24  3:47   ` Shark8
replies disabled

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