Copyright © 2006-2011 Huiqing Li, Simon Thompson
Version: 0.1
Authors: Huiqing Li, Simon Thompson [web site: http://www.cs.kent.ac.uk/projects/wrangler].
All refactorings commands should be run in the context of a Wrangler application. Use wrangler_api:start() to start a Wrangler application, and wrangler_api:stop() the application.
The Wrangler API is not completed yet, more API functions will be added.
| move_fun/5 | Move a function to another module. |
| rename_fun/5 | Rename a function. |
| rename_mod/3 | Rename a module. |
| similar_code/7 | Similar code detection. |
| start/0 | Start a Wrangler application. |
| stop/0 | Stop a Wrangler application. |
| undo/0 | Undo the previous refactoring. |
move_fun(FromModOrFileName::modulename() | filename(), FunName::atom(), Arity::integer(), ToModOrFileName::modulename() | filename(), SearchPaths::[dir()]) -> {ok, FilesChanged::[filename()]} | {error, Reason}
Move a function to another module.
This refactoring moves the function specified, together with functions that are only used by the function to be moved, to the target module. This refactorings affects all those modules in which the function to be moved is used, and returns either ok with the list of files affected by this refactoring, or an error message.
rename_fun(ModOrFileName::modulename() | filename(), FunName::atom(), Arity::integer(), NewFunName::atom(), SearchPaths::[dir()]) -> {ok, FilesChanged::[filename()]} | {error, Reason}
Rename a function.
This refactoring affects all those modules in which the function renamed is used, and returns either ok with the list of files affected by this refactoring, or an error message.
rename_mod(ModorFileName::modulename() | filename(), NewModName::modulename(), SearchPaths::[dir()]) -> {ok, FilesChanged::[filename()]} | {error, Reason}
Rename a module.
This refactoring affects all those modules in which the module name is used, and returns either ok with the list of files affected by this refactoring, or an error message.
similar_code(DirFileList::[filename() | dir()], MinLen::integer(), MinToks::integer(), MinFreq::integer(), MaxVars::integer(), SimiScore::float(), SearchPaths::[dir()]) -> {ok, string()} | {error, Reason}
Similar code detection.
A similar code detector which takes an Erlang project (or just a collection of Erlang files) and
a set of parameters as input, performs clone detection, and reports the clone classes found.
Five parameters, which are of a conjunction relation, can be specified so that the user can
have control of the granularity of the clone classes reported. These parameters are:
MinLen: the minimum number of expressions included in a code clone which is a sequence of expressions;
MinToks: the minimum number of tokens included in a code clone (minimum value: 20);
MinFreq: the minimum number of duplications of a cloned code fragment (minimum value: 2);
MaxVars: the maximum number of new parameters of the least-general common abstraction function;
SimiScore: the similarity score threshold which is between 0.1 and 1.0.
start() -> {ok, Pid} | {error, Reason}
Start a Wrangler application.
stop() -> ok
Stop a Wrangler application.
undo() -> {ok, FilesChanged::[filename()]} | {error, Reason}
Undo the previous refactoring. This only works within a Wrangler application.
Generated by EDoc, Jan 18 2011, 11:56:20.