Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do we know H(P,P)==0 is the correct halt status for the input to H?

4 views
Skip to first unread message

olcott

unread,
Aug 14, 2021, 11:18:03 AM8/14/21
to
This exact same analysis always applies to the input to H(P,P) no matter
how it is called including this example:

int main()
{
P((u32)P);
}

the Turing machine halting problem. Simply stated, the problem
is: given the description of a Turing machine M and an input w,
does M, when started in the initial configuration q0w, perform a
computation that eventually halts? (Linz:1990:317).

In computability theory, the halting problem is the problem of
determining, from a description of an arbitrary computer program
and an input, whether the program will finish running, or continue
to run forever. https://en.wikipedia.org/wiki/Halting_problem

Because the halting problem only requires that the (at least partial)
halt decider decide its input correctly the fact that the direct
invocation of P(P) is not an input to H, means that it is not relevant
to the halting problem.

The P(P) of main() only halts because H(P,P) correctly decides that its
input never halts. This cause-and-effect relationship between the
simulated P and the executed P proves that the simulated P and the
executed P are distinctly different computations.

Because they are different computations the fact that the executed P
halts does not contradict the fact that the simulated P never halts.

While H remains in pure simulation mode simulating the input to H(P,P)
this simulated input never halts thus conclusively proving that H
decides this input correctly.

Because H only acts as a pure simulator of its input until after its
halt status decision has been made it has no behavior that can possibly
effect the behavior of its input. Because of this H screens out its own
address range in every execution trace that it examines. This is why we
never see any instructions of H in any execution trace after an input
calls H.

*Halting computation* is any computation that eventually reaches its own
final state. This criteria divides computations that halt from those
that merely stop running because their simulation was aborted.

A Turing machine is said to halt whenever it reaches a configuration
for which δ is not defined; this is possible because δ is a partial
function. In fact, we will assume that no transitions are defined for
any final state, so the Turing machine will halt whenever it enters a
final state. (Linz:1990:234)

// Simplified Linz Ĥ (Linz:1990:319)
// Strachey(1965) CPL translated to C
void P(u32 x)
{
if (H(x, x))
HERE: goto HERE;
}

int main()
{
Output("Input_Halts = ", H((u32)P, (u32)P));
}

_P()
[00000c36](01) 55 push ebp
[00000c37](02) 8bec mov ebp,esp
[00000c39](03) 8b4508 mov eax,[ebp+08] // 2nd Param
[00000c3c](01) 50 push eax
[00000c3d](03) 8b4d08 mov ecx,[ebp+08] // 1st Param
[00000c40](01) 51 push ecx
[00000c41](05) e820fdffff call 00000966 // call H
[00000c46](03) 83c408 add esp,+08
[00000c49](02) 85c0 test eax,eax
[00000c4b](02) 7402 jz 00000c4f
[00000c4d](02) ebfe jmp 00000c4d
[00000c4f](01) 5d pop ebp
[00000c50](01) c3 ret
Size in bytes:(0027) [00000c50]

_main()
[00000c56](01) 55 push ebp
[00000c57](02) 8bec mov ebp,esp
[00000c59](05) 68360c0000 push 00000c36 // push P
[00000c5e](05) 68360c0000 push 00000c36 // push P
[00000c63](05) e8fefcffff call 00000966 // call H(P,P)
[00000c68](03) 83c408 add esp,+08
[00000c6b](01) 50 push eax
[00000c6c](05) 6857030000 push 00000357
[00000c71](05) e810f7ffff call 00000386
[00000c76](03) 83c408 add esp,+08
[00000c79](02) 33c0 xor eax,eax
[00000c7b](01) 5d pop ebp
[00000c7c](01) c3 ret
Size in bytes:(0039) [00000c7c]

machine stack stack machine assembly
address address data code language
======== ======== ======== ========= =============
[00000c56][0010172a][00000000] 55 push ebp
[00000c57][0010172a][00000000] 8bec mov ebp,esp
[00000c59][00101726][00000c36] 68360c0000 push 00000c36 // push P
[00000c5e][00101722][00000c36] 68360c0000 push 00000c36 // push P
[00000c63][0010171e][00000c68] e8fefcffff call 00000966 // call H(P,P)

Begin Local Halt Decider Simulation at Machine Address:c36
[00000c36][002117ca][002117ce] 55 push ebp
[00000c37][002117ca][002117ce] 8bec mov ebp,esp
[00000c39][002117ca][002117ce] 8b4508 mov eax,[ebp+08]
[00000c3c][002117c6][00000c36] 50 push eax // push P
[00000c3d][002117c6][00000c36] 8b4d08 mov ecx,[ebp+08]
[00000c40][002117c2][00000c36] 51 push ecx // push P
[00000c41][002117be][00000c46] e820fdffff call 00000966 // call H(P,P)

We can see that the first seven lines of P repeat. P calls H(P,P) that
simulates P(P) that calls H(P,P) in a cycle the never stops unless H
stops simulating its input. When H does stop simulating its input P
never reaches its final state of [00000c50] therefore never halts even
though it stops running.

[00000c36][0025c1f2][0025c1f6] 55 push ebp
[00000c37][0025c1f2][0025c1f6] 8bec mov ebp,esp
[00000c39][0025c1f2][0025c1f6] 8b4508 mov eax,[ebp+08]
[00000c3c][0025c1ee][00000c36] 50 push eax // push P
[00000c3d][0025c1ee][00000c36] 8b4d08 mov ecx,[ebp+08]
[00000c40][0025c1ea][00000c36] 51 push ecx // push P
[00000c41][0025c1e6][00000c46] e820fdffff call 00000966 // call H(P,P)
Local Halt Decider: Infinite Recursion Detected Simulation Stopped

[00000c68][0010172a][00000000] 83c408 add esp,+08
[00000c6b][00101726][00000000] 50 push eax
[00000c6c][00101722][00000357] 6857030000 push 00000357
[00000c71][00101722][00000357] e810f7ffff call 00000386
Input_Halts = 0
[00000c76][0010172a][00000000] 83c408 add esp,+08
[00000c79][0010172a][00000000] 33c0 xor eax,eax
[00000c7b][0010172e][00100000] 5d pop ebp
[00000c7c][00101732][00000068] c3 ret
Number_of_User_Instructions(27)
Number of Instructions Executed(23721)

*Strachey, C 1965* An impossible program The Computer Journal, Volume
7, Issue 4, January 1965, Page 313, https://doi.org/10.1093/comjnl/7.4.313

*Linz, Peter 1990* An Introduction to Formal Languages and Automata.
Lexington/Toronto: D. C. Heath and Company.

--
Copyright 2021 Pete Olcott

"Great spirits have always encountered violent opposition from mediocre
minds." Einstein

olcott

unread,
Aug 14, 2021, 11:51:00 AM8/14/21
to
**test bolding**

olcott

unread,
Aug 14, 2021, 12:16:20 PM8/14/21
to
On 8/14/2021 11:05 AM, wij wrote:
> On Saturday, 14 August 2021 at 23:18:03 UTC+8, olcott wrote:
>> This exact same analysis always applies to the input to H(P,P) no matter
>> how it is called including this example:
>>
>> int main()
>> {
>> P((u32)P);
>> }
>>
>> the Turing machine halting problem. Simply stated, the problem
>> is: given the description of a Turing machine M and an input w,
>> does M, when started in the initial configuration q0w, perform a
>> computation that eventually halts? (Linz:1990:317).
>>
>> In computability theory, the halting problem is the problem of
>> determining, from a description of an arbitrary computer program
>> and an input, whether the program will finish running, or continue
>> to run forever. https://en.wikipedia.org/wiki/Halting_problem
>>
>> Because the halting problem only requires that the (at least partial)
>> halt decider decide its input correctly the fact that the direct
>> invocation of P(P) is not an input to H, means that it is not relevant
>> to the halting problem.
>
> I do not know English well, but I (almost every programmer) am sure the halting
> problem means a program H decides whether P(input) will halt or not.
> If the quoted texts is read to you differently, it is the problem of that texts.
> Submit message to the authors.
>

The quoted texts are accurate. The (at least partial) halt decider must
only correctly decide the halt status of its input. Computations that
are not inputs to the halt decider do not pertain to the halting problem.

> If the direct invocation of P(P) is not relevant to the halting problem, then
> H can do whatever you like, therefore, meaningless if not garbage.
>

The halting problem is only concerned with an at least partial halt
decider correctly deciding whether or not its input halts, thus it can
do whatever its wants as long as it does decide the correct halt status
of its input.

