Article ID Journal Published Year Pages File Type
433339 Science of Computer Programming 2014 14 Pages PDF
Abstract

•We built a prototype of a static type inferencer for Smalltalk.•The type information reveals polymorphic usage of messages.•We use this information to rename only relevant references to overloaded method names.•Complexity and slow performance hampers the application in the general case.•The evaluation estimates that it can be applied in 23% to 47% of the cases.

Refactoring is a crucial activity in agile software development. As a consequence, automated tools are expected to support refactoring, both for reducing the developer's effort as well as for avoiding errors due to manual changes. In this context, the chosen programming language has a major impact on the level of support that an automated refactoring tool can offer. One important aspect of a programming language concerning the automation of refactoring is the type system. While a static type system, present in languages such as Java, provides information about dependencies in the program, the dynamic type system of the Smalltalk programming language offers little information that can be used by automated refactoring tools.This paper focuses on the challenges in the context of refactoring raised by the dynamic type system of Smalltalk. It highlights the problems caused by the absence of static type information and proposes the use of static code analysis for performing type inference to gather information about the dependencies in the program's source code. It explains the mechanism of the static code analysis using sample code and presents a prototype of an enhanced refactoring tool, which uses the structural information extracted through static code analysis. Empirical samples build the base for evaluating the effectiveness of the approach.

Related Topics
Physical Sciences and Engineering Computer Science Computational Theory and Mathematics
Authors
,