Inferring Cost Equations for Recursive, Polymorphic and Higher-Order Functional Programs

* Final gross prices may vary according to local VAT.

Get Access

Abstract

This paper presents a type-based analysis for inferring size- and cost-equations for recursive, higher-order and polymorphic functional programs without requiring user annotations or unusual syntax. Our type reconstruction algorithm is capable of inferring first-order cost equations for a non-trivial subset of higher-order, recursive and polymorphic functions. We illustrate the approach with reference to some standard examples of recursive programs.