In every configuration H does correctly decide that its input (P,P)
never halts. This can be verified beyond all possible doubt by the x86
execution trace of the simulation of P(P) shown below.

olcott

unread,
Aug 14, 2021, 1:22:11 PM8/14/21
to
On 8/14/2021 11:35 AM, wij wrote:
> Obviously the quoted text means differently to you and almost all programmers in
> the world. You are addressing your own interpretation. This is OK, but the
> interpretation is meaningless.

"the description of a Turing machine M" does not mean Turing machine M.
If people interpret this to mean Turing machine M they are wrong.

>>> If the direct invocation of P(P) is not relevant to the halting problem, then
>>> H can do whatever you like, therefore, meaningless if not garbage.
>>>
>> The halting problem is only concerned with an at least partial halt
>> decider correctly deciding whether or not its input halts, thus it can
>> do whatever its wants as long as it does decide the correct halt status
>> of its input.
>>
>
> int H2(Prog P) {
> return 0;
> }
> What is the difference of your H with H2?
> H2 can also correctly (at least partial) answer the halting problem, and can
> be verified.
>

My H has intelligence and can be verified to derive a halt status that
corresponds to every halting computation and can be verified to derive a
halt status that corresponds to that halt status of every input that it
determines never halts.

H is always correct for all:
(a) halting computations.
(b) computations that it decides never halt.

olcott

unread,
Aug 14, 2021, 2:44:15 PM8/14/21
to
On 8/14/2021 1:32 PM, Richard Damon wrote:
> The INPUT is the description of Turing Machine M.
>
> The answer is about the behavior of Turing Machine M, which, as pointed
> out, is NOT the input.
>

The answer is about the behavior of Turing Machine M corresponding to
the input. The answer is not about some other Turing machine M that is
in some other different point in the execution trace.

Another way to say this is that answer is about the behavior of the pure
simulation of the input on its input.

It is easily verified that

While H remains in pure simulation mode simulating the input to H(P,P)
this simulated input never stops running halts thus conclusively proving
that H decides this input correctly.


olcott

unread,
Aug 14, 2021, 4:52:19 PM8/14/21
to
On 8/14/2021 3:39 PM, Richard Damon wrote:
> On 8/14/21 2:33 PM, olcott wrote:
>> On 8/14/2021 12:10 PM, Richard Damon wrote:
>>> This is the point where you use of English is incorrect, and you need to
>>> restudy English so you understand what you are saying.
>>>
>>> *Inputs* are NEVER *Computations* in and of themselves, but are merely
>>> the string representations of the ACTUAL Computations.
>>>
>>> As such, 'inputs' don't halt or be non-halting, only the machines they
>>> represent.
>> The input "description of an arbitrary computer program" is the basis
>> for the halt status decision.
>>
>>
>
> The input is what the program uses to make its decision, the right
> answer is what the actual machine does.
>

Because the input to H(P,P) is at a different point int the execution
trace than the P of int main(){ P(P); } it is a different computation
having different behavior than the input to H(P,P).

If we are not damn liars and know the x86 language sufficiently well
enough then we can see that the simulation of the input to H precisely
matches the x86 source-code of P on input P therefore the pure
simulation of P on input P is perfectly correct.

Damn liars that know the x86 language well enough can see this too.

_P()
[00000c36](01) 55 push ebp
[00000c37](02) 8bec mov ebp,esp
[00000c39](03) 8b4508 mov eax,[ebp+08] // 2nd Param
[00000c3c](01) 50 push eax
[00000c3d](03) 8b4d08 mov ecx,[ebp+08] // 1st Param
[00000c40](01) 51 push ecx
[00000c41](05) e820fdffff call 00000966 // call H(P,P)
[00000c46](03) 83c408 add esp,+08
[00000c49](02) 85c0 test eax,eax
[00000c4b](02) 7402 jz 00000c4f
[00000c4d](02) ebfe jmp 00000c4d
[00000c4f](01) 5d pop ebp
[00000c50](01) c3 ret
Size in bytes:(0027) [00000c50]

machine stack stack machine assembly
address address data code language
======== ======== ======== ========= =============
[00000c63][0010171e][00000c68] e8fefcffff call 00000966 // call H(P,P)

Begin Local Halt Decider Simulation at Machine Address:c36
[00000c36][002117ca][002117ce] 55 push ebp
[00000c37][002117ca][002117ce] 8bec mov ebp,esp
[00000c39][002117ca][002117ce] 8b4508 mov eax,[ebp+08]
[00000c3c][002117c6][00000c36] 50 push eax // push P
[00000c3d][002117c6][00000c36] 8b4d08 mov ecx,[ebp+08]
[00000c40][002117c2][00000c36] 51 push ecx // push P
[00000c41][002117be][00000c46] e820fdffff call 00000966 // call H(P,P)

[00000c36][0025c1f2][0025c1f6] 55 push ebp
[00000c37][0025c1f2][0025c1f6] 8bec mov ebp,esp
[00000c39][0025c1f2][0025c1f6] 8b4508 mov eax,[ebp+08]
[00000c3c][0025c1ee][00000c36] 50 push eax // push P
[00000c3d][0025c1ee][00000c36] 8b4d08 mov ecx,[ebp+08]
[00000c40][0025c1ea][00000c36] 51 push ecx // push P
[00000c41][0025c1e6][00000c46] e820fdffff call 00000966 // call H(P,P)
Local Halt Decider: Infinite Recursion Detected Simulation Stopped


> You don't seem to understand the difference.
>
> The program uses unsound logic in its analysis and thus gets a wrong
> answer. (It assumes that H will NEVER abort, when it just is a won't
> abort until type of program). Until is not Never, so it get the answer
> wrong.

olcott

unread,
Aug 14, 2021, 5:06:45 PM8/14/21
to
On 8/14/2021 3:43 PM, Ben Bacarisse wrote:
> olcott <No...@NoWhere.com> writes:
>
>> The P(P) of main() only halts because...
>
> As you say, P(P) halts.
>
>> *Halting computation* is any computation that eventually reaches its
>> own final state. This criteria divides computations that halt from
>> those that merely stop running because their simulation was aborted.
>
> No. There is no "special kind of halting". The computation M(I) either
> halts or it does not. H(M, I) should be false if, and only if, M(I)
> does not halt.
>
>> void P(u32 x)
>> {
>> if (H(x, x))
>> HERE: goto HERE;
>> }
>
> P(P) halts, yet H(P, P) is false. That's the wrong answer.
>

Because the input to H(P,P) is at a different point in the execution
trace than the P of int main(){ P(P); } it is a different computation
having different behavior than the input to H(P,P).

> Why are you still hiding H? Is it because you have still not figured
> out how to nest a call to the simulator you are using?

That part alone took me three months after all the rest of the x86utm
operating system was complete.

If people can't begin to understand that seven lines of x86 code of P
are stuck in infinitely nested simulation while H remains in pure
simulator mode after many months of discussion then adding the much more
complexity of the details of how simulation works is not going to help
their understanding.

All they really need to know is that infinitely nested simulation has
computationally equivalent halting behavior to infinite recursion.

Also I want to keep this in reserve as totally unpublished work so that
a publisher will have some key material that has never been previously
disclosed.

> Fortunately "we"
> (i.e. everyone but you) can see that H is wrong without even seeing the
> code. Who is included in the "we" of the subject line? Have you found
> someone else who thinks that false is the correct return from a partial
> halt decider called with arguments that represent a halting computation?
>

_P()
[00000c36](01) 55 push ebp
[00000c37](02) 8bec mov ebp,esp
[00000c39](03) 8b4508 mov eax,[ebp+08] // 2nd Param
[00000c3c](01) 50 push eax
[00000c3d](03) 8b4d08 mov ecx,[ebp+08] // 1st Param
[00000c40](01) 51 push ecx
[00000c41](05) e820fdffff call 00000966 // call H
[00000c46](03) 83c408 add esp,+08
[00000c49](02) 85c0 test eax,eax
[00000c4b](02) 7402 jz 00000c4f
[00000c4d](02) ebfe jmp 00000c4d
[00000c4f](01) 5d pop ebp
[00000c50](01) c3 ret
Size in bytes:(0027) [00000c50]

[00000c63][0010171e][00000c68] e8fefcffff call 00000966 // call H(P,P)

