Method shells: controlling a scope of destructive class extensions by context switches

  • Authors:
  • Wakana Takeshita

  • Affiliations:
  • The University of Tokyo, Tokyo, Japan

  • Venue:
  • Proceedings of the 12th annual international conference companion on Aspect-oriented software development
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

We propose Method Shells, which is a module system for switching a set of destructive class extensions at runtime. Destructive class extensions are getting popular and supported by a number of languages. By using destructive class extensions, you can add new methods to existing classes and redefine existing methods without rewriting the original source code by only writing differences in a separate file. For this reason, destructive class extensons are suitable for reusing an entire program, such as libraries. However, difference destructive class extensions redefining the same method in the same class may conflict. Our module system can switch sets of destructive class extensions activated and deactivated at runtime. Futhermore, we defined the formal semantics of our module system and proposed a way to impliment methodshells without runtime overheads.