the undecidability of program verification
Programmers dream of a tool that reads your code and a specification of what it should do, and confirms 'yes, this program meets the spec' or 'no, here is where it fails' — every time, automatically. Rice's theorem and the halting problem together prove that no such fully general tool can exist for non-trivial behavioural specifications. Checking whether arbitrary code satisfies an arbitrary non-trivial property of its behaviour is undecidable. The wall that stops the halt checker stops the verifier too.
Why does this follow? A behavioural specification is precisely a property of the language (the input-output behaviour) the program implements. 'Does this function return a sorted list for every input?', 'does this program never crash?', 'does it always eventually respond?' — each is a non-trivial semantic property, and Rice's theorem says deciding any of them for arbitrary programs is impossible. Even the simplest-sounding spec, 'does this program ever produce output' or 'does it accept any input at all', reduces to A_TM and inherits its undecidability.
Yet verification is a thriving field, which seems paradoxical until you see the escape routes. We verify by restricting the question or accepting partial answers: model checking works on finite-state systems where the property IS decidable; type systems prove a fixed, decidable class of properties; theorem provers verify specific programs with human guidance rather than fully automatically; and sound analyzers report 'verified', 'definitely broken', or 'cannot determine'. None of these contradicts the theorem, because none claims to be a total automatic decider for all programs and all specs. The impossibility shapes the engineering: we trade generality for decidability.
'Does program P never divide by zero on any input?' is a non-trivial behavioural property, hence undecidable in general by Rice. A type checker or sound analyzer may still flag many cases and report 'cannot prove safe' on the rest.
No general verifier decides arbitrary behavioural specs; practical tools restrict scope or answer partially.
Undecidability does not mean verification is futile. It means a single all-powerful verifier is impossible; restricted, sound, or interactive tools remain extremely effective.