Begin Local Halt Decider Simulation at Machine Address:c36
[00000c36][002117ca][002117ce] 55 push ebp
[00000c37][002117ca][002117ce] 8bec mov ebp,esp
[00000c39][002117ca][002117ce] 8b4508 mov eax,[ebp+08]
[00000c3c][002117c6][00000c36] 50 push eax // push P
[00000c3d][002117c6][00000c36] 8b4d08 mov ecx,[ebp+08]
[00000c40][002117c2][00000c36] 51 push ecx // push P
[00000c41][002117be][00000c46] e820fdffff call 00000966 // call H(P,P)

[00000c36][0025c1f2][0025c1f6] 55 push ebp
[00000c37][0025c1f2][0025c1f6] 8bec mov ebp,esp
[00000c39][0025c1f2][0025c1f6] 8b4508 mov eax,[ebp+08]
[00000c3c][0025c1ee][00000c36] 50 push eax // push P
[00000c3d][0025c1ee][00000c36] 8b4d08 mov ecx,[ebp+08]
[00000c40][0025c1ea][00000c36] 51 push ecx // push P
[00000c41][0025c1e6][00000c46] e820fdffff call 00000966 // call H(P,P)
Local Halt Decider: Infinite Recursion Detected Simulation Stopped

If you can "see" how P is able to break out of its infinitely nested
simulation while H remains in pure simulator mode please feel free to
share.

olcott

unread,
Aug 15, 2021, 9:36:07 AM8/15/21
to
On 8/15/2021 4:39 AM, Malcolm McLean wrote:
> On Sunday, 15 August 2021 at 05:39:10 UTC+1, olcott wrote:
>> On 8/14/2021 5:56 PM, Ben Bacarisse wrote:
>>> Jeff Barnett <j...@notatt.com> writes:
>>>
>>>> On 8/14/2021 2:43 PM, Ben Bacarisse wrote:
>>>>> olcott <No...@NoWhere.com> writes:
>>>>>
>>>>>> The P(P) of main() only halts because...
>>>>> As you say, P(P) halts.
>>>>>
>>>>>> *Halting computation* is any computation that eventually reaches its
>>>>>> own final state. This criteria divides computations that halt from
>>>>>> those that merely stop running because their simulation was aborted.
>>>>> No. There is no "special kind of halting". The computation M(I) either
>>>>> halts or it does not. H(M, I) should be false if, and only if, M(I)
>>>>> does not halt.
>>>>>
>>>>>> void P(u32 x)
>>>>>> {
>>>>>> if (H(x, x))
>>>>>> HERE: goto HERE;
>>>>>> }
>>>>> P(P) halts, yet H(P, P) is false. That's the wrong answer.
>>>>> Why are you still hiding H? Is it because you have still not figured
>>>>> out how to nest a call to the simulator you are using? Fortunately "we"
>>>>> (i.e. everyone but you) can see that H is wrong without even seeing the
>>>>> code. Who is included in the "we" of the subject line? Have you found
>>>>> someone else who thinks that false is the correct return from a partial
>>>>> halt decider called with arguments that represent a halting computation?
>>>>
>>>> I have questions about the PO simulator I hope someone can answer. It
>>>> perhaps concerns memory mapping: First - is every instance of a use at
>>>> different levels in its own address space? Second - if not, is there
>>>> any way to know when an address is reported, which simulator instance
>>>> is being reported on? When the dumb bunny (PO expression) notes that
>>>> the same address is reached a second time without a conditional branch
>>>> being executed, is there any assurance that the addresses are noted
>>>> from the same instance of the simulation? And finally, how can one
>>>> determine if it's the same address twice without doing some sort of
>>>> compare and branch? Thanks in advance for any sort of enlightenment.
>>>
>>> You won't get a straight answer from PO, but I don't think there is any
>>> nested simulation happening at all. PO "knows" it's that same a
>>> recursion, so he just has recursive calls traced from "outside". I may
>> No this is not possible. There is no possible way to use ordinary
>> recursion to implement nested x86 emulation without memory corruption of
>> the stack. I explained all of the technical details of context
>> switching: Here is a link that does a better job:
>>
>> https://en.wikipedia.org/wiki/Context_switch
>>
>> Each virtual machine has its own registers, stack and RAM. Once the
>> virtual machine environment is set up, allocating the stack and RAM and
>> other house keeping functions a context switch only requires saving and
>> restoring all the machine registers.
>>
> We can write a ZX81 emulator on a modern machine. A ZX81 has 4K ROM
> and 1K RAM. So our first line can be a "virualmem = malloc(1024 * 5). We then
> set up everything else in that memory space.
> However the ZX81 emulator cannot emulate another ZX81, since it has only
> 1K RAM to play with, and the virtual machine needs 5K.
> You'll get this problem whenever you try to allow nested emulation on a
> random-access memory model machine.
>
> Turing machines don't have this problem. Write a UTM, and a "Hello world"
> program, and
> UTM<Hello> with output "Hello world" on the tape.
> UTM<UTM><Hello> will also output "Hello world" on the tape. You can stack up
> as many UTMs as you like without any reprogramming. It might get very slow,
> but it will eventually finish.
>
> What you can do is treat memory allocation as a special function. Then you
> can nest simulations.
>

Yes I do that.
It does not require knowing any of those details to see how totally
blatantly obvious it is that:

While H remains in pure simulation mode simulating the input to H(P,P)
this simulated input never stops running thus conclusively proving that
when H decides this input never halts it is correct.

_P()
[00000c36](01) 55 push ebp
[00000c37](02) 8bec mov ebp,esp
[00000c39](03) 8b4508 mov eax,[ebp+08] // 2nd Param
[00000c3c](01) 50 push eax
[00000c3d](03) 8b4d08 mov ecx,[ebp+08] // 1st Param
[00000c40](01) 51 push ecx
[00000c41](05) e820fdffff call 00000966 // call H
[00000c46](03) 83c408 add esp,+08
[00000c49](02) 85c0 test eax,eax
[00000c4b](02) 7402 jz 00000c4f
[00000c4d](02) ebfe jmp 00000c4d
[00000c4f](01) 5d pop ebp
[00000c50](01) c3 ret
Size in bytes:(0027) [00000c50]

machine stack stack machine assembly
address address data code language
======== ======== ======== ========= =============
[00000c63][0010171e][00000c68] e8fefcffff call 00000966 // call H(P,P)

Begin Local Halt Decider Simulation at Machine Address:c36
[00000c36][002117ca][002117ce] 55 push ebp
[00000c37][002117ca][002117ce] 8bec mov ebp,esp
[00000c39][002117ca][002117ce] 8b4508 mov eax,[ebp+08]
[00000c3c][002117c6][00000c36] 50 push eax // push P
[00000c3d][002117c6][00000c36] 8b4d08 mov ecx,[ebp+08]
[00000c40][002117c2][00000c36] 51 push ecx // push P
[00000c41][002117be][00000c46] e820fdffff call 00000966 // call H(P,P)

[00000c36][0025c1f2][0025c1f6] 55 push ebp
[00000c37][0025c1f2][0025c1f6] 8bec mov ebp,esp
[00000c39][0025c1f2][0025c1f6] 8b4508 mov eax,[ebp+08]
[00000c3c][0025c1ee][00000c36] 50 push eax // push P
[00000c3d][0025c1ee][00000c36] 8b4d08 mov ecx,[ebp+08]
[00000c40][0025c1ea][00000c36] 51 push ecx // push P
[00000c41][0025c1e6][00000c46] e820fdffff call 00000966 // call H(P,P)
Local Halt Decider: Infinite Recursion Detected Simulation Stopped



olcott

