Safe reflection through polymorphism

  • Authors:
  • Toon Verwaest;Lukas Renggli

  • Affiliations:
  • University of Bern, Bern, Switzerland;University of Bern, Bern, Switzerland

  • Venue:
  • Proceedings of the first international workshop on Context-aware software technology and applications
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

Code executed in a fully reflective system switches back and forth between application and interpreter code. These two states can be seen as contexts in which an expression is evaluated. Current language implementations obtain reflective capabilities by exposing objects to the interpreter. However, in doing so these systems break the encapsulation of the application objects. In this paper we propose safe reflection through polymorphism, i.e. by unifying the interface and ensuring the encapsulation of objects from both the interpreter and application context. We demonstrate a homogeneous system that defines the execution semantics in terms of itself, thus enforcing that encapsulation is not broken.