comp.lang.ada
 help / color / mirror / Atom feed
From: rieachus@comcast.net
Subject: Re: Ada.Strings.Fixed.Count raises Storage_Error
Date: Fri, 1 Jul 2016 04:48:51 -0700 (PDT)
Date: 2016-07-01T04:48:51-07:00	[thread overview]
Message-ID: <b0b0792c-883e-49a6-8718-552a87a7633d@googlegroups.com> (raw)
In-Reply-To: <nl197n$1f9a$1@gioia.aioe.org>

On Wednesday, June 29, 2016 at 3:57:47 PM UTC-4, Dmitry A. Kazakov wrote:

> Goedel results don't apply to programs anyway, because you are not 
> required to decide anything using the program at hand. You are free to 
> use *another* program, so you can break out.

Sigh! Gödel proved not just that there are systems where some functions cannot be computed correctly, but that there are functions which cannot be computed correctly by any system.  There are systems which are not powerful enough to try to compute these functions, but those systems are very limited.  Regular expressions are an example of such a limited system, Ada compilers are not.
 
> Nor the Halting problem does apply. For any program having a finite 
> number of states, one clearly can decide in finite time with finite 
> storage whether the program halts.

Since when have Ada compilers dealt with only finite states?*  There are programming languages which do have such limits, but Fortran, PL/I, Ada, C++, and other general purpose programming languages are not among them.  It is nice to think you live inside a little box, but Ada compilers can (and do) deal with programs in chunks called compilation units, and programs can be extended over multiple physical processors, each of which can accept external files as input.

To be explicit, theorem proving systems are attempts to solve the halting problem.  You hope that your theorem prover will give a correct answer or give up, but the reality is that there are programs that are never handed to theorem provers because they will execute "forever" without finding an answer.

Ada 80 had a statement that compilers were expected to find a valid elaboration order, and if one did not exist, the program was illegal.  So I, tongue in cheek, wrote a program which was legal if--and only if--Format's Last Theorem was false.  Oops!  Rules were changed so that compilers can leave those edge cases until run-time, and for most programs compilers will find an elaboration order which does not need to check for elaboration errors.  (So now you can compile that program, and a theorem prover that can handle FLT can prove that it never halts, or maybe prove that it halts when your bignum package runs out of file storage. ;-)

* You may contend that your personal computer has a finite number of states, but well before you can finish enumerating them, you will upgrade the processor, memory, and/or disks (whether mechanical or solid state).  And then there are services like Drop Box which enable you to store data "in the cloud."  So the time when computers had a finite set of states is long past.  (Even Univac I, with 1000 words of memory, had ten tape drives, and an operator to mount new tapes when required.)

  reply	other threads:[~2016-07-01 11:48 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-12 11:36 Ada.Strings.Fixed.Count raises Storage_Error Xavier Petit
2016-05-12 15:22 ` Tero Koskinen
2016-05-12 22:05 ` Georg Bauhaus
2016-06-26 21:18   ` Victor Porton
2016-06-26 23:23     ` rieachus
2016-06-27  0:21       ` Jeffrey R. Carter
2016-06-27  4:00         ` rieachus
2016-06-27  0:51       ` Xavier Petit
2016-06-27  4:48         ` rieachus
2016-06-28 18:25           ` Xavier Petit
2016-06-29 18:49           ` Niklas Holsti
2016-06-29 19:40             ` Jeffrey R. Carter
2016-06-29 19:57             ` Dmitry A. Kazakov
2016-07-01 11:48               ` rieachus [this message]
2016-07-01 13:08                 ` Dmitry A. Kazakov
2016-06-27  8:29       ` Simon Wright
2016-06-27  8:41         ` Georg Bauhaus
2016-06-29  8:15       ` Niklas Holsti
2016-06-29  9:13         ` J-P. Rosen
2016-06-29 17:43           ` Niklas Holsti
2016-06-29 18:19             ` J-P. Rosen
2016-06-29 20:30             ` Robert A Duff
2016-06-30  5:38               ` Niklas Holsti
2016-07-01 10:40                 ` rieachus
2016-07-01 10:55                   ` J-P. Rosen
2016-07-01 12:17                     ` rieachus
2016-07-01 12:55                       ` G.B.
2016-06-27 12:52     ` Victor Porton
2016-05-12 22:56 ` Randy Brukardt
replies disabled

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