unread,
Aug 15, 2021, 12:44:43 PM8/15/21
to
On 8/15/2021 9:45 AM, wij wrote:
> On Sunday, 15 August 2021 at 21:45:09 UTC+8, olcott wrote:
>> On 8/15/2021 2:50 AM, wij wrote:
>>> On Sunday, 15 August 2021 at 02:24:42 UTC+8, olcott wrote:
>>>> On 8/14/2021 1:09 PM, wij wrote:
>>>>> Then, both Linz and the author of https://en.wikipedia.org/wiki/Halting_problem
>>>>> are also wrong, I and almost all programmers in the world can guarantee you this.
>>>>>
>>>>> If both authors are also wrong, replying the rest message is meaningless.
>>>>> You need to submit your interpretation to Linz and the author of the wiki.
>>>>>
>>>> I think that the problem is that your English is not so good.
>>>> The Linz text and the Wiki text are correct.
>>>> Linz retired many years ago.
>>>
>>> In your recent post somewhere, you said:
>>> "I made my refutation of Linz a little more clear by changing all of the
>>> subscripts to be numeric. My refutation of Linz cannot be properly
>>> understood until after my refutation of simplified Linz / Strachey is
>>> first understood..."
>>> Now, you changed mind to say "The Linz text and the Wiki text are correct."
>>>
>> This text right here is correct:
>> the Turing machine halting problem. Simply stated, the problem
>> is: given the description of a Turing machine M and an input w,
>> does M, when started in the initial configuration q0w, perform a
>> computation that eventually halts? (Linz:1990:317).
>>
>> In computability theory, the halting problem is the problem of
>> determining, from a description of an arbitrary computer program
>> and an input, whether the program will finish running, or continue
>> to run forever. https://en.wikipedia.org/wiki/Halting_problem
>> All of the rest of the text that "proves" the halting problem cannot be
>> solved it incorrect.
>
> Which one did you mean:
> 1. All of the rest of the text that "proves" the halting problem cannot be
> solved incorrect. (still ambiguous)
> 2. All of the rest of the text that "proves" the halting problem cannot
> solve incorrect. (ambiguous)
> 3. All of the rest of the text that "proves" the halting problem cannot be
> solved, it is incorrect.
>

All of the rest of the text that "proves" the halting problem cannot be
solved <IS> incorrect.

>>> There are much more inconsistent statements in your posts, like "H is a total
>>> function",...,etc. (I do not have time to re-find them).
>>>
>> H is a pure function of its inputs in that all of the nested simulations
>> are simply data derived entirely on the basis of this inputs.
>
> From your description:
> "The x86utm operating system uses a single contiguous block of RAM to
> most precisely map to the concept of a single contiguous Turing machine
> tape. All of the code and data of the virtual machines that it executes
> are contained in this single contiguous block. There is no virtual
> memory paging in the x86utm operating system."
>
> I believe your H is a 'pure function', you are actually dealing with two "C"
> function calls. H is not really a simulator as you keeps calling it so.
> Show me how H(P,P) takes its input P as 'simple data'.
>

The x86utm operating system is build from an x86 emulator capable of
emulating all of the 80386 instructions using 4 GB of RAM.

The following x86utm operating system function calls the x86 emulator to
emulate exactly one instruction of the slave process and then return to
the calling process. It also decodes the slave instruction that was
emulated so that it can be stored in the execution trace.

u32 DebugStep(Registers* master_state,
Registers* slave_state,
Decoded_Line_Of_Code* decoded) {}

> I hate to say that your programming level is very low because this has noting
> to do with the HP proof. I think many others know x86 and C languages and
> programming skills better than you do. No need to repeat posting the compiled
> assembly code fragment and pretend you know better and others cannot see it.
>

It is ridiculously foolish to claim that P on input P has nothing to do
with the halting problem proofs:

Now we construct a new Turing machine D with H as a subroutine.
This new TM calls H to determine what M does when the input to
M is its own description ⟨M⟩. Once D has determined this information,
it does the opposite. (Sipser:1997:165)

It remains ridiculously foolish for people claiming to fully understand
the x86 language to disagree with the following statement:

While H remains in pure simulation mode simulating the input to H(P,P)
this simulated input never stops running thus conclusively proving that
when H decides this input never halts it is correct.

[00000c36][0025c1f2][0025c1f6] 55 push ebp
[00000c37][0025c1f2][0025c1f6] 8bec mov ebp,esp
[00000c39][0025c1f2][0025c1f6] 8b4508 mov eax,[ebp+08]
[00000c3c][0025c1ee][00000c36] 50 push eax // push P
[00000c3d][0025c1ee][00000c36] 8b4d08 mov ecx,[ebp+08]
[00000c40][0025c1ea][00000c36] 51 push ecx // push P
[00000c41][0025c1e6][00000c46] e820fdffff call 00000966 // call H(P,P)
Local Halt Decider: Infinite Recursion Detected Simulation Stopped


>>> What does your bible say about a liar? Does it matter? Surely, it does matter
>>> if it applies to others, not you (you can restate it in your flavor).
>>> Then, what else evil you cannot do, none.
>>>
>>> 子曰:人而無信不知其可
>>> Confucius says: If a man does not keep his word, what is he good for?

olcott

unread,
Aug 15, 2021, 1:17:03 PM8/15/21
to
On 8/15/2021 9:46 AM, Mike Terry wrote:
> On 14/08/2021 22:20, Jeff Barnett wrote:
>> On 8/14/2021 2:43 PM, Ben Bacarisse wrote:
>>> olcott <No...@NoWhere.com> writes:
>>>
>>>> The P(P) of main() only halts because...
>>>
>>> As you say, P(P) halts.
>>>
>>>> *Halting computation* is any computation that eventually reaches its
>>>> own final state. This criteria divides computations that halt from
>>>> those that merely stop running because their simulation was aborted.
>>>
>>> No.  There is no "special kind of halting".  The computation M(I) either
>>> halts or it does not.  H(M, I) should be false if, and only if, M(I)
>>> does not halt.
>>>
>>>> void P(u32 x)
>>>> {
>>>>    if (H(x, x))
>>>>      HERE: goto HERE;
>>>> }
>>>
>>> P(P) halts, yet H(P, P) is false.  That's the wrong answer.
>>>
>>> Why are you still hiding H?  Is it because you have still not figured
>>> out how to nest a call to the simulator you are using?  Fortunately "we"
>>> (i.e. everyone but you) can see that H is wrong without even seeing the
>>> code.  Who is included in the "we" of the subject line?  Have you found
>>> someone else who thinks that false is the correct return from a partial
>>> halt decider called with arguments that represent a halting computation?
>>
>> I have questions about the PO simulator I hope someone can answer. It
>> perhaps concerns memory mapping:
>
>> First - is every instance of a use at different levels in its own
>> address space?
>
> I've tried to get PO to clarify that, and it always /seems/ that he is
> suggesting yes [while avoiding any direct answer] but I have no
> confidence whatsoever that he understands what everybody else would
> understand by "its own address space".
>

There is a single contiguous block of RAM that is used by all of the
virtual machine and the halt decider. Whenever H is called it creates a
separate context having its own Registers, RAM and stack space. It
performs its x86 emulation on its input virtual machine in the separate
process context. Just like recursion the executable code of every
instance of P and H are at the same fixed machine address.

> He has definitely said that each simulation has its own stack and
> registers, but my bet would be that they are more like your typical OS
> threads, running in the same address space.  (We could probably find out
> by quizzing him on sharing of globals etc. and giving him concrete
> examples which he could understand.  But it might take a lot of work,
> and for what at the end?  Or more reasonably, if he published all his
> source code as he maintained he would for around two years, we could
> answer these sorts of questions for ourselves...)
>

Until people quit refuting this very obvious truth they consistently
prove that they are far too disingenuous to deserve any additional
details that would only give them an excuse to make sure that they
always go off on tangents and dodge the key relevant points:

While H remains in pure simulation mode simulating the input to H(P,P)
this simulated input never stops running thus conclusively proving that
when H decides this input never halts it is correct.

[00000c36][0025c1f2][0025c1f6] 55 push ebp
[00000c37][0025c1f2][0025c1f6] 8bec mov ebp,esp
[00000c39][0025c1f2][0025c1f6] 8b4508 mov eax,[ebp+08]
[00000c3c][0025c1ee][00000c36] 50 push eax // push P
[00000c3d][0025c1ee][00000c36] 8b4d08 mov ecx,[ebp+08]
[00000c40][0025c1ea][00000c36] 51 push ecx // push P
[00000c41][0025c1e6][00000c46] e820fdffff call 00000966 // call H(P,P)
Local Halt Decider: Infinite Recursion Detected Simulation Stopped


>> Second - if not, is there any way to know when an address is reported,
>> which simulator instance is being reported on?
>
> I suggested he needed to provide that last year.  And at one point he
> DID change his trace to show the emulation level, so it's not like
> there's any coding difficulty!  But then it was perfectly clear that he
> was correlating trace entries together from completely separate
> emulation levels, so the illusion that it was a "loop" in the normal
> (single) processor-trace sense was lessened.  He subsequently removed
> the column, claiming as excuse that it confused people.
>
> I'd say this is PO misunderstanding the difference between
> call-recursion and emulation-recursion.  The former can /only/ be broken
> by code at the deepest recursion level which then percolates up to the
> top level, like when we calculate n factorial recursively.
> Emulation-recursion /can/ also break out this way, but with emulation
> there is a second possibility - the break can be from the /top/ level
> which simply decides not to emulate any more.  The fact that the deepest
> inner emulations appear to be repeating doesn't mean that they will go
> on forever, because an outer level can always just give up emulating and
> get on with whatever is next.
>

