Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #160154

Re: Infinite recursion detection criteria (Please correct me if I am wrong)

Subject Re: Infinite recursion detection criteria (Please correct me if I am wrong)
Newsgroups comp.lang.c, comp.theory, comp.lang.c++
References <HridnZf_Jp3tcOf9nZ2dnUU7-KfNnZ2d@giganews.com> <s5eu3m$o2g$1@gioia.aioe.org> <m_2dnR2eBu7ZYOf9nZ2dnUU7-aednZ2d@giganews.com> <20210417084019.443@kylheku.com>
From olcott <NoOne@NoWhere.com>
Date 2021-04-17 14:02 -0500
Message-ID <ea-dnTKCu759reb9nZ2dnUU7-e_NnZ2d@giganews.com> (permalink)

Cross-posted to 3 groups.

Show all headers | View raw


On 4/17/2021 10:41 AM, Kaz Kylheku wrote:
> On 2021-04-17, olcott <NoOne@NoWhere.com> wrote:
>> On 4/17/2021 10:16 AM, MrSpook__k@rw5_r42g0rzmn7wwf3izpl4.biz wrote:
>>> On Sat, 17 Apr 2021 09:15:14 -0500
>>> olcott <NoOne@nospicedham.NoWhere.com> wrote:
>>>> Copyright 2021 Pete Olcott
>>>
>>> Pretentious twat.
>>
>> ad hominem the favorite reply of ignoramuses.
> 
> I see you have not yet read the exellent article:
> 
> https://laurencetennant.com/bonds/adhominem.html
> 

In any case back to the actual point the following <is> confirmed to be 
correct halt deciding criteria in the case of infinite recursion.

If a function X() is called by function Y() twice in sequence from the 
same machine address of Y() with the same parameters to X() and the 
execution trace shows no conditional branch instructions in Y() or a 
function call returns from X() then the function call from Y() to X() is 
infinitely recursive unless X() stops it.

The referenced execution trace is on x86 machine language, disassembled 
for human consumption.

When Halts() uses an x86 emulator to simulate its input and maintains an 
execution trace of this emulation then it can examine this execution 
trace according to the above criteria and correctly decide that Y() is 
invoking X() in infinite recursion.

On this basis Halts() can stop simulating Y() and report that Y() would 
not halt unless its execution was aborted by Halts().

void Y(u32 P)
{
   Halts(P, P);
}


int main()
{
   Halts((u32)Y, (u32)Y);
}


-- 
Copyright 2021 Pete Olcott

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

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Infinite recursion detection criteria (Please correct me if I am olcott <NoOne@nospicedham.NoWhere.com> - 2021-04-17 09:15 -0500
  Re: Infinite recursion detection criteria (Please correct me if I am MrSpook__k@rw5_r42g0rzmn7wwf3izpl4.biz - 2021-04-17 15:16 +0000
    Re: Infinite recursion detection criteria (Please correct me if I am olcott <NoOne@NoWhere.com> - 2021-04-17 10:22 -0500
      Re: Infinite recursion detection criteria (Please correct me if I am MrSpook_ejo78o@4t98owsqx2nlg6yp.com - 2021-04-17 15:32 +0000
      Re: Infinite recursion detection criteria (Please correct me if I am Kaz Kylheku <563-365-8930@kylheku.com> - 2021-04-17 15:41 +0000
        Re: Infinite recursion detection criteria (Please correct me if I am olcott <NoOne@NoWhere.com> - 2021-04-17 11:56 -0500
        Re: Infinite recursion detection criteria (Please correct me if I am olcott <NoOne@NoWhere.com> - 2021-04-17 11:57 -0500
          Re: Infinite recursion detection criteria (Please correct me if I am Kaz Kylheku <563-365-8930@kylheku.com> - 2021-04-17 17:25 +0000
            Re: Infinite recursion detection criteria (Please correct me if I am olcott <NoOne@NoWhere.com> - 2021-04-17 12:43 -0500
              Re: Infinite recursion detection criteria (Please correct me if I am Kaz Kylheku <563-365-8930@kylheku.com> - 2021-04-17 18:33 +0000
            Re: Infinite recursion detection criteria (Please correct me if I am olcott <NoOne@NoWhere.com> - 2021-04-17 13:02 -0500
              Re: Infinite recursion detection criteria (Please correct me if I am Kaz Kylheku <563-365-8930@kylheku.com> - 2021-04-17 18:37 +0000
                Re: Infinite recursion detection criteria (Please correct me if I am olcott <NoOne@NoWhere.com> - 2021-04-17 13:55 -0500
                Re: Infinite recursion detection criteria (Please correct me if I am Kaz Kylheku <563-365-8930@kylheku.com> - 2021-04-17 19:14 +0000
                Re: Infinite recursion detection criteria (Please correct me if I am wrong) olcott <NoOne@NoWhere.com> - 2021-04-17 14:23 -0500
                Re: Infinite recursion detection criteria (Please correct me if I am wrong) Real Troll <rel.troll@trolls.com> - 2021-04-17 20:38 +0100
                Re: Infinite recursion detection criteria (Please correct me if I am wrong) olcott <NoOne@NoWhere.com> - 2021-04-17 15:01 -0500
                Re: Infinite recursion detection criteria (Please correct me if I am wrong) Kaz Kylheku <563-365-8930@kylheku.com> - 2021-04-18 01:57 +0000
                Re: Infinite recursion detection criteria (Please correct me if I am Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2021-04-17 13:47 -0700
                Re: Infinite recursion detection criteria (dodging the point?) olcott <NoOne@NoWhere.com> - 2021-04-17 15:56 -0500
                Re: Infinite recursion detection criteria (dodging the point?) Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2021-04-17 14:24 -0700
                Re: Infinite recursion detection criteria (dodging the point?) olcott <NoOne@NoWhere.com> - 2021-04-17 16:26 -0500
        Re: Infinite recursion detection criteria (Please correct me if I am wrong) olcott <NoOne@NoWhere.com> - 2021-04-17 14:02 -0500
  Re: Infinite recursion detection criteria (Please correct me if I am olcott <NoOne@nospicedham.NoWhere.com> - 2021-04-17 11:01 -0500
  Re: Infinite recursion detection criteria (Please correct me if I am Kaz Kylheku <563-365-8930@nospicedham.kylheku.com> - 2021-04-17 15:01 +0000
    Re: Infinite recursion detection criteria (Please correct me if I am olcott <NoOne@NoWhere.com> - 2021-04-17 17:10 -0500
    Re: Infinite recursion detection criteria (Please correct me if I am olcott <NoOne@NoWhere.com> - 2021-04-17 17:30 -0500
      Re: Infinite recursion detection criteria (Please correct me if I am Kaz Kylheku <563-365-8930@kylheku.com> - 2021-04-18 01:58 +0000
  Re: Infinite recursion detection criteria (Please correct me if I am Bonita Montero <Bonita.Montero@gmail.com> - 2021-04-18 00:03 +0200
    Re: Infinite recursion detection criteria (Please correct me if I am olcott <NoOne@NoWhere.com> - 2021-04-17 17:12 -0500
  Re: Infinite recursion detection criteria (Please correct me if I am R Kym Horsell <kym@kymhorsell.com> - 2021-04-18 00:06 +0000

csiph-web