Classboxes: Controlling Visibility of Class Extensions

Bergel, Alexandre (2005). Classboxes: Controlling Visibility of Class Extensions. (Dissertation, University of Bern, Philosophisch-naturwissenschaftliche Fakultät)

[img] Text
bergel-phd.pdf - Published Version
Restricted to registered users only
Available under License Publisher holds Copyright.

Download (1MB) | Request a copy

Unanticipated changes to complex software systems can introduce anomalies such as duplicated code, suboptimal inheritance relationships and a proliferation of run-time downcasts. Refactoring to eliminate these anomalies may not be an option, at least in certain stages of software evolution. A class extension is a method that is defined in a module, but whose class is defined elsewhere. Class extensions offer a convenient way to incrementally modify existing classes when subclassing is inappropriate. Unfortunately existing approaches suffer from various limitations. Either class extensions have a global impact, with possibly negative effects for unexpected clients, or they have a purely local impact, with negative results for collaborating clients. Furthermore, conflicting class extensions are either disallowed, or resolved by linearization, with subsequent negative effects. To solve these problems we present classboxes, a module system for object-oriented languages that provides for behavior refinement (i.e. method addition and replacement). Moreover, the changes made by a classbox are only visible to that classbox (or classboxes that import it), a feature we call local rebinding. We present an experimental validation in which we apply the classbox model to both dynamically and statically typed programming languages. We used classboxes to refactor part of the Java Swing library, and we show two extensions built on top of classboxes which are (i) runtime adaptation with dynamically classboxes and (ii) expressing crosscutting changes.

Item Type:

Thesis (Dissertation)


08 Faculty of Science > Institute of Computer Science (INF) > Software Composition Group (SCG)




Manuela Bamert

Date Deposited:

29 Jan 2018 16:19

Last Modified:

26 Oct 2019 20:40




Actions (login required)

Edit item Edit item
Provide Feedback