If I did not understand this then I would have not explained it this
same way many dozens of times.

> I suppose without an emulation-id column we can probably work stuff out
> based on the overall flow of the trace together with knowledge about the
> program and what H is doing and so on.  (But why should this be required
> when it's an essential part of the meaning of a trace entry?)
>
>> When the dumb bunny (PO expression) notes that the same address is
>> reached a second time without a conditional branch being executed, is
>> there any assurance that the addresses are noted from the same
>> instance of the simulation?
>
> I can give you an assurance of exactly the opposite - they are
> definitely from /different/ emulation levels!  (I think you know that,
> right?) PO tries to present them to look as much as possible like a
> pattern of behaviour for a /single/ processor, because then he would
> have "call recursion" which can only break inner-to-outer, and his
> "processor trace" could provide some level of evidence that that won't
> happen. (Also I'm remebering his recent remarks about the processor
> "[..having no way to escape from the recursion..]" which might be
> explained as PO not understanding the call/recursion distinction...)
>

I want to eliminate the extra 396 pages of extraneous detail because
people here are finding it next to impossible to understand 7 lines of
x86 code when this code has been repeatedly explained to them hundreds
of times over many months. Providing an extra 396 pages of detail
certainly cannot possibly help in this case.

> In the past PO has said his rule applies equally for call-recursion and
> emulation-recursion, no difference, while repeating something about
> "equivalent computation", but he has no real /understanding/ of that
> phrase and certainly no /proof/ of soundness even for the simple
> call-recursion case, so it's just the usual unsupported claims.  (And
> there is no prospect of ever going further than this - PO is simply not
> capable of "proving" anything and I doubt he understands what that even
> means.)

The emulation recursion and the call recursion have computationally
equivalent halting behavior as proven by the following execution trace
compared to the above execution trace of the simulation of P on P.

void Infinite_Recursion()
{
Infinite_Recursion();
}

int main()
{
Output("Input_Halts = ", H0((u32)Infinite_Recursion));
}

_Infinite_Recursion()
[00000dc2](01) 55 push ebp
[00000dc3](02) 8bec mov ebp,esp
[00000dc5](05) e8f8ffffff call 00000dc2
[00000dca](01) 5d pop ebp
[00000dcb](01) c3 ret
Size in bytes:(0010) [00000dcb]

_main()
[00000e72](01) 55 push ebp
[00000e73](02) 8bec mov ebp,esp
[00000e75](05) 68c20d0000 push 00000dc2
[00000e7a](05) e873fdffff call 00000bf2
[00000e7f](03) 83c404 add esp,+04
[00000e82](01) 50 push eax
[00000e83](05) 6823030000 push 00000323
[00000e88](05) e8c5f4ffff call 00000352
[00000e8d](03) 83c408 add esp,+08
[00000e90](02) 33c0 xor eax,eax
[00000e92](01) 5d pop ebp
[00000e93](01) c3 ret
Size in bytes:(0034) [00000e93]

machine stack stack machine assembly
address address data code language
======== ======== ======== ========= =============
...[00000e72][00101a85][00000000] 55 push ebp
...[00000e73][00101a85][00000000] 8bec mov ebp,esp
...[00000e75][00101a81][00000dc2] 68c20d0000 push 00000dc2
...[00000e7a][00101a7d][00000e7f] e873fdffff call 00000bf2

Begin Local Halt Decider Simulation at Machine Address:dc2
...[00000dc2][00211b29][00211b2d] 55 push ebp
...[00000dc3][00211b29][00211b2d] 8bec mov ebp,esp
...[00000dc5][00211b25][00000dca] e8f8ffffff call 00000dc2
...[00000dc2][00211b21][00211b29] 55 push ebp
...[00000dc3][00211b21][00211b29] 8bec mov ebp,esp
...[00000dc5][00211b1d][00000dca] e8f8ffffff call 00000dc2
Local Halt Decider: Infinite Recursion Detected Simulation Stopped

...[00000e7f][00101a85][00000000] 83c404 add esp,+04
...[00000e82][00101a81][00000000] 50 push eax
...[00000e83][00101a7d][00000323] 6823030000 push 00000323
---[00000e88][00101a7d][00000323] e8c5f4ffff call 00000352
Input_Halts = 0
...[00000e8d][00101a85][00000000] 83c408 add esp,+08
...[00000e90][00101a85][00000000] 33c0 xor eax,eax
...[00000e92][00101a89][00100000] 5d pop ebp
...[00000e93][00101a8d][00000044] c3 ret
Number_of_User_Instructions(18)
Number of Instructions Executed(823)

>> And finally, how can one determine if it's the same address twice
>> without doing some sort of compare and branch?
>
> OK, for PO's H, there are obviously hidden conditional branch
> instructions within H, which is why PO has to come up with some wording
> to convince himself that H can be totally ignored for whatever reason.

Because H only acts as a pure simulator of its input until after its
halt status decision has been made it has no behavior that can possibly
effect the behavior of its input. Because of this H screens out its own
address range in every execution trace that it examines. This is why we
never see any instructions of H in any execution trace after an input
calls H.

> But drilling down on this seems overkill when PO hasn't even presented
> any plausible argument (let alone proof!) that the detection rule being
> used is sound.

It is the same rule used in the Infinite_Recursion() shown above.

> What would we be trying to disprove and why? :)  PO has
> agreed that H^(H^) halts, and that H(H^,H^) returns not-halting, so
> that's it.
>

int main(){ P(P); } and int main(){ Simulate(P,P); } are computationally
equivalent and have the same halting behavior.

Because the P of H(P,P) is at a different point in the execution trace
than the above two cases it is not computationally equivalent to the
above two cases. Because it is not computationally equivalent it can
have different halting behavior.

> At least in the end it must be PO's responsibility to present /proofs/
> of anything he claims, but now we've gone like 100 miles beyond his
> capabilities - a complete non-starter...
>
> Mike.
>

When people point out any of my "mistakes" (besides typos) they are only
pointing out their own lack of understanding.

olcott

unread,
Aug 15, 2021, 1:25:11 PM8/15/21
to
On 8/15/2021 10:17 AM, Mike Terry wrote:
> On 15/08/2021 00:27, Richard Damon wrote:
>> On 8/14/21 6:56 PM, Ben Bacarisse wrote:
>>> Jeff Barnett <j...@notatt.com> writes:
>>>
>>>> On 8/14/2021 2:43 PM, Ben Bacarisse wrote:
>>>>> olcott <No...@NoWhere.com> writes:
>>>>>
>>>>>> The P(P) of main() only halts because...
>>>>> As you say, P(P) halts.
>>>>>
>>>>>> *Halting computation* is any computation that eventually reaches its
>>>>>> own final state. This criteria divides computations that halt from
>>>>>> those that merely stop running because their simulation was aborted.
>>>>> No.  There is no "special kind of halting".  The computation M(I)
>>>>> either
>>>>> halts or it does not.  H(M, I) should be false if, and only if, M(I)
>>>>> does not halt.
>>>>>
>>>>>> void P(u32 x)
>>>>>> {
>>>>>>     if (H(x, x))
>>>>>>       HERE: goto HERE;
>>>>>> }
>>>>> P(P) halts, yet H(P, P) is false.  That's the wrong answer.
>>>>> Why are you still hiding H?  Is it because you have still not figured
>>>>> out how to nest a call to the simulator you are using?  Fortunately
>>>>> "we"
>>>>> (i.e. everyone but you) can see that H is wrong without even seeing
>>>>> the
>>>>> code.  Who is included in the "we" of the subject line?  Have you
>>>>> found
>>>>> someone else who thinks that false is the correct return from a
>>>>> partial
>>>>> halt decider called with arguments that represent a halting
>>>>> computation?
>>>>
>>>> I have questions about the PO simulator I hope someone can answer. It
>>>> perhaps concerns memory mapping: First - is every instance of a use at
>>>> different levels in its own address space? Second - if not, is there
>>>> any way to know when an address is reported, which simulator instance
>>>> is being reported on? When the dumb bunny (PO expression) notes that
>>>> the same address is reached a second time without a conditional branch
>>>> being executed, is there any assurance that the addresses are noted
>>>> from the same instance of the simulation? And finally, how can one
>>>> determine if it's the same address twice without doing some sort of
>>>> compare and branch? Thanks in advance for any sort of enlightenment.
>>>
>>> You won't get a straight answer from PO, but I don't think there is any
>>> nested simulation happening at all.  PO "knows" it's that same a
>>> recursion, so he just has recursive calls traced from "outside".  I may
>>> be wrong, of course, but this is one reason I think H is being kept
>>> hidden -- it does not do what says.
>>>
>>
>> He actually has leaked a fair amount about how the system works. H isn't
>> actually a simulator, but an 'API Entry' into the x86utm system that has
>> the real simulator, and calls into H as supposed to setup a new 'nested'
>> level of simulation.
>
> My impression is that H is part of the application code rather than an
> OS call, but within H there are calls to PO's simulation primitives
> which are trapped by x86utm.exe and implemented within x86utm.  H would
> still have the task of inspecting the (nested) emulation trace entries
> to detect what it decides to be non-halting behaviour.  (But then PO has
> talked about a "global decider" which is part of the OS, so maybe my
> impression is completely wrong!  To be relevent to Linz, the deciding
> logic at least must be in the application rather than in x86utm.)
>

