Subtyping recursive types modulo associative commutative products

  • Authors:
  • Roberto Di Cosmo;François Pottier;Didier Rémy

  • Affiliations:
  • Université Paris 7;INRIA Rocquencourt;INRIA Rocquencourt

  • Venue:
  • TLCA'05 Proceedings of the 7th international conference on Typed Lambda Calculi and Applications
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

This work sets the formal bases for building tools that help retrieve classes in object-oriented libraries. In such systems, the user provides a query, formulated as a set of class interfaces. The tool returns classes in the library that can be used to implement the user's request and automatically builds the required glue code. We propose subtyping of recursive types in the presence of associative and commutative products—that is, subtyping modulo a restricted form of type isomorphisms—as a model of the relation that exists between the user's query and the tool's answers. We show that this relation is a composition of the standard subtyping relation with equality up to associativity and commutativity of products and we present an efficient decision algorithm for it. We also provide an automatic way of constructing coercions between related types.