Towards partially evaluating reflection in Java

  • Authors:
  • Mathias Braux;Jacques Noyé

  • Affiliations:
  • Écoledes Mines de Nantes, 4, rue Alfred Kastler, 44307 Nantes, Cedex 03, France;Écoledes Mines de Nantes, 4, rue Alfred Kastler, 44307 Nantes, Cedex 03, France

  • Venue:
  • PEPM '00 Proceedings of the 2000 ACM SIGPLAN workshop on Partial evaluation and semantics-based program manipulation
  • Year:
  • 1999

Quantified Score

Hi-index 0.00

Visualization

Abstract

Reflection plays a major role in the programming of generic applications. However, it introduces an interpretation layer which is detrimental to performance. A solution consists of relying on partial evaluation to remove this interpretation layer. This paper deals with improving a standard partial evaluator in order to handle the Java reflection API. The improvements basically consist of taking type information into account when distinguishing between static and dynamic data, as well as introducing two new specialization actions: reflection actions. Benchmarks using the serialization framework show the benefits of the approach.