Now that I created

int Simulate(u32 P, u32 I)
{
((int(*)(int))P)(I);
return 1;
}

The global halt decider is fully obsolete.

I am (of course) aware that the above function directly executes rather
that emulates its input, none-the-less it provides a very simple way
that is very easy to understand to provide the computational equivalent
of simulation.

>>
>> It sounds like these nested simulations are given their own stacks and
>> 'user' code isn't supposed to be able to store data anywhere but on the
>> stack, so that is supposed to be enough for a new environment, since he
>> erroneously puts everything inside one code segment. (This means that H
>> isn't a 'Universal' Halt Decider, as its input isn't an arbitrary
>> machine.
>>
>> This would be one reason you can't 'copy' H, is that H isn't really the
>> code but just an API (and if he allowed copying, his nesting detection
>> breaks).
>>
>> One side effect of this is that I am not sure if his system can actually
>> really handle finitely but multi-level simulations as at least some of
>> the leaked implementations made H not really a computation as it used
>> static memory to communicate between H and the OS.
>>
>>
>> I also wonder if a computation built on P1 using H to decide on P2 which
>> used H to decide on P3 could return the answer from P3 to P2.
>>
>> This structure could be used to solve the twins prime conjecture if the
>> Halt decider actually worked. P1 would ask P2 to find the highest twin
>> prime. If it is non-halting there is no highest twin prime.
>>
>> P2 would iterate through the twin primes starting at say 3,5 and ask P3
>> to find the next one. If it find one, then it updates to that point and
>> uses it again to find the next highest. If P2 is at the highest, then P3
>> would be non-halting, and P2 would get the non-halting answer and could
>> tell P1 what is the highest twin prime.
>>
>> P3 just takes its input and searches to find the next highest twin prime
>> from there. If there isn't one it will just be non-halting.
>>
>> The problem is that just because P3 becomes non-halting isn't grounds to
>> call P1 or P2 non-halting, as P3 becoming non-halting is the halting
>> condition of P2. It is only if for every problem that P2 gives P3 that
>> it always finds an answer that P2 becomes non-halting, and P1 then knows
>> that the answer to the question is that there is no highest twin prime.
>> (P1 halts in all cases).
>>
>> The slight problem is that his current definition of H doesn't seem to
>> allow the caller of H to get the 'answer' from the machine it is
>> running, so you have to do everything twice, first determine that it
>> WOULD halt, then just call it to get the answer.
>>
>
> Maybe, but the emulating user code has access to the trace of the
> emulated program, so in principle it should be able to work out what
> that program returned. E.g. it can track that it finished by loading RAX
> with (say) 1 then returned (terminated), meaning that it returned 1.
>
> Mike.
>

The executed (rather than simulated) instance of H has every relevant
detail of all of its nested emulations as its own data that is derived
as a pure function of its inputs.

olcott

unread,
Aug 16, 2021, 6:49:40 PM8/16/21
to
On 8/15/2021 8:07 PM, Ben Bacarisse wrote:
> olcott <No...@NoWhere.com> writes:
>
>> On 8/15/2021 3:31 PM, Ben Bacarisse wrote:
>>> olcott <No...@NoWhere.com> writes:
>
>>>> void P(u32 x)
>>>> {
>>>> if (H(x, x))
>>>> HERE: goto HERE;
>>>> }
>>>
>>> If H(P, P) does not give the halting status of P(P) it is useless.
>>
>> In other words your knowledge of infinite recursive invocation is on
>> par with your knowledge of operating system context switching?
>
> P(P) halts.
>
>>> Imagine if you'd been honest about this two and half years ago? "I have
>>> a function H such that H(H_Hat, H_Hat) == 0 so H_Hat(H_Hat) halts." No
>>> one would care.
>>
>> I finally have this one untangled:
>> int main() { P(P); } is computationally equivalent to
>> int main() { Simulate(P,P); }
>>
>> Because they are computationally equivalent they have the same halting
>> behavior, however:
>>
>> Neither of them is computationally equivalent to the H(P,P) called
>> from P because the different placement in the execution trace changes
>> the halting behavior of P(P).
>
> H(M, I) is supposed to report the halting or otherwise of M(I). You
> don't claim that your H can do this in all cases, but you boasted (you
> like boasting) that it did for the "hat" version of H, AKA P above. It
> does not. P(P) halts but H(P, P) == 0. Boring.
>

That you don't bother to pay attention to the details or are unable to
understand the x86 language well enough to understand the details in no
way negates the fact that H(P,P) does correctly decide that its input
never halts. No one can possibly provide a rebuttal to this simply
because it is true.

olcott

unread,
Aug 19, 2021, 10:14:11 AM8/19/21
to
On 8/19/2021 5:26 AM, Malcolm McLean wrote:
> On Wednesday, 18 August 2021 at 16:44:44 UTC+1, olcott wrote:
>> On 8/18/2021 10:28 AM, Malcolm McLean wrote:
>>> On Wednesday, 18 August 2021 at 14:57:10 UTC+1, olcott wrote:
>>>>
>>>> H has no effect on the machine that it simulates until after its halt
>>>> status decision has been made. This conclusively proves that H can
>>>> ignore its in execution trace during its halt status analysis.
>>>>
>>>> Anyone disagreeing with this is either not intelligent or knowledgeable
>>>> enough to understand it, or a liar.
>>>>
>>>> That H does effect the behavior or its input at some other point is
>>>> utterly irrelevant to this analysis. We are only answering the single
>>>> question: Is it correct for H to ignore its own execution trace during
>>>> its halt status analysis?
>>>>
>>> If H is analysing H, it can't ignore the behaviour of H. That's why your results
>>> are wrong despite the execution trace seeming to show a non-halting
>>> behaviour.
>>>
>> Because H only acts as a pure simulator of its input until after
>> its halt status decision has been made it has no behavior that
>> can possibly effect the behavior of its input. Because of this H
>> screens out its own address range in every execution trace that
>> it examines. This is why we never see any instructions of H in
>> any execution trace after an input calls H.
>>
>> The above proves itself true entirely on the basis of the meaning
>> of its words. There is no possible correct rebuttal there is only
>> a failure to comprehend. If you believe that there is a correct
>> rebuttal please provide it and I will point out your error.
>>
> You're wrong here. When H is being called on a program which includes
> a call to H, the nested call to H needs to be analysed like any other
> call. It can and in fact does affect the halting behaviour of the input.

You are doing as bad of a job analyzing this as Robert. You are making
sure to simply ignore key words that I have said.

WHILE H IS MAKING ITS HALT DECISION H IS ACTING AS A PURE SIMULATOR OF
ITS INPUT.

WHILE H IS ACTING AS A PURE SIMULATOR H CANNOT POSSIBLY HAVE ANY EFFECT
ON THE BEHAVIOR OF ITS INPUT.

WHILE H CANNOT POSSIBLY HAVE ANY EFFECT ON THE BEHAVIOR OF ITS INPUT H
NEED NOT EXAMINE ITS OWN EXECUTION TRACE IN ITS HALT STATUS DECISION.

Try and find a specific flaw in that, there are one.

olcott

