Skip to main content

Refactoring tools for functional languages

Thompson, Simon, Li, Huiqing (2013) Refactoring tools for functional languages. Journal of Functional Programming, 23 (03). pp. 293-350. ISSN 0956-7968. (doi:10.1017/S0956796813000117) (The full text of this publication is not currently available from this repository. You may be able to access a copy if URLs are provided) (KAR id:42312)

The full text of this publication is not currently available from this repository. You may be able to access a copy if URLs are provided.
Official URL:
http://dx.doi.org/10.1017/S0956796813000117

Abstract

Refactoring 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.

Item Type: Article
DOI/Identification number: 10.1017/S0956796813000117
Subjects: Q Science > QA Mathematics (inc Computing science) > QA 76 Software, computer programming,
Q Science > QA Mathematics (inc Computing science) > QA 76 Software, computer programming, > QA76.76 Computer software
Divisions: Divisions > Division of Computing, Engineering and Mathematical Sciences > School of Computing
Depositing User: S. Thompson
Date Deposited: 14 Aug 2014 13:29 UTC
Last Modified: 16 Nov 2021 10:16 UTC
Resource URI: https://kar.kent.ac.uk/id/eprint/42312 (The current URI for this page, for reference purposes)

University of Kent Author Information

Thompson, Simon.

Creator's ORCID: https://orcid.org/0000-0002-2350-301X
CReDIT Contributor Roles:

Li, Huiqing.

Creator's ORCID:
CReDIT Contributor Roles:
  • Depositors only (login required):

Total unique views for this document in KAR since July 2020. For more details click on the image.