From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: rant (Re: Ada featured in Doctor Dobb's Journal )
Date: Sat, 17 May 2008 14:05:55 +0200
Date: 2008-05-17T14:05:54+02:00 [thread overview]
Message-ID: <bmqnefc8hadp$.37u47te6a63w.dlg@40tude.net> (raw)
In-Reply-To: 482eabd1$0$6513$9b4e6d93@newsspool4.arcor-online.net
On Sat, 17 May 2008 11:56:33 +0200, Georg Bauhaus wrote:
> Dmitry A. Kazakov wrote:
>> On Sat, 17 May 2008 10:28:06 +0200, Ludovic Brenta wrote:
>>
>>> I strongly prefer compile-time checks over run-time checks,
>>
>> Yes, actually contract checks have to be strictly static.
>
> I think there is a HALTing problem here.
You mean that checking is undecidable? Yes, this is BTW independent on when
you check. But self-correctness checks are worse that undecidable, they are
inconsistent. Consider
require True;
function X return Boolean is
begin
if Correct (X) then
return False;
else
return True;
end if;
end X;
ensure
(return = False and Correct (X))
or
(return = True and not Correct (X));
So
Correct (X) =
= (require => ensure)
= ensure
But these are not equal, let result = True
Correct (X) = not Correct (X)
So it is better to check what is possible either at compile time, or maybe
by another program at run-time. In either case, there is no way to continue
if a check fails. You continue either the source editor, or the supervising
program.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2008-05-17 12:05 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-16 10:56 Ada featured in Doctor Dobb's Journal Ludovic Brenta
2008-05-16 12:28 ` Mike Silva
2008-05-16 13:04 ` Ludovic Brenta
2008-05-16 14:33 ` Mike Silva
2008-05-16 22:26 ` Randy Brukardt
2008-05-17 6:30 ` rant (Re: Ada featured in Doctor Dobb's Journal ) jhc0033
2008-05-17 8:28 ` Ludovic Brenta
2008-05-17 9:27 ` Dmitry A. Kazakov
2008-05-17 9:56 ` Georg Bauhaus
2008-05-17 12:05 ` Dmitry A. Kazakov [this message]
2008-05-17 9:38 ` jhc0033
2008-05-17 11:49 ` Ludovic Brenta
2008-05-17 17:53 ` jhc0033
2008-05-17 23:21 ` Ludovic Brenta
2008-05-18 0:28 ` jhc0033
2008-05-18 0:35 ` Dr. Adrian Wrigley
2008-05-18 8:04 ` Prototyping with Ada (was: Ada featured in Doctor Dobb's Journal) Ludovic Brenta
2008-05-20 10:25 ` John McCabe
2008-05-20 16:57 ` Prototyping with Ada Jeffrey R. Carter
2008-05-20 17:23 ` Mike Silva
2008-05-20 17:37 ` Peter C. Chapin
2008-05-20 23:30 ` Mike Silva
2008-05-21 0:40 ` Jeffrey R. Carter
2008-05-21 12:53 ` Martin Krischik
2008-05-22 8:43 ` Stephen Leake
2008-05-28 11:32 ` John McCabe
2008-05-28 12:12 ` Ludovic Brenta
2008-05-29 3:27 ` tmoran
2008-05-29 9:41 ` John McCabe
2008-05-31 6:03 ` Stephen Leake
2008-06-02 15:43 ` Britt Snodgrass
2008-05-17 9:45 ` rant (Re: Ada featured in Doctor Dobb's Journal ) Georg Bauhaus
2008-05-17 10:57 ` Mike Silva
2008-05-17 16:49 ` tmoran
2008-05-16 22:56 ` Ada featured in Doctor Dobb's Journal Ivan Levashew
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox