Extending sized type with collection analysis

  • Authors:
  • Wei-Ngan Chin;Siau-Cheng Khoo;Dana N. Xu

  • Affiliations:
  • National University of Singapore;National University of Singapore;National University of Singapore

  • Venue:
  • Proceedings of the 2003 ACM SIGPLAN workshop on Partial evaluation and semantics-based program manipulation
  • Year:
  • 2003

Quantified Score

Hi-index 0.00

Visualization

Abstract

Many program optimizations and analyses, such as array-bounds checking, termination analysis, depend on knowing the size of a function's input and output. However, size information can be difficult to compute. Firstly, accurate size computation requires detecting a size relation between different inputs of a function. Secondly, size information may also be contained inside a collection (data structure with multiple elements). In this paper, we introduce some techniques to derive universal and existential size properties over collections of elements of recursive data structures. We shall show how a mixed constraint system could support the enhanced size type, and highlight examples where collection analysis are useful.