• Re: DDD simulated by HHH cannot possibly halt (Halting Problem)

    From Richard Heathfield@21:1/5 to olcott on Fri Apr 4 03:39:02 2025
    [Post in comp.lang.c, read in comp.lang.c]

    On 04/04/2025 02:27, olcott wrote:
    void DDD()
    {
       HHH(DDD);
       return;
    }

    Do you really think that anyone knowing the C
    programming language is too stupid to see that
    DDD simulated by HHH cannot possibly return?

    Anyone knowing the C language will know on seeing your code that
    your HHH is largely written not in C itself but in a mishmash of
    assembly calls with C syntax. Before asking any more questions
    about it in comp.lang.c, I suggest you rewrite it in straight
    C... if you can.

    --
    Richard Heathfield
    Email: rjh at cpax dot org dot uk
    "Usenet is a strange place" - dmr 29 July 1999
    Sig line 4 vacant - apply within

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Heathfield@21:1/5 to olcott on Fri Apr 4 03:58:47 2025
    [Post in comp.lang.c, read in comp.lang.c]

    On 04/04/2025 03:45, olcott wrote:
    On 4/3/2025 9:39 PM, Richard Heathfield wrote:
    [Post in comp.lang.c, read in comp.lang.c]

    On 04/04/2025 02:27, olcott wrote:
    void DDD()
    {
        HHH(DDD);
        return;
    }

    Do you really think that anyone knowing the C
    programming language is too stupid to see that
    DDD simulated by HHH cannot possibly return?

    Anyone knowing the C language will know on seeing your code that

    I am correct

    Oh, I see. Yes, of course you are. Well done.

    "DDD simulated by HHH cannot possibly return".

    Then HHH cannot possibly simulate DDD.

    everything else is off-topic for this post.

    And HHH() is off-topic for this newsgroup. You started the thread
    in comp.lang.c, so to make it topical you'd have to rewrite HHH()
    in C instead of peppering your code with assembly language calls.

    --
    Richard Heathfield
    Email: rjh at cpax dot org dot uk
    "Usenet is a strange place" - dmr 29 July 1999
    Sig line 4 vacant - apply within

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Heathfield@21:1/5 to olcott on Fri Apr 4 05:58:42 2025
    On 04/04/2025 05:41, olcott wrote:
    On 4/3/2025 11:31 PM, Richard Heathfield wrote:
    On 04/04/2025 05:08, olcott wrote:
    On 4/3/2025 9:58 PM, Richard Heathfield wrote:
    [Post in comp.lang.c, read in comp.lang.c]

    On 04/04/2025 03:45, olcott wrote:
    On 4/3/2025 9:39 PM, Richard Heathfield wrote:
    [Post in comp.lang.c, read in comp.lang.c]

    On 04/04/2025 02:27, olcott wrote:
    void DDD()
    {
        HHH(DDD);
        return;
    }

    Do you really think that anyone knowing the C
    programming language is too stupid to see that
    DDD simulated by HHH cannot possibly return?

    Anyone knowing the C language will know on seeing your code
    that

    I am correct

    Oh, I see. Yes, of course you are. Well done.

    "DDD simulated by HHH cannot possibly return".

    Then HHH cannot possibly simulate DDD.

    everything else is off-topic for this post.

    And HHH() is off-topic for this newsgroup. You started the
    thread in comp.lang.c, so to make it topical you'd have to
    rewrite HHH() in C instead of peppering your code with
    assembly language calls.


    The halting problem in C would seem to be relevant to C groups

    The C code would be topical, yes. [Note that comp.lang.c++ is
    not a C group. It's a C++ group.] But the assembly language
    calls are not topical here.

    typedef void (*ptr)();
    int HHH(ptr P);


    int DD()
    {
       int Halt_Status = HHH(DD);
       if (Halt_Status)
         HERE: goto HERE;
       return Halt_Status;
    }

    int main()
    {
       HHH(DD);
    }

    DD simulated by HHH gets stuck on its first line.

    Then HHH is failing to correctly analyse DD for determining
    whether it halts, and therefore it is failing to address the
    Halting Problem.

    Non-working simulations are a dime a dozen, and they prove
    nothing.


    Fully operating code.

    I've seen it. It's C syntax, but it's basically assembly
    language, not C.

    But let's imagine it's in C, imagine you're right, and imagine
    it's fully working. If it's fully working, it must correctly
    analyse DD's behaviour, so it can't get stuck. If it does get
    stuck (as you claim) it can't correctly analyse DD's behaviour so
    it can't be fully working (as you claim).

    Either claim (it works, it doesn't work) could in principle be
    true, but not both. So either you're wrong or you're wrong, but
    /how/ you're wrong depends on which claim you decide to stand behind.

    But wait!

    I am correct

    Oh, I see. Yes, of course you are. Well done. Good lad.

    --
    Richard Heathfield
    Email: rjh at cpax dot org dot uk
    "Usenet is a strange place" - dmr 29 July 1999
    Sig line 4 vacant - apply within

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Heathfield@21:1/5 to olcott on Fri Apr 4 05:31:32 2025
    On 04/04/2025 05:08, olcott wrote:
    On 4/3/2025 9:58 PM, Richard Heathfield wrote:
    [Post in comp.lang.c, read in comp.lang.c]

    On 04/04/2025 03:45, olcott wrote:
    On 4/3/2025 9:39 PM, Richard Heathfield wrote:
    [Post in comp.lang.c, read in comp.lang.c]

    On 04/04/2025 02:27, olcott wrote:
    void DDD()
    {
        HHH(DDD);
        return;
    }

    Do you really think that anyone knowing the C
    programming language is too stupid to see that
    DDD simulated by HHH cannot possibly return?

    Anyone knowing the C language will know on seeing your code that

    I am correct

    Oh, I see. Yes, of course you are. Well done.

    "DDD simulated by HHH cannot possibly return".

    Then HHH cannot possibly simulate DDD.

    everything else is off-topic for this post.

    And HHH() is off-topic for this newsgroup. You started the
    thread in comp.lang.c, so to make it topical you'd have to
    rewrite HHH() in C instead of peppering your code with assembly
    language calls.


    The halting problem in C would seem to be relevant to C groups

    The C code would be topical, yes. [Note that comp.lang.c++ is not
    a C group. It's a C++ group.] But the assembly language calls are
    not topical here.

    typedef void (*ptr)();
    int HHH(ptr P);


    int DD()
    {
      int Halt_Status = HHH(DD);
      if (Halt_Status)
        HERE: goto HERE;
      return Halt_Status;
    }

    int main()
    {
      HHH(DD);
    }

    DD simulated by HHH gets stuck on its first line.

    Then HHH is failing to correctly analyse DD for determining
    whether it halts, and therefore it is failing to address the
    Halting Problem.

    Non-working simulations are a dime a dozen, and they prove nothing.

    --
    Richard Heathfield
    Email: rjh at cpax dot org dot uk
    "Usenet is a strange place" - dmr 29 July 1999
    Sig line 4 vacant - apply within

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Richard Heathfield@21:1/5 to olcott on Sat Apr 5 04:49:04 2025
    On 05/04/2025 00:41, olcott wrote:
    *Simulating termination analyzer Principle*
    It is always correct for any simulating termination
    analyzer to stop simulating and reject any input that
    would otherwise prevent its own termination. The
    only rebuttal to this is rejecting the notion that
    deciders must always halt.

    In other words, you operate on the principle that deciders don't
    have to (and indeed can't) always make a correct decision on
    whether an input program halts.

    So it turns out that you agree with everyone else after all. Well
    done.

    --
    Richard Heathfield
    Email: rjh at cpax dot org dot uk
    "Usenet is a strange place" - dmr 29 July 1999
    Sig line 4 vacant - apply within

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)