Semantics-directed implementation of method-call interception
Ralf Lämmel, Ch. Stenzel · IEE Proceedings - Software · 2004
The authors describe a form of method-call interception (MCI) that allows the programmer to superimpose extra functionality onto method calls at run-time. They provide a reference semantics and a reference implementation for corresponding language constructs. The setup applies to class-based, statically typed, compiled languages such as Java. The semantics of MCI is used to direct a language implementation with a number of valuable properties: simplicity of the implementational model, run-time adaptation capabilities, static type safety, separate compilation and reasonable performance. The authors' implementational development employs source-code instrumentation. They start from a naive implementational model, which is subsequently refined to optimise program execution. The implementation is assessed via benchmarks.