Implementing scoped method tracing with ContextJS

  • Authors:
  • Jens Lincke;Robert Krahn;Robert Hirschfeld

  • Affiliations:
  • Universität Potsdam, Germany;Universität Potsdam, Germany;Universität Potsdam, Germany

  • Venue:
  • Proceedings of the 3rd International Workshop on Context-Oriented Programming
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Customized method tracers can be a valuable tool for debugging and program comprehension. They allow to declaratively specify what parts of the call graph should be captured and are an alternative to tedious manual debugging techniques. Method tracers are easy to implement in dynamic languages but avoiding multiple method instrumentation and recursion in the client code can become complex. In this paper we show how Context-oriented Programming (COP) can be leveraged to address such issues. Our approach is based on ContextJS, a COP implementation for JavaScript, which provides scoping mechanisms and an infrastructure for method instrumentation. These abstractions allow to separate target and tracer logic so that self-referentiality is avoided.