• Correct simulation of DDD by HHH is proven

    From olcott@polcott333@gmail.com to comp.theory,comp.lang.c on Tue Aug 12 09:38:32 2025
    From Newsgroup: comp.lang.c

    On 8/12/2025 3:47 AM, Mikko wrote:
    On 2025-08-11 14:34:50 +0000, olcott said:


    So you understand that HHH(DD)==0 on the basis of the
    behavior of DD correctly simulated by HHH?

    No but on the basis of failure to simulate correctly the behavoiur of DD,
    in particular the point where the HHH called by DD aborts its simulation
    and returns 0 to DD which then halts.

    Can DDD emulated by HHH according to the semantics
    of the x86 language reach its own emulated "ret"
    instruction final halt state?

    void DDD()
    {
    HHH(DDD);
    return;
    }

    _DDD()
    [00002192] 55 push ebp
    [00002193] 8bec mov ebp,esp
    [00002195] 6892210000 push 00002192 // push DDD
    [0000219a] e833f4ffff call 000015d2 // call HHH
    [0000219f] 83c404 add esp,+04
    [000021a2] 5d pop ebp
    [000021a3] c3 ret
    Size in bytes:(0018) [000021a3]

    (a) HHH executes.

    (b) HHH creates a separate process context having
    its own stack and set of 16 virtual registers
    to simulate DDD using cooperative multi-tasking.

    (c) HHH emulates the first four instructions of DDD
    in this separate process context.

    (d) HHH emulates an instance of itself in this same
    process context.

    (e) This HHH instance creates another process context
    for its own emulated DDD instance.

    (f) This HHH instance emulates the first three
    instructions of DDD in this separate process
    context and sees the call 000015d2 instruction.

    It is a verified fact HHH did emulate DDD according
    to the semantics of the x86 language. That *is* the
    ultimate measure of correct emulation. Disagreeing
    with the x86 language is necessarily incorrect.
    --
    Copyright 2025 Olcott "Talent hits a target no one else can hit; Genius
    hits a target no one else can see." Arthur Schopenhauer
    --- Synchronet 3.21a-Linux NewsLink 1.2