Bytecode Rewriting in Tom

  • Authors:
  • Emilie Balland;Pierre-Etienne Moreau;Antoine Reilles

  • Affiliations:
  • UHP & LORIA, INRIA & LORIA and INPL & LORIA and LORIA, Campus Scientifique, BP 239, 54506 Vandœ& LORIA and INPL & LORIA and LORIA, Campus Scientifique, BP 239, 54506 Vandœ& LORIA and LOR ...;UHP & LORIA, INRIA & LORIA and INPL & LORIA and LORIA, Campus Scientifique, BP 239, 54506 Vandœ& LORIA and INPL & LORIA and LORIA, Campus Scientifique, BP 239, 54506 Vandœ& LORIA and LOR ...;UHP & LORIA, INRIA & LORIA and INPL & LORIA and LORIA, Campus Scientifique, BP 239, 54506 Vandœ& LORIA and INPL & LORIA and LORIA, Campus Scientifique, BP 239, 54506 Vandœ& LORIA and LOR ...

  • Venue:
  • Electronic Notes in Theoretical Computer Science (ENTCS)
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

In this paper, we present a term rewriting based library for manipulating Java bytecode. We define a mapping from bytecode programs to algebraic terms, and we use Tom, an extension of Java that adds pattern-matching facilities, to describe transformations. An originality of Tom is that it provides a powerful strategy language to express traversals over trees and to control how transformation rules are applied. To be even more expressive, we use CTL formulae as conditions and we show how their satisfiability can be ensured using the strategy formalism. Through small examples, we show how bytecode analysis and transformations can be defined in an elegant way. In particular, we outline the implementation of a ClassLoader parameterized by a security policy that restricts file access.