Skip to main content
Kent Academic Repository

A Case Study in Refactoring Functional Programs

Thompson, Simon and Reinke, Claus (2003) A Case Study in Refactoring Functional Programs. In: Ierusalimschy, Roberto and Figueiredo, Lucilia and Valente, Marcio Tulio, eds. Proceedings of the 7th Brazilian Symposium on Programming Languages. Springer, pp. 1-16. ISBN 85-88442-45-0. (KAR id:13978)

Abstract

Refactoring is the process of redesigning existing code without changing its functionality. Refactoring has recently come to prominence in the OO community. In this paper we explore the prospects for refactoring functional programs. Our paper centres on the case study of refactoring a 400 line Haskell program written by one of our students. The case study illustrates the type and variety of program manipulations involved in refactoring. Similarly to other program transformations, refactorings are based on program equivalences, and thus ultimately on language semantics. In the context of functional languages, refactorings can be based on existing theory and program analyses. However, the use of program transformations for program restructuring emphasises a different kind of transformation from the more traditional derivation or optimisation: characteristically, they often require wholesale changes to a collection of modules, and although they are best controlled by programmers, their application may require nontrivial semantic analyses. The paper also explores the background to refactoring, provides a taxonomy for describing refactorings and draws some conclusions about refactoring for functional programs.

Item Type: Book section
Uncontrolled keywords: refactoring fuctional programs Haskell tableau case study
Subjects: Q Science > QA Mathematics (inc Computing science) > QA 76 Software, computer programming,
Divisions: Divisions > Division of Computing, Engineering and Mathematical Sciences > School of Computing
Funders: Brazilian Computer Society (https://ror.org/04pk33v91)
Depositing User: Mark Wheadon
Date Deposited: 24 Nov 2008 18:01 UTC
Last Modified: 05 Nov 2024 09:47 UTC
Resource URI: https://kar.kent.ac.uk/id/eprint/13978 (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:

Reinke, Claus.

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.