> Why hasn't Prolog programmed us out of existence, then?
I would say because of its (low) speed.
> Constraint solvers are useful and powerful tools for declarative problem solving, but I don't recall them ever being viewed as general-purpose, especially not to the level of being a generic "autocode"
They are not autocode, but they are autosolve-my-problem which is in fact what you really want. I don't believe automatically generating code makes any sense. Source code is a very inefficient way to represent a program (i.e. a function) that is only useful because it can easily be written/modified by humans. There's no point in using source code as an internal representation for a program.
[1] AFAIK state of the art SAT solvers already do some level of learning: http://en.wikipedia.org/wiki/Conflict-Driven_Clause_Learning