Sujet : Re: What is the correct halt status for HHH(DDD) ?
De : polcott333 (at) *nospam* gmail.com (olcott)
Groupes : comp.theoryDate : 14. Jul 2024, 15:36:52
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v70nq5$61d8$5@dont-email.me>
References : 1 2 3
User-Agent : Mozilla Thunderbird
On 7/14/2024 3:00 AM, Mikko wrote:
On 2024-07-13 18:15:35 +0000, olcott said:
On 7/13/2024 12:25 PM, Richard Damon wrote:
On 7/13/24 12:48 PM, olcott wrote:
What is the correct halt status for an input to
a simulating termination analyzer that calls its
own termination analyzer?
>
typedef void (*ptr)();
int HHH(ptr P);
>
void DDD()
{
HHH(DDD);
}
>
int main()
{
HHH(DDD);
}
>
>
Halting.
>
Since HHH defined to be a termination analyzer, by that definition it must return to its caller.
>
Since DDD has no inputs, its behavior isn't affected by any inputs, and thus DDD will halt for ALL input conditions, so
>
You are stupidly saying that Infinite_Loop() will halt because
it has no inputs.
void Infinite_Loop()
{
HERE: goto HERE;
}
You are stupidly saying that Infinite loop is executed as a part of HHH.
Infinite_Loop() is emulated in its own process context.
HHH calls the x86utm instruction DebugStep() to emulate
one instruction of _Infinite_Loop() at a time.
u32 DebugStep(Registers* master_state,
Registers* slave_state,
Decoded_Line_Of_Code* decoded);
_Infinite_Loop()
[00002137] 55 push ebp
[00002138] 8bec mov ebp,esp
[0000213a] ebfe jmp 0000213a
[0000213c] 5d pop ebp
[0000213d] c3 ret
Size in bytes:(0007) [0000213d]
machine stack stack machine assembly
address address data code language
======== ======== ======== ========= =============
[00002197][001037fb][00000000] 55 push ebp
[00002198][001037fb][00000000] 8bec mov ebp,esp
[0000219a][001037f7][00002137] 6837210000 push 00002137
[0000219f][001037f3][000021a4] e833f4ffff call 000015d7
New slave_stack at:10389f --- new process context
Begin Local Halt Decider Simulation Execution Trace Stored at:1138a7
[00002137][00113897][0011389b] 55 push ebp
[00002138][00113897][0011389b] 8bec mov ebp,esp
[0000213a][00113897][0011389b] ebfe jmp 0000213a
[0000213a][00113897][0011389b] ebfe jmp 0000213a
Local Halt Decider: Infinite Loop Detected Simulation Stopped
-- Copyright 2024 Olcott "Talent hits a target no one else can hit; Geniushits a target no one else can see." Arthur Schopenhauer