Software may not have existed when the Constitution was drafted, but patents were designed to cover "the state of the art" at that time. Notice that patents were patently open: A patent was only granted when designs and methods were described in sufficient detail that somebody "sufficiently skilled in the arts" could completely understand, if not themselves replicate, the invention.
Not that they had a right to do so for a limited period of time (the exclusivity of control over that right is what a patent grants), but patents were published.
Thus, if software had existed at the time of Madison, Hamilton, Jefferson, and the rest, they would have either (1) required that software source code be published in order to be protected; (2) allowed that software code could be treated as a "trade secret," but with no protections from copying, reverse engineering, or any other method of duplication; or (3) created some new form of protection which, whatever it was called and however it worked, provided for the public to gain some benefit through publication or disclosure.
I think it's Lessig, not the current status quo, that gets it right about how the Constitution would have treated software.
CTO Red Hat