Liste des Groupes | Revenir à c theory |
On 5/8/2025 8:30 PM, Keith Thompson wrote:And thus fails to be the pure function you agreed it needed to be.olcott <polcott333@gmail.com> writes:HHH can only simulate a function that take no argumentsOn 5/8/2025 6:49 PM, Keith Thompson wrote:>olcott <polcott333@gmail.com> writes:>
[...]void DDD()"cannot possibly each"?
{
HHH(DDD);
return;
}
>
If you are a competent C programmer then you
know that DDD correctly simulated by HHH cannot
possibly each its own "return" instruction.
I am a competent C programmer (and I don't believe you can make
the same claim). I don't know what HHH is. The name "HHH" tells
me nothing about what it's supposed to do. Without knowing what
HHH is, I can't say much about your code (or is it pseudo-code?).
>
For the purpose of this discussion HHH is exactly
what I said it is. It correctly simulates DDD.
Does HHH correctly simulate DDD *and do nothing else*?
>
Does HHH correctly simulate *every* function whose address is passed
to it? Must the passed function be one that takes no arguments
and does not return a value?
>
Can HHH just *call* the function whose address is passed to it?
If it's a correct simulation, there should be no difference between
calling the function and "correctly simulating" it.
>
My knowledge of C tells me nothing about *how* HHH might simulate
DDD.
>
and has no return value. HHH also simulates the entire
chain of functions that this function calls. These can
take arguments or not and have return values or not.
Thus HHH ends up simulating itself (and everything
that HHH calls) simulating DDD in an infinite
sequence of recursive emulation until OOM error.
Exactly. None of these people on comp.theory couldWe need not know anything else about HHH to>
know that DDD correctly simulated by HHH cannot
possibly REACH its own "return" instruction.
Assuming that HHH(DDD) "correctly simulates" DDD, and assuming it
does nothing else, your code would be equivalent to this:
>
void DDD(void) {
DDD();
return;
}
>
get that even after three years.
Then the return statement (which is unnecessary anyway) will never beIt is only there to mark a final halt state.
reached.
In practice, the program will likely crash due to a stackYes you totally have this correctly.
overflow, 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.
Based on assuming the code violates the rules you say it must follow.This conclusion relies on my understanding of what you've said aboutI am not even talking about my code. I am
your code, which I consider to be unreliable.
>
talking about the purely hypothetical code
that you just agreed to.
But we can't correctly emulate the call insturciton of DD or DDD as the target is not part of the input, and thus any emulator that looks there has violate the requirements of being a pure function that you agreed to.No doubt you believe that there is some significance to theI will tell you that later after you understand
apparent fact that the return statement will never be reached,
assuming that's a correct and relevant conclusion. I don't know
what that significance might be.
>
some prerequisite ideas first.
int DD()
{
int Halt_Status = HHH(DD);
if (Halt_Status)
HERE: goto HERE;
return Halt_Status;
}
The same thing that applied to DDD equally
applies to the more complicated DD.
When 1 or more instructions of DD are correctly
simulated by HHH the correctly simulated DD
cannot possibly get past its call to HHH(DD).
Thus DD also never reaches its "return" instruction.
>The return statement is harmless but unnecessary.>
"void DDD()" should be "void DDD(void)" (unless you're using C23,
but
we've established that your not). Why did you choose to use empty
parentheses? (If you answer nothing else, please answer that.)
I am using Microsoft Visual Studio 2017.
It compiled cleanly.
Microsoft Visual Studio 2017 is not a conforming C compiler. It has
options that cause it to attempt to be one. You are feeding it
incorrect code, and it's failing to diagnose it. Your code would
also compile cleanly if you fixed the errors. *Correct* C code
might be part of a more valid argument for your claims than the
one you're making. *Incorrect* C code hurts your credibility,
something I thought you cared about. (Using C at all is an odd
choice, but I won't get into that.)
>
If there were a refutation of the proof of the insolubility of the
Halting Problem, I do not believe it would really depend on the
vagaries of the 2017 version of Microsoft Visual Studio.
>
Oh, and I'm very likely to tire of this discussion very soon, so
think carefully if you want to make a point that you'd like me to
pay attention to. Among other things, your repeated insults against
people who dare to disagree with you do not motivate me to engage
with you. I probably shouldn't have jumped into this discussion,
but the noise level here is already so high I don't feel very bad
about it.
>
Les messages affichés proviennent d'usenet.