Classboxes: Controlling Visibility of Class Extensions

Bergel, Alexandre; Ducasse, Stéphane; Nierstrasz, Oscar; Wuyts, Roel (2004). Classboxes: Controlling Visibility of Class Extensions Universität Bern, Switzerland: Universität Bern

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

Download (358kB)

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 consequent negative effects. To solve these problems we present classboxes, a module system for object-oriented languages that provides for 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. To validate the model we have implemented it in the Squeak Smalltalk environment, and performed benchmarks.

Item Type:

Report (Report)

Division/Institute:

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

UniBE Contributor:

Ducasse, Stephane, Nierstrasz, Oscar

Subjects:

000 Computer science, knowledge & systems
500 Science > 510 Mathematics

Publisher:

Universität Bern

Language:

English

Submitter:

Anja Ebeling

Date Deposited:

08 Nov 2017 08:37

Last Modified:

11 Apr 2024 16:11

BORIS DOI:

10.7892/boris.104383

URI:

https://boris.unibe.ch/id/eprint/104383

Actions (login required)

Edit item Edit item
Provide Feedback