A probabilistic approach to the problem of automatic selection of data representations

  • Authors:
  • Tyng-Ruey Chuang;Wen L. Hwang

  • Affiliations:
  • Institute of Information Science, Academia Sinica, Nankang, Taipei 11529, Taiwan;Institute of Information Science, Academia Sinica, Nankang, Taipei 11529, Taiwan

  • Venue:
  • Proceedings of the first ACM SIGPLAN international conference on Functional programming
  • Year:
  • 1996

Quantified Score

Hi-index 0.01

Visualization

Abstract

The designs and implementations of efficient aggregate data structures have been important issues in functional programming. It is not clear how to select a good representation for an aggregate when access patterns to the aggregate are highly variant, or even unpredictable. Previous approaches rely on compile--time analyses or programmer annotations. These methods can be unreliable because they try to predict a program's behavior before it is executed.We propose a probabilistic approach, which is based on Markov processes, for automatic selection of data representations. The selection is modeled as a random process moving in a graph with weighted edges. The proposed approach employs coin tossing at run--time to help choosing a suitable data representation. The transition probability function used by the coin tossing is constructed in a simple and common way from a measured cost function. We show that, under this setting, random selections of data representations can be quite effective. The probabilistic approach is used to implement bag aggregates, and the performance results are compared to those of deterministic selection strategies.