Using intersection types for cost-analysis of higher-order polymorphic functional programs

  • Authors:
  • Hugo R. Simões;Kevin Hammond;Mário Florido;Pedro Vasconcelos

  • Affiliations:
  • School of Computer Science, University of St Andrews, St Andrews, UK and University of Porto, DCC & LIACC, Porto, Portugal;School of Computer Science, University of St Andrews, St Andrews, UK;University of Porto, DCC & LIACC, Porto, Portugal;University of Porto, DCC & LIACC, Porto, Portugal

  • Venue:
  • TYPES'06 Proceedings of the 2006 international conference on Types for proofs and programs
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper presents a system of cost derivation for higherorder and polymorphic functional programs based on a notion of sized types and exploiting a type-and-effect system approach. The paper gives an operational semantics of cost for a simple strict functional language in terms of λ-calculus β-reduction steps and introduces type rules describing cost effects. The type system is based on intersection types. The use of discrete polymorphism (intersection types) instead of the usual parametric polymorphism approach improves the analysis and solves, in many cases, the "size aliasing problem" that has been identified as a limitation on previous type-and-effect approaches. Finally we provide a proof of the soundness of our effect system with respect to the cost semantics.