unread,
Aug 19, 2021, 11:14:17 AM8/19/21
to
On 8/19/2021 8:14 AM, Ben Bacarisse wrote:
> olcott <No...@NoWhere.com> writes:
>
>> On 8/18/2021 8:42 PM, Ben Bacarisse wrote:
>>> olcott <No...@NoWhere.com> writes:
>>>
>>>> On 8/18/2021 8:16 PM, Ben Bacarisse wrote:
>
>>>>> Yes. I cut them because they are not the specification of the function
>>>>> that I will challenge you to write.
>>>>
>>>> That is out-of-scope and you know it.
>>>
>>> Not in my opinion, no. A function that that shows there are undecidable
>>> sets should worry you, but for some reason you prefer to stick with
>>> talking about your H that does something entirely unsurprising and
>>> uninteresting.
>>
>> So when I correctly refute the halting problem proofs you say no I did
>> not refute every proof in the universe and the halting problem proof
>> is one of these proofs therefore I did not refute the halting problem
>> proof.
>
> No, I'm not saying that.
>
> Anyway, in case you are interested, here is the specification of the
> function you can't write:
>
> The computational model is C code with no memory restrictions. Of
> course, if you don't actually hit the memory limits of a C
> implementation it's just actual C code. I'd be happy to say more about
> this model of computation if you think the details will matter to your
> solution.
>
> The problem is that of deciding if a function would return if called
> from main. A "return decider" (in this model) is a C function returning
> _Bool that always returns a value to the expression in which it was
> called. A return decider always returns the same value for any
> arguments that represnet the same function call expression.
>
> Your mission, should you chose to accept it, is to write a return
> decider B with this prototype
>
> typedef uintptr_t data;
> typedef void (*function)(data);
>
> extern _Bool B(function, data);
>
> such that B(f, d) returns true if and only if a call of f from main with
> argument d returns to main. The two arguments, f and d, are said to
> represenet the call expression f(d).
>
> If, rather than just thinking you can do this, you have actual C code,
> you should provide either source or a compiled translation unit that can
> be linked with this one:
>
> #include <stdint.h>
> #include <stdio.h>
>
> typedef uintptr_t data;
> typedef void (*function)(data);
>
> extern _Bool B(function, data);
>
> void B_hat(data x) { if (B((function)x, x)) while (1); }
>
> int main(void)
> {
> printf("%d\n", B(B_hat, (data)B_hat));
> fflush(stdout);
> B_hat((data)B_hat);
> puts("returned");
> }
>
> The output should be either
>
> 1
> returned
>
> or
>
> 0
>
> with no further output. Of course you could always just agree that no
> such function B can be written.
>

The x86utm operating system cannot call any C functions.
Good job on the use of C. My own use of unsigned integers as function
pointers is unconventional and not as portable. I did this on purpose so
that x86utm would have a single standard tape element type.

#include <stdint.h>
#include <stdio.h>

typedef uintptr_t data;
typedef void (*function)(data);

extern _Bool B(function, data);

void B_hat(data x) { if (H((u32)x, (u32)x)) while (1); }

int main2()
{
OutputHex(H((u32)B_hat, (u32)B_hat));
B_hat((u32)B_hat);
OutputString("returned");
}


_B_hat()
[00000efc](01) 55 push ebp
[00000efd](02) 8bec mov ebp,esp
[00000eff](03) 8b4508 mov eax,[ebp+08]
[00000f02](01) 50 push eax
[00000f03](03) 8b4d08 mov ecx,[ebp+08]
[00000f06](01) 51 push ecx
[00000f07](05) e850feffff call 00000d5c
[00000f0c](03) 83c408 add esp,+08
[00000f0f](02) 85c0 test eax,eax
[00000f11](02) 740b jz 00000f1e
[00000f13](05) ba01000000 mov edx,00000001
[00000f18](02) 85d2 test edx,edx
[00000f1a](02) 7402 jz 00000f1e
[00000f1c](02) ebf5 jmp 00000f13
[00000f1e](01) 5d pop ebp
[00000f1f](01) c3 ret
Size in bytes:(0036) [00000f1f]

_main2()
[00000f2c](01) 55 push ebp
[00000f2d](02) 8bec mov ebp,esp
[00000f2f](05) 68fc0e0000 push 00000efc
[00000f34](05) 68fc0e0000 push 00000efc
[00000f39](05) e81efeffff call 00000d5c
[00000f3e](03) 83c408 add esp,+08
[00000f41](01) 50 push eax
[00000f42](05) e8e5f3ffff call 0000032c
[00000f47](03) 83c404 add esp,+04
[00000f4a](05) 68fc0e0000 push 00000efc
[00000f4f](05) e8a8ffffff call 00000efc
[00000f54](03) 83c404 add esp,+04
[00000f57](05) 6823030000 push 00000323
[00000f5c](05) e8dbf3ffff call 0000033c
[00000f61](03) 83c404 add esp,+04
[00000f64](01) 5d pop ebp
[00000f65](01) c3 ret
Size in bytes:(0058) [00000f65]

_main()
[00000f6c](01) 55 push ebp
[00000f6d](02) 8bec mov ebp,esp
[00000f6f](05) e8b8ffffff call 00000f2c
[00000f74](02) 33c0 xor eax,eax
[00000f76](01) 5d pop ebp
[00000f77](01) c3 ret
Size in bytes:(0012) [00000f77]

machine stack stack machine assembly
address address data code language
======== ======== ======== ========= =============
...[00000f6c][00101c0a][00000000] 55 push ebp
...[00000f6d][00101c0a][00000000] 8bec mov ebp,esp
...[00000f6f][00101c06][00000f74] e8b8ffffff call 00000f2c
...[00000f2c][00101c02][00101c0a] 55 push ebp
...[00000f2d][00101c02][00101c0a] 8bec mov ebp,esp
...[00000f2f][00101bfe][00000efc] 68fc0e0000 push 00000efc
...[00000f34][00101bfa][00000efc] 68fc0e0000 push 00000efc
...[00000f39][00101bf6][00000f3e] e81efeffff call 00000d5c

Begin Local Halt Decider Simulation at Machine Address:efc
...[00000efc][00211caa][00211cae] 55 push ebp
...[00000efd][00211caa][00211cae] 8bec mov ebp,esp
...[00000eff][00211caa][00211cae] 8b4508 mov eax,[ebp+08]
...[00000f02][00211ca6][00000efc] 50 push eax
...[00000f03][00211ca6][00000efc] 8b4d08 mov ecx,[ebp+08]
...[00000f06][00211ca2][00000efc] 51 push ecx
...[00000f07][00211c9e][00000f0c] e850feffff call 00000d5c
...[00000efc][0025c6d2][0025c6d6] 55 push ebp
...[00000efd][0025c6d2][0025c6d6] 8bec mov ebp,esp
...[00000eff][0025c6d2][0025c6d6] 8b4508 mov eax,[ebp+08]
...[00000f02][0025c6ce][00000efc] 50 push eax
...[00000f03][0025c6ce][00000efc] 8b4d08 mov ecx,[ebp+08]
...[00000f06][0025c6ca][00000efc] 51 push ecx
...[00000f07][0025c6c6][00000f0c] e850feffff call 00000d5c
Local Halt Decider: Infinite Recursion Detected Simulation Stopped
...[00000f3e][00101c02][00101c0a] 83c408 add esp,+08
...[00000f41][00101bfe][00000000] 50 push eax
---[00000f42][00101bfe][00000000] e8e5f3ffff call 0000032c
0
...[00000f47][00101c02][00101c0a] 83c404 add esp,+04
...[00000f4a][00101bfe][00000efc] 68fc0e0000 push 00000efc
...[00000f4f][00101bfa][00000f54] e8a8ffffff call 00000efc
...[00000efc][00101bf6][00101c02] 55 push ebp
...[00000efd][00101bf6][00101c02] 8bec mov ebp,esp
...[00000eff][00101bf6][00101c02] 8b4508 mov eax,[ebp+08]
...[00000f02][00101bf2][00000efc] 50 push eax
...[00000f03][00101bf2][00000efc] 8b4d08 mov ecx,[ebp+08]
...[00000f06][00101bee][00000efc] 51 push ecx
...[00000f07][00101bea][00000f0c] e850feffff call 00000d5c

Begin Local Halt Decider Simulation at Machine Address:efc
...[00000efc][0026c772][0026c776] 55 push ebp
...[00000efd][0026c772][0026c776] 8bec mov ebp,esp
...[00000eff][0026c772][0026c776] 8b4508 mov eax,[ebp+08]
...[00000f02][0026c76e][00000efc] 50 push eax
...[00000f03][0026c76e][00000efc] 8b4d08 mov ecx,[ebp+08]
...[00000f06][0026c76a][00000efc] 51 push ecx
...[00000f07][0026c766][00000f0c] e850feffff call 00000d5c
...[00000efc][002b719a][002b719e] 55 push ebp
...[00000efd][002b719a][002b719e] 8bec mov ebp,esp
...[00000eff][002b719a][002b719e] 8b4508 mov eax,[ebp+08]
...[00000f02][002b7196][00000efc] 50 push eax
...[00000f03][002b7196][00000efc] 8b4d08 mov ecx,[ebp+08]
...[00000f06][002b7192][00000efc] 51 push ecx
...[00000f07][002b718e][00000f0c] e850feffff call 00000d5c
Local Halt Decider: Infinite Recursion Detected Simulation Stopped
...[00000f0c][00101bf6][00101c02] 83c408 add esp,+08
...[00000f0f][00101bf6][00101c02] 85c0 test eax,eax
...[00000f11][00101bf6][00101c02] 740b jz 00000f1e
...[00000f1e][00101bfa][00000f54] 5d pop ebp
...[00000f1f][00101bfe][00000efc] c3 ret
...[00000f54][00101c02][00101c0a] 83c404 add esp,+04
...[00000f57][00101bfe][00000323] 6823030000 push 00000323
---[00000f5c][00101bfe][00000323] e8dbf3ffff call 0000033c
returned
...[00000f61][00101c02][00101c0a] 83c404 add esp,+04
...[00000f64][00101c06][00000f74] 5d pop ebp
...[00000f65][00101c0a][00000000] c3 ret
...[00000f74][00101c0a][00000000] 33c0 xor eax,eax
...[00000f76][00101c0e][00100000] 5d pop ebp
...[00000f77][00101c12][00000008] c3 ret
Number_of_User_Instructions(2)
Number of Instructions Executed(47451)

The paradox is that H does correctly decide that its simulation of
_B_hat() on _B_hat() never halts and the execution of _B_hat() on
_B_hat() does halt. This paradox is explained by the fact these two
computations are not computationally equivalent to each other even
though intuition would seem to say that they are.

The key difference seems to be that there is a one-way dependency of
_B_hat() on H that is not a mutual dependency. H is free to do as it
chooses in deciding the halt status of its input. _B_hat() is a slave to
whatever value that H returns.

the Turing machine halting problem. Simply stated, the problem
is: given the description of a Turing machine M and an input w,
does M, when started in the initial configuration q0w, perform a
computation that eventually halts? (Linz:1990:317).

In computability theory, the halting problem is the problem of
determining, from a description of an arbitrary computer program
and an input, whether the program will finish running, or continue
to run forever. https://en.wikipedia.org/wiki/Halting_problem

Since it can be independently verified that H does correctly decide that
its input will never stop running unless it aborts its simulation of
this input we have met the halting problem burden of correctly deciding
the halt status of the input description of a machine/program.

The fact that the direct execution of P(P) halts does not contradict the
fact that H(P,P) correctly decides that its input never halts because
these two computations are not computationally equivalent.

The key difference seems to be the dependency of the execution of P(P)
on the return value of H(P,P) such that the execution of P(P) is a slave
to whatever value that H(P,P) returns. There is no corresponding reverse
dependency proving that these two computations are not computationally
equivalent.

https://www.researchgate.net/publication/351947980_Halting_problem_undecidability_and_infinitely_nested_simulation

olcott

unread,
Aug 19, 2021, 11:24:02 AM8/19/21
to
On 8/19/2021 9:39 AM, Malcolm McLean wrote:
> Let's forget LInz and take this simple function
>
> void loopforever(U32 dummy)
> {
> while(1);
> }
>
> Now loopforever(dummy) doesn't halt, agreed?
> this function
>
> int H1(U32 dummy)
> {
> return H(loopforever, dummy);
> }
>
> halts and returns 0 (non-halting). Agreed?
>
> Now consider this function
>
> int H2(u32 dummy)
> {
> return H(H1, dummy);
> }
>
> What does that do?
>

void Infinite_Loop()
{
HERE: goto HERE;
}

int main()
{
Output("Input_Halts = ", H0((u32)Infinite_Loop));
}

_Infinite_Loop()
[00000ea2](01) 55 push ebp
[00000ea3](02) 8bec mov ebp,esp
[00000ea5](02) ebfe jmp 00000ea5
[00000ea7](01) 5d pop ebp
[00000ea8](01) c3 ret
Size in bytes:(0007) [00000ea8]

_main()
[00000f02](01) 55 push ebp
[00000f03](02) 8bec mov ebp,esp
[00000f05](05) 68a20e0000 push 00000ea2
[00000f0a](05) e8e3fcffff call 00000bf2
[00000f0f](03) 83c404 add esp,+04
[00000f12](01) 50 push eax
[00000f13](05) 6823030000 push 00000323
[00000f18](05) e835f4ffff call 00000352
[00000f1d](03) 83c408 add esp,+08
[00000f20](02) 33c0 xor eax,eax
[00000f22](01) 5d pop ebp
[00000f23](01) c3 ret
Size in bytes:(0034) [00000f23]

machine stack stack machine assembly
address address data code language
======== ======== ======== ========= =============
...[00000f02][00101b56][00000000] 55 push ebp
...[00000f03][00101b56][00000000] 8bec mov ebp,esp
...[00000f05][00101b52][00000ea2] 68a20e0000 push 00000ea2
...[00000f0a][00101b4e][00000f0f] e8e3fcffff call 00000bf2

Begin Local Halt Decider Simulation at Machine Address:ea2
...[00000ea2][00211bfa][00211bfe] 55 push ebp
...[00000ea3][00211bfa][00211bfe] 8bec mov ebp,esp
...[00000ea5][00211bfa][00211bfe] ebfe jmp 00000ea5
...[00000ea5][00211bfa][00211bfe] ebfe jmp 00000ea5
Local Halt Decider: Infinite Loop Detected Simulation Stopped

...[00000f0f][00101b56][00000000] 83c404 add esp,+04
...[00000f12][00101b52][00000000] 50 push eax
...[00000f13][00101b4e][00000323] 6823030000 push 00000323
---[00000f18][00101b4e][00000323] e835f4ffff call 00000352
Input_Halts = 0
...[00000f1d][00101b56][00000000] 83c408 add esp,+08
...[00000f20][00101b56][00000000] 33c0 xor eax,eax
...[00000f22][00101b5a][00100000] 5d pop ebp
...[00000f23][00101b5e][00000004] c3 ret
Number_of_User_Instructions(1)
Number of Instructions Executed(627)

olcott

unread,
Aug 23, 2021, 2:32:36 PM8/23/21
to
On 8/23/2021 12:58 PM, Malcolm McLean wrote:
> On Monday, 23 August 2021 at 16:01:23 UTC+1, olcott wrote:
>> On 8/23/2021 9:43 AM, Malcolm McLean wrote:
>>
>>> So that's the crux of it. If you say that the behaviour of the function (C usage)
>>> can change based on its execution environment, you are no longer in the world of
>>> so-called "pure" mathematical functions.
>>>
>> It might superficially seem that way only because the concept of a
>> simulating halt decider is new and has not been extensively studied.
>>
> No one serious is interested in halt deciders for the same reason that no-one serious
> is interested in perpetual motion machines. If it is known that something cannot be
> achieved, you don't waste time on things that might look superficially as if they
> are getting there.
>>
>> void Infinite_Loop()
>> {
>> HERE: goto HERE;
>> }
>>
>> It is very obvious that the behavior the direct execution of the above
>> computation must be different than the behavior of the simulation of
>> this same computation under the dominion of a simulating halt decider.
>>
>> It is also quite obvious that the simulating halt decider does correctly
>> decide that Infinite_Loop() never halts.
>>
> So we agree that Infinite_Loop() is a computation, and never halts.
> H(Infinite_Loop), with whatever twiddles we need for the unused arguments,
> is also a computation. It halts and returns false.
>
> So that's a good basis to work from.
>

This conclusively proves that the direct execution of a machine is not
computationally equivalent to the simulation of the machine description
of this machine by a simulating halt decider when this machine never halts.

Ĥ.q0 ⟨Ĥ1⟩ ⊢* Ĥ.qx ⟨Ĥ1⟩ ⟨Ĥ2⟩ ⊢* Ĥ.qn

From this we can conclude that the fact that Ĥ.qx transitions to its
final state of Ĥ.qn and halts does not contradict the fact that Ĥ.qx
⟨Ĥ1⟩ ⟨Ĥ2⟩ did correctly decide that its input never halts.
0 new messages