3 ms·
> You seem to be mistaking validating a program's source with the question of whether it performs its intended purpose. In general, that is a useful distinctio
by ukj 7y ago
> You seem to be mistaking validating a program's source with the question of whether it performs its intended purpose.
In general, that is a useful distinction to make, but you forgot about the edge case where the distinction is meaningless.
A self-hosting compiler's intended purpose is to validate its own source code.
- mannykannot 7y agoThen your mistake appears to be in failing to see that your perceived edge case does not invalidate the first sentence of my reply. If the sole purpose of a parser is to syntactically validate its own source (which is not the case for a compiler's parser, by the way, not even if we expand 'its own source' to 'arbitrary input'), then if it does that correctly, that's all there is to it.
- ukj 7y agoYour mistake appears to be - ignoring the alternative hypothesis. You are mistaken, not me. The consequences of Godel's incompleteness theorem are such that a mathematical system (such as a compiler) cannot prove its own correctness. It can only prove that it is free from known errors. Once you define what an "error" is.
- mannykannot 7y agoGodel incompleteness only applies to sufficiently powerful formal systems.
- ukj 7y agoIndeed. Type 0 Grammars are the most powerful grammars we have. https://en.wikipedia.org/wiki/Chomsky_hierarchy#Type-0_grammars https://en.wikipedia.org/wiki/Chomsky_hierarchy#Type-0_gramm... In this type of grammar Godel's incompleteness theorem is equivalent to the Halting problem.
- mannykannot 7y agoAnd which programming language did you have in mind?
- ukj 7y agoAll of them. "Type-0 grammars include all formal grammars. They generate exactly all languages that can be recognized by a Turing machine."
- mannykannot 7y agoI see - you have the complexity relation the wrong way round.
- ukj 7y agoAre you sure you aren't mistaken? :-)
- mannykannot 7y agoGo ahead - show me wrong.
- ukj 7y agoI have already done that, what I am unsure of is how to go about convincing you. With compilers - I just fix the bug myself. With humans, I have to convince the human to self-correct. Common problem in distributed systems that - leader election.
- mannykannot 7y agoIt is a general rule that those who avoid answering a question do not have an answer, and this is no exception. Here, You completely misunderstand Chomsky’s hierarchy: By your inverted-hierarchy argument, the simplest regular language would be complex enough that incompleteness would be an issue in its validation.