A heuristic approach for computing effects

  • Authors:
  • Phillip Heidegger;Peter Thiemann

  • Affiliations:
  • University of Freiburg, Germany;University of Freiburg, Germany

  • Venue:
  • TOOLS'11 Proceedings of the 49th international conference on Objects, models, components, patterns
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

The effect of an operation on an object network can be described by the access paths along which the function reads or writes object properties. Abstracted to access path permissions, the effect can serve as part of the operation's documentation, augmenting a type signature or a contract for the operation. Statically determining such an effect is a challenging problem, in particular in a dynamic language which represents objects by hash tables like the current breed of scripting languages. In this work, we propose an analysis that computes access permissions describing the effect of an operation from a set of access paths obtained by running the program. The main ingredient of the analysis is a novel heuristic to abstract a set of access paths to a concise access permission. Our analysis is implemented as part of JSConTest, a testing framework for JavaScript. It has been applied to a range of examples with encouraging results.