Wrangler

 
 

Wrangler is an interactive refactoring tool for Erlang, integrated into both emacs and Eclipse.


Wrangler’s refactorings cover structural changes such as function, variable and module renaming, function extraction and generalisation. Wrangler recognises macros in code, and can be used on a single file or across a whole project.


Wrangler can also be used to locate and remove code clones, and to improve the module structure of projects.

Wrangler is extensible, with an API for writing new refactorings and a DSL for scripting complex refactoring combinations.


Wrangler also supports testing in EUnit, QuickCheck and Common Test, so your tests are refactored automatically when you refactor your code.


We’ve written a paper on Refactoring tools for functional languages, which covers a lot of the background to the development of Wrangler and refactoring for Erlang. Our other publications about Wrangler are listed here.


Acknowledgements


The development of Wrangler has been supported by EPSRC and the EU 7th Framework Programme.

Getting Started with Wrangler


Wrangler for unix (Mac OS X and linux), which uses emacs as a front end, is available from github.



Wrangler can be used within Eclipse alongside Erlide, the Erlang plugin.


Details about installing and getting started with Wrangler are here.


Documentation



Videos


- Getting started with Wrangler

- Basic refactorings in Wrangler

  1. -Structural refactorings in Wrangler

  2. -Refactoring and Clone Detection in Wrangler

  3. -InfoQ interview with Huiqing and Simon on refactoring

  4. -DIY Refactoring with Wrangler: a presentation at the EUC, 2011.

  5. -Let's make refactoring tools user-extensible! Fun in the Afternoon, Brighton, Nov 2012.

  6. -Evolving your projects with Wrangler: EUC 2014, slides video.

  7. -Evolving projects to concurrency with Wrangler, Erlang Factory 2015.


Tutorial from EUC 2010


Slides: ppt pdf

Exercises: doc pdf

Example code: gz


Links


PROWESS project 

RELEASE project

HaRe: the Haskell refactorer

Simon Thompson