Dynamic state restoration using versioning exceptions

  • Authors:
  • V. Krishna Nandivada;Suresh Jagannathan

  • Affiliations:
  • Department of Computer Science, University of California, Los Angeles;Department of Computer Science, Purdue University, West Lafayette

  • Venue:
  • Higher-Order and Symbolic Computation
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

We explore the semantics and analysis of a new kind of control structure called a versioning exception that ensures the state of the program, at the point when an exception handler is invoked, reflects the program state at the point when the handler is installed. Versioning exceptions provide a transaction-like versioning semantics to the code protected by a handler: modifications performed within the dynamic context of the corresponding handler are versioned, and committed to the store only if the computation completes normally. Similar to the role of backtracking in logic programming, this facility allows unwanted effects of computations to be discarded when exceptional or undesirable conditions are detected.We define a novel points-to analysis to efficiently track changes to the store within handler-protected scopes. The role of the analysis is to facilitate optimizations that minimize the number of locations which must be restored when a versioning exception is raised. The analysis is defined by a reachability approximation over locations that indicates which objects have been potentially modified within a handler scope. The analysis is defined for programs which support first-class procedures, locations, and exceptions.