comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <bauhaus@futureapps.invalid>
Subject: Re: function Is_Open (File : File_Type) return Boolean; :Text_io
Date: Fri, 30 Oct 2015 02:06:43 +0100
Date: 2015-10-30T02:06:43+01:00	[thread overview]
Message-ID: <n0ufn3$e6$1@dont-email.me> (raw)
In-Reply-To: <19ihs115mzocg$.20s63jo0q2gf.dlg@40tude.net>

On 29.10.15 15:00, Dmitry A. Kazakov wrote:

> Contracts may have no effect on program execution.

(Must have no effect?)

Did I miss why? I saw picking a universe that suffers from failure
to respond usefully to some runs of programs failing, even in some
expected way. There was also the assumption of the existence of a
single allowed run-time effect for each pair <source program, input>.

Naturally, contracts will have no effect at run-time when tools and
brains are capable of demonstrating that all assertions will always
be true. For me, this is just a dream.

>  Consider this:
>
> program describes execution
> contract describes program(s)
> documentation describes anything

Yes, the definitions look like the rattling machinery of clean room
program analysis and fully informed decision making.

HOMER: (stands up) "Boring!"

I think the third line (documentation describing *anything*) is troublesome,
in part because the generality might lead to a paradox, and because it
remains unclear to me if documentation describes program(s) or execution.
Also how, if not using either the contract or the program.

>> Even so, I think that an implementation of Ada could "outsource"
>> assertion checking to some read-only copy of the program that
>> is running on a twin processor, suitably connected, so as to
>> reduce run-time effects of assertion checking.
>
> We discussed that earlier. You can have program A asserting program B. You
> never can do this in a single program. That is inconsistent.

There is no program A, as A is a template. Instances (for runs) are
created when choosing an Assertion_Policy, or levels of optimization,
say. If levels of optimization may change formal semantics (11.6 IIUC),
then why is optimization o.K., but controlling assertion checking is not?
Just because of some thin, formal, logical concern that contracts pushing
us into the morass of recursion is as problematical as most programming?

Anyway, if a Rational R-1000 did perform checks on a coprocessor,
perhaps we just need another word? So that we could say
"formal description of program(s)" when we mean it and use "contract"
instead for what seems to be its "other" meaning?


  reply	other threads:[~2015-10-30  1:06 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-26 10:00 function Is_Open (File : File_Type) return Boolean; :Text_io comicfanzine
2015-10-26 11:27 ` Simon Wright
2015-10-26 13:25   ` comicfanzine
2015-10-26 18:01     ` Simon Wright
2015-10-26 19:03       ` AdaMagica
2015-10-27 11:30         ` Simon Wright
2015-10-26 18:02     ` Jeffrey R. Carter
2015-10-26 13:28   ` comicfanzine
2015-10-26 15:07     ` Jacob Sparre Andersen
2015-10-26 16:37     ` AdaMagica
2015-10-26 20:46     ` J-P. Rosen
2015-10-27  8:42   ` comicfanzine
2015-10-27 11:34     ` Simon Wright
2015-10-28 13:32       ` comicfanzine
2015-10-27  8:51   ` comicfanzine
2015-10-27 17:15     ` Jeffrey R. Carter
2015-10-26 22:48 ` Bob Duff
2015-10-27  8:30   ` Dmitry A. Kazakov
2015-10-27 13:30     ` Bob Duff
2015-10-27 14:00       ` G.B.
2015-10-27 15:26       ` Dmitry A. Kazakov
2015-10-27 16:43         ` G.B.
2015-10-27 20:04           ` Dmitry A. Kazakov
2015-10-28 11:06             ` Georg Bauhaus
2015-10-28 17:58               ` Randy Brukardt
2015-10-28 18:20               ` Dmitry A. Kazakov
2015-10-28 20:36                 ` Bob Duff
2015-10-28 21:02                   ` Dmitry A. Kazakov
2015-10-29 11:25                     ` AdaMagica
2015-10-29 13:37                       ` Dmitry A. Kazakov
2015-10-29 17:57                         ` AdaMagica
2015-10-29 18:12                           ` AdaMagica
2015-10-29 18:26                           ` Dmitry A. Kazakov
2015-10-30  8:27                           ` Jacob Sparre Andersen
2015-10-30  9:11                             ` J-P. Rosen
2015-10-29 11:47                 ` G.B.
2015-10-29 13:01                   ` J-P. Rosen
2015-10-29 14:00                   ` Dmitry A. Kazakov
2015-10-30  1:06                     ` Georg Bauhaus [this message]
2015-10-30  8:39                       ` Dmitry A. Kazakov
2015-10-30 14:32                         ` G.B.
2015-10-30 16:20                           ` Dmitry A. Kazakov
2015-10-30 19:07                             ` G.B.
2015-10-31  9:31                               ` Dmitry A. Kazakov
2015-10-31 11:17                                 ` Georg Bauhaus
2015-10-30 14:40                         ` G.B.
2015-10-30 16:26                           ` Dmitry A. Kazakov
2015-10-28 20:07         ` Bob Duff
2015-10-28 20:59           ` Dmitry A. Kazakov
2015-10-27 14:02     ` G.B.
2015-10-27 15:10       ` Dmitry A. Kazakov
2015-10-27 16:41         ` G.B.
replies disabled

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