I started redshank with similar aims. It can do some refactoring, even without an elaborate infrastructure (see for example redshank-extract-to-defun. However, this is only an approximation, and a 100% solution would likely require to integrate IDE and CL compiler more tightly.
The few patterns supported by redshank are currently hand-coded, as they work on a text representation, and there are aspects like minimal code re-indentation to keep in mind. I came across Leitao's paper some time ago, but I think first one needs a (non-abstract!) syntax tree representation of a buffer, a la Eclipse.
Redshank
I started redshank with similar aims. It can do some refactoring, even without an elaborate infrastructure (see for example redshank-extract-to-defun. However, this is only an approximation, and a 100% solution would likely require to integrate IDE and CL compiler more tightly.
The few patterns supported by redshank are currently hand-coded, as they work on a text representation, and there are aspects like minimal code re-indentation to keep in mind. I came across Leitao's paper some time ago, but I think first one needs a (non-abstract!) syntax tree representation of a buffer, a la Eclipse.