It seems to me the way to do it is to establish that software alone (or software in combination with a prior art computer) cannot infringe any patent.
> If 'yes', what happens to all the money companies have already spent on the patents they currently have?
The assumption is that abolishing software patents will have a net positive result. Practicing entities thereby have more to gain by avoiding the future costs of zero sum patent prosecution, licensing negotiations and patent litigation than they have to lose in sunk patent prosecution costs.
The hardest hit would of course be patent trolls with no other line of business, whose dissolution into bankruptcy can only be celebrated. Your concern is like being concerned for the costs incurred by kidnappers in purchasing unmarked vans and securing abandoned warehouses when the day comes that we abolish kidnapping.
We are currently granting 20 year patents. Next year we grant 19-year patents, etc, etc. Past (and current) investors can capitalize on their 'investments', and the USPO and related services (attorneys) have a chance to scale down gradually.
Over time there would be diminishing returns on filing a patent, and players entering the world of software patents are faced with exactly the same world that they now face, except over time things look better.
It seems like the holder of a software patent would really have to have something to get it to stick in such an environment. Because of that potentiality it doesn't seem like an all or nothing proposition to me.
Is this retroactive, i.e., all software patents filed and granted in the past too are abolished?
If 'no', this can bring disadvantage to new comers who cannot file any new patents against those who have already have then granted.
If 'yes', what happens to all the money companies have already spent on the patents they currently have? (International filings in many different countries can set a company back by several hundred thousands of dollars.)
I am open to considering favoring abolishing patents (see also the alternative discussion on why only for software) provided it is applied uniformly to the past as well as the future without disadvantaging new comers.
I do agree that on the very least, the term of the patent should be dependent on the degree of innovation involved whether in terms of time (number of years of validity) or money (maximum amount of gain in proportion to the R&D expenditure). People on HN have generally opposed this thought due to the overheads involved, etc.