On-demand refinement of dependent types

  • Authors:
  • Hiroshi Unno;Naoki Kobayashi

  • Affiliations:
  • University of Tokyo;Tohoku University

  • Venue:
  • FLOPS'08 Proceedings of the 9th international conference on Functional and logic programming
  • Year:
  • 2008

Quantified Score

Hi-index 0.01

Visualization

Abstract

Dependent types are useful for statically checking detailed specifications of programs and detecting pattern match or array bounds errors. We propose a novel approach to applications of dependent types to practical programming languages: Instead of requiring programmers' declaration of dependent function types (as in Dependent ML) or trying to infer them from function definitions only (as in size inference), we mine the output specification of a dependent function from the function's call sites, and then propagate that specification backward to infer the input specification. We have implemented a prototype type inference system which supports higher-order functions, parametric polymorphism, and algebraic data types based on our approach, and obtained promising experimental results.