<?xml version="1.0" encoding="windows-1252"?>
<node id="132129" title="Re: Re: (OT) Where is programming headed?" created="2001-12-14 22:35:37" updated="2005-07-21 01:30:24">
<type id="11">
note</type>
<author id="131815">
mstone</author>
<data>
<field name="doctext">
&lt;p&gt;
&lt;br&gt;&amp;gt; &amp;gt; Programmers will be necessary until someone solves the halting
&lt;br&gt;&amp;gt; &amp;gt; problem. The automatic programming problem (writing a program that
&lt;br&gt;&amp;gt; &amp;gt; writes programs for you) has been proven NP-complete.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I'm not sure what you mean here, and most of the obvious
&lt;br&gt;&amp;gt; interpretations are false. If you mean that it's impossible to
&lt;br&gt;&amp;gt; write a program that writes programs, that's wrong, because I have
&lt;br&gt;&amp;gt; a program here that I use every day that takes an input
&lt;br&gt;&amp;gt; specification and writes a machine language program to implement
&lt;br&gt;&amp;gt; that specification; it's called gcc. Programs write other programs
&lt;br&gt;&amp;gt; all the time.
&lt;/p&gt;

&lt;p&gt;
gcc doesn't 'write programs' per se, it just translates programs you've written in
one formal language (C) to another formal language (machine code).
&lt;/p&gt;

&lt;p&gt;
Automatic programming boils down to the deep theoretical
question of whether all programming can be reduced to a finite set of
generative postulates, the way, say, algebra can.
If that were true, programmers would be unnecessary.   A few
supercomputers with theorem-proving software could sift their way
through all the permutations, spitting out every possible well-formed
program along the way.
&lt;/p&gt;


&lt;p&gt;
&lt;br&gt;&amp;gt; I doubt if there's any meaningful sense in which "the automatic
&lt;br&gt;&amp;gt; programming problem" (whatever that is) can be shown to be
&lt;br&gt;&amp;gt; NP-complete. If you mean that it's equivalent to the halting problem,
&lt;br&gt;&amp;gt; you might also want to note that the halting problem is not
&lt;br&gt;&amp;gt; NP-complete, and revise accordingly.
&lt;/p&gt;

&lt;p&gt;
I misspoke.. the automatic programming problem is &lt;b&gt;AI&lt;/b&gt;-complete,
not NP-complete.   The halting problem is, indeed, impossible to solve with a Turning machine, which I believe Von Neumann classified as a 'type-0' computer.
&lt;/p&gt;

&lt;p&gt;
However, a Von Neumann 'type-1' computer (if I've got the numbers
right), &lt;i&gt;can&lt;/i&gt; solve the halting problem.   A type-1 Von Neumann
machine has an infinite tape full of ones and zeros, where the address
of each cell corresponds to a unique C program, and the value of each cell is a boolean that says whether the program halts or not. In other words, it's a giant lookup table.
&lt;/p&gt;

&lt;p&gt;
Right now, we don't know if that binary sequence can be found by any
means other than brute-force examination of every possible program.  
However, if programming &lt;i&gt;can&lt;/i&gt; be reduced to a finite set of
generative postulates, it may be possible to calculate
the value of any given bit in finite time. 
It might even be possible to calculate that value with a Turing machine.. in which case, we could sidestep the current proof for the halting problem's 
unsolvability without actually contradicting it.
&lt;/p&gt;

&lt;p&gt;
Either way, my original assertion still stands.   A solution to the halting problem would 
generate a solution to automatic programming, and vice versa.
&lt;/p&gt;


&lt;p&gt;
&lt;br&gt;&amp;gt; But you're mistaken; the result of the test is guaranteed to be true.
&lt;br&gt;&amp;gt; Certain float values can be compared exactly, and 1 is among those
&lt;br&gt;&amp;gt; values. 
&lt;/p&gt;

&lt;p&gt;
Point taken, though one could probably call that a compiler issue.. IIRC, the ANSI-C spec defines all floating-point representations in terms of a minimal error variable &lt;code&gt;elim&lt;/code&gt;.
&lt;/p&gt;

&lt;p&gt;
Please insert the code necessary to calculate the square root of 2.
&lt;/p&gt;




&lt;p&gt;
mike
&lt;br&gt;.
&lt;/p&gt;
</field>
<field name="root_node">
131789</field>
<field name="parent_node">
132063</field>
</data>
</node>
