Liste des Groupes | Revenir à c theory |
On 5/8/2025 10:14 PM, Mike Terry wrote:On 09/05/2025 03:13, olcott wrote:On 5/8/2025 8:30 PM, Keith Thompson wrote:olcott <polcott333@gmail.com> writes:On 5/8/2025 6:49 PM, Keith Thompson wrote:olcott <polcott333@gmail.com> writes:
Yeah, so not a full simulation.His simulation is in fact a single-stepped x86 instruction simulation,A full simulation of infinite recursion?
where the stepping of each x86 instruction is under the HHH's control.
HHH can continue stepping the simulation until its target returns, in
which case the situation is logically just like direct call, as you
have described. Or HHH could step just 3 x86 instructions (say) and
then decide to return (aka "abort" its simulation). Let's call that /
partial/ simulation in contrast with /full/ simulation which you've
been supposing.
I am only doing one tiny idea at a time here.
That's wrong as written. HHH cannot simulate DDD returning in aNo one here ever agreed that when 1 or more instructions of DDD areEverybody on comp.theory understands this much.In practice, the program will likely crash due to a stack overflow,Yes you totally have this correctly.
unless the compiler implements tail-call optimization, in which case
the program might just run forever -- which also means the
unnecessary return statement will never be reached.
None of the dozens of comp.theory people could ever achieve that level
of understanding even after three years. That is why I needed to post
on comp.lang.c.
correctly simulated by HHH that DDD cannot possibly reach its own
"return" instruction.
It's true for a finite number. Aborting is not correct simulation, evenThis conclusion relies on my understanding of what you've said about
your code, which I consider to be unreliable.
Hmm, did PO make it clear that when he says
"..DDD correctly simulated by HHH cannot
possibly REACH its own "return" instruction."
he is not talking about whether "DDD halts"? [I.e. halts when run
directly from main() outside of a simulator.] No, what he is talking
about is whether the /step-by-step partial simuation/ of DDD performed
by HHH proceeds as far as DDD returning.
When 1 or more steps of DDD are correctly simulated by HHH the simulated
DDD cannot possibly reach its "return" instruction (final halt state).
No one here has agreed to that. Not in several years of coaxing and
elaboration.
Les messages affichés proviennent d'usenet.