Author:
THOMPSON SIMON,LI HUIQING
Abstract
AbstractRefactoring is the process of changing the design of a program without changing what it does. Typical refactorings, such as function extraction and generalisation, are intended to make a program more amenable to extension, more comprehensible and so on. Refactorings differ from other sorts of program transformation in being applied to source code, rather than to a ‘core’ language within a compiler, and also in having an effect across a code base, rather than to a single function definition, say. Because of this, there is a need to give automated support to the process. This paper reflects on our experience of building tools to refactor functional programs written in Haskell (HaRe) and Erlang (Wrangler). We begin by discussing what refactoring means for functional programming languages, first in theory, and then in the context of a larger example. Next, we address system design and details of system implementation as well as contrasting the style of refactoring and tooling for Haskell and Erlang. Building both tools led to reflections about what particular refactorings mean, as well as requiring analyses of various kinds, and we discuss both of these. We also discuss various extensions to the core tools, including integrating the tools with test frameworks; facilities for detecting and eliminating code clones; and facilities to make the systems extensible by users. We then reflect on our work by drawing some general conclusions, some of which apply particularly to functional languages, while many others are of general value.
Publisher
Cambridge University Press (CUP)
Reference86 articles.
1. Tullsen M. (2002) PATH, A Program Transformation System for Haskell. PhD thesis, Yale University, Yale, CT.
2. Proceedings of the Fifth Workshop on Refactoring Tools - WRT '12
Cited by
9 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Visual Assurance in Refactoring Through Trace Equivalence of Control Flow Graphs;2024 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER);2024-03-12
2. Characterising renaming within OCaml’s module system: theory and implementation;Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation;2019-06-08
3. Improving Haskell;Lecture Notes in Computer Science;2019
4. Constraint-Based Refactoring;ACM Transactions on Programming Languages and Systems;2018-03-31
5. Scaling Reliably;ACM Transactions on Programming Languages and Systems;2017-12-31