Gottschalk v. Benson ruling by US Supreme Court on 20 November 1972
 On what is excluded from patentability
phenomena of nature, though just discovered, mental processes, and abstract intellectual concepts are not patentable, as they are the basic tools of scientific and technological work.
Transformation and reduction of an article 'to a different state or thing' is the clue to the patentability of a process claim that does not include particular machines.
It also affirmed that adding a computer is not enough to make a idea patentable:
The mathematical procedures can be carried out in existing computers long in use, no new machinery being necessary. And, as noted, they can also be performed without a computer.
 Indicating how narrow the exclusion should be
Expressing that they're only excluding a limited subset of computer-related ideas:
It is argued that a process patent must either be tied to a particular machine or apparatus or must operate to change articles or materials to a "different state or thing." We do not hold that no process patent could ever qualify if it did not meet the requirements of our prior precedents. It is said that the decision precludes a patent for any program servicing a computer. We do not so hold. It is said that we have before us a program for a digital computer but extend our holding to programs for analog computers. We have, however, made clear from the start that we deal with a program only for digital computers. It is said we freeze process patents to old technologies, leaving no room for the revelations of the new, onrushing technology. Such is not our purpose.
So, not all "program[s] servicing a computer" are excluded, but looking at the rejected Benson patent, the exclusion would seem to also apply to, say, patents on XML:
The mathematical formula involved here has no substantial practical application except in connection with a digital computer, which [409 U.S. 63, 72] means that if the judgment below is affirmed, the patent would wholly pre-empt the mathematical formula and in practical effect would be a patent on the algorithm itself.
A way of writing XML documents "has no substantial practical application except in connection with a digital computer", so it seems this ruling intends to exclude a very large portion of what we call software patents.
This wiki is part of the End Software Patents (ESP) campaign (donate). For more information, see: