part of the software development cycle. Techniques Here are some examples of micro-refactorings; some of these may only apply to certain languages or language types. A longer list can be found in Martin Fowler's refactoring book and website. Many development environments provide automated support for these micro-refactorings. For instance, a programmer could click on the name of a variable and then select the "Encapsulate field" refactoring from a context menu. The IDE would then prompt for additional details, typically with sensible defaults and a preview of the code changes. After confirmation by the programmer it would carry out the required changes throughout the code. Techniques that allow for more understanding Program Dependence Graph - explicit representation of data and control dependencies System Dependence Graph - representation of procedure calls between PDG Software intelligence - reverse engineers the initial state to understand existing intra-application dependencies Techniques that allow for more abstraction Encapsulate field – force code to access the field with getter and setter methods Generalize type – create more general types to allow for more code sharing Replace type-checking code with state/strategy Replace conditional with polymorphism Techniques for breaking code apart into more logical pieces Componentization breaks code down into reusable semantic units that present clear, well-defined, simple-to-use interfaces. Extract class moves part of the code from an existing class into a new class. Extract method, to turn part of a larger method into a new method. By breaking down code in smaller pieces, it is more easily understandable. This is also applicable to functions. Techniques for improving names and location of code Move method or move field – move to a more appropriate class or source file Rename method or rename field – changing the name into a new one that better reveals its purpose Pull up – in object-oriented programming (OOP), move to a superclass Push down – in OOP, move to a subclass Automatic clone detection Hardware refactoring While the term refactoring originally referred exclusively to refactoring of software code, in recent years code written in hardware description languages has also been refactored. The term hardware refactoring is used as a shorthand term for refactoring of code in hardware description languages. Since hardware description languages are not considered to be programming languages by most hardware engineers, hardware refactoring is to be considered a separate field from traditional code refactoring. Automated refactoring of analog hardware descriptions (in VHDL-AMS)