Boost logo

Boost :

From: Andrew Sutton (asutton_at_[hidden])
Date: 2007-09-01 21:32:33


> I agree with Vladimir: my definition refactoring is as a behavior-
> preserving transformation from one valid program to another. Given
> this, you really do need much of a compiler, but you also want highly
> accurate source location information, information about macro
> expansions, etc which compilers typically don't keep. It's an
> explicit goal for us to preserve that information and our solutions
> seem to work well for us so far.

To start with, your definition of refactoring is incorrect - it
simply preserves the external behavior of a program. I would also
point out that in order to ensure that a program is correct it first
has to be preprocessed, and parsed. Something as simple as renaming a
function - which is a well-known refactoring - requires none of that.
The complexity of the refactoring determines the amount of
information needed - whether or not you actually need a fully correct
AST all the time - I doubt it.

Andrew Sutton
asutton_at_[hidden]


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk