Dynamic data polyvariance using source-tagged classes

  • Authors:
  • S. Alexander Spoon;Olin Shivers

  • Affiliations:
  • -;-

  • Venue:
  • DLS '05 Proceedings of the 2005 symposium on Dynamic languages
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

The DDP (Demand-driven/Pruning) analysis algorithm allows us to perform data-flow analyses of programming languages that are dynamically typed and have higher-order control flow, such as Smalltalk or Scheme. Because it is demand-driven and employs search pruning, it scales to large code bases. However, versions of the algorithm previously described [19] do not handle data polymorphism well, conservatively merging separate data flows that go through distinct instantiations of a collection type. In this paper, we describe a new extension to DDP that helps to disentangle these flows, permitting more precise results. The extension is based on source-tagging classes so that each reference to a class in the source code yields a subdivision of the type associated with that class. An initial implementation of this polyvariant analysis has been added to the DDP-based tool Chuck, a part of the integrated Squeak program-development environment; we show examples of the tool in action.