Skip to main content

Identifying and introducing interfaces and callbacks using Wrangler

Lamela Seijas, Pablo and Thompson, Simon (2016) Identifying and introducing interfaces and callbacks using Wrangler. In: Proceedings of the 28th Symposium on the Implementation and Application of Functional Programming Languages. ACM-ICPS International Conference Proceeding Series . ACM, New York, USA. ISBN 978-1-4503-4767-9. (doi:10.1145/3064899.3064909) (Access to this publication is currently restricted. You may be able to access a copy if URLs are provided)

PDF - Publisher pdf
Restricted to Repository staff only
Contact us about this Publication Download (283kB)
[img]
Official URL
http://dx.doi.org/10.1145/3064899.3064909

Abstract

Duplicating code can make it easier to read in some contexts, but in general it is detrimental in several ways: it increases the compilation time, the size of the source code and, more critically, the cost of maintenance and the probability of introducing new bugs during maintenance.

In this paper, we provide two ways of automating abstraction through refactorings. The first way (that we call iterative) allows developers to introduce an abstraction layer by choosing manually the parts to abstract (one at a time), and the refactoring does the necessary code manipulations. The second way (that we call integrated) takes a partial mapping that identifies equivalent nodes of the ASTs of two modules, and automatically abstracts the mapped common parts to a separate module with a common interface, through the introduction of the template pattern.

Implementation for both of the refactorings, their dependencies, and a matching algorithm to infer partial mappings between two ASTs, are available as part of the open-source refactoring tool Wrangler for Erlang.

Item Type: Book section
DOI/Identification number: 10.1145/3064899.3064909
Uncontrolled keywords: Erlang behaviour; Wrangler; abstraction; template pattern; behaviour extraction; refactoring; generalisation; erlang-diff
Subjects: Q Science > QA Mathematics (inc Computing science) > QA 76 Software, computer programming,
Divisions: Faculties > Sciences > School of Computing
Depositing User: Pablo Lamela-Seijas
Date Deposited: 22 Nov 2017 17:09 UTC
Last Modified: 24 Sep 2019 08:46 UTC
Resource URI: https://kar.kent.ac.uk/id/eprint/64632 (The current URI for this page, for reference purposes)
Thompson, Simon: https://orcid.org/0000-0002-2350-301X
  • Depositors only (login required):

Downloads

Downloads per month over past year