skip to main content
10.1007/978-3-540-27861-0_6guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

Inferring cost equations for recursive, polymorphic and higher-order functional programs

Published: 08 September 2003 Publication History

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.

References

[1]
T. Amtoft, F. Nielson, and H.R. Nielson. Type and Effect Systems: Behaviours for Concurrency. Imperial College Press, 1999.
[2]
R. Benzinger. Automated Complexity Analysis of Nuprl Extracted Programs. Journal of Functional Programming, 11(1):3-31, 2001.
[3]
W.-N. Chin and S.-C. Khoo. Calculating Sized Types. Higher-Order and Symbolic Computing, 14(2, 3), 2001.
[4]
L. Damas and A.J.R.G. Milner. Principal Type-Schemes for Functional Programs. In Proc. 1982 ACM Symp. on Principles of Prog. Langs. - POPL '82, pages 207- 212, 1982.
[5]
V. Dornic, P. Jouvelot, and D.K. Gifford. Polymorphic Time Systems for Estimating Program Complexity. ACM Letters on Prog. Lang. and Systems, 1(1):33-45, March 1992.
[6]
R.J.M. Hughes, L. Pareto, and A. Sabry. Proving the Correctness of Reactive Systems using Sized Types. In Proc 1996 ACM Symposium on Principles of Programming Languages - POPL '96, St Petersburg, FL, January 1996.
[7]
D. Le Métayer. ACE: An Automatic Complexity Evaluator. ACM Transactions on Programming Languages and Systems, 10(2), April 1988.
[8]
H. Levy and F. Lessman. Finite Difference Equations. Macmillan, 1961.
[9]
H-W. Loidl and K. Hammond. A Sized Time System for a Parallel Functional Language. In Glasgow Workshop on Functional Programming, Ullapool, July 1996.
[10]
A.J.R.G. Milner. A Theory of Type Polymorphism in Programming. J. Computer System Sciences, 17(3):348-375, 1976.
[11]
F. Nielson, H. Nielson, and C. Hankin. Principles of Program Analysis. Springer-Verlag, 1999.
[12]
Á. Rebón Portillo, K. Hammond, H.-W. Loidl, and P.B. Vasconcelos. Cost Analysis using Automatic Size and Time Inference. In Proc. IFL 2002 - Implementation of Functional Languages, Madrid, Spain, LNCS 2670. Springer-Verlag, 2003.
[13]
B. Reistad and D.K. Gifford. Static Dependent Costs for Estimating Execution Time. In Proc. 1994 ACM Conference on Lisp and Functional Programming - LFP '94, pages 65-78, Orlando, FL, June 1994.
[14]
M. Rosendahl. Automatic Complexity Analysis. In Proc. 1989 Intl. Conf. on Functional Prog. Langs. and Comp. Arch. - FPCA '89, pages 144-156, 1989.
[15]
D.A. Turner. Elementary Strong Functional Programming. In Proc. Symp. on Funct. Prog. Langs. in Education -- FPLE '95, LNCS. Springer-Verlag, Dec. 1995.
[16]
P.B. Vasconcelos and K. Hammond. A Type and Effect System for Costing Recursive, Higher-Order and Polymorphic Functional Programs. In preparation, 2004.
[17]
B. Wegbreit. Mechanical Program Analysis. Comm. of the ACM, 18(9), 1975.

Cited By

View all
  1. Inferring cost equations for recursive, polymorphic and higher-order functional programs

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image Guide Proceedings
    IFL'03: Proceedings of the 15th international conference on Implementation of Functional Languages
    September 2003
    184 pages
    ISBN:3540237275
    • Editors:
    • Phil Trinder,
    • Greg J. Michaelson,
    • Ricardo Peña

    Sponsors

    • BCS-FACS

    Publisher

    Springer-Verlag

    Berlin, Heidelberg

    Publication History

    Published: 08 September 2003

    Qualifiers

    • Article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)0
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 24 Dec 2024

    Other Metrics

    Citations

    Cited By

    View all

    View Options

    View options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media