Multiple trace composition and its uses

  • Authors:
  • Adam Sah

  • Affiliations:
  • Computer Science Division, Electrical Engineering and Computer Sciences, University of California, Berkeley, CA

  • Venue:
  • TCLTK '98 Proceedings of the 3rd Annual USENIX Workshop on Tcl/Tk - Volume 3
  • Year:
  • 1995

Quantified Score

Hi-index 0.00

Visualization

Abstract

Traces are code attachments to variables that cause designated blocks of code to be executed on reads or writes to the given variable. Traces have numerous uses, including rules ("on 〈condition〉 do 〈action〉" statements), autoloading and initialization based on data access, transparent remote data access, paging and swapping, and persistence. Traces are usually limited to ad-hoc, hard-coded composition, making it difficult to placemultiple traces on the same variable. Multiple traces are useful for putting a rule on a persistent variable, or several rules on a variable. This paper presents a design for a low-level mechanism for reasoning about and configuring multiple traces on a single variable. Although the work is based on a prototype using a modified version of Tcl's trace command, this mechanism easily applies to any language or library capable of implementing traps. This includes systems such as data breakpoints[WLG93] in C and overloadable get() and set() methods in prototype-based object-oriented systems. The specifics of the prototype are presented, including a facility for writing persistent Tcl scripts. The prototype requires Tcl7.x with Tk3.x or later and may be downloaded from ftp://ginsberg.cs.berkeley.edu/pub/ asah/dmt/tcl-proto.tar.gz