skip to main content
research-article
Open Access

Parametric polymorphism and operational improvement

Published:30 July 2018Publication History
Skip Abstract Section

Abstract

Parametricity, in both operational and denotational forms, has long been a useful tool for reasoning about program correctness. However, there is as yet no comparable technique for reasoning about program improvement, that is, when one program uses fewer resources than another. Existing theories of parametricity cannot be used to address this problem as they are agnostic with regard to resource usage. This article addresses this problem by presenting a new operational theory of parametricity that is sensitive to time costs, which can be used to reason about time improvement properties. We demonstrate the applicability of our theory by showing how it can be used to prove that a number of well-known program fusion techniques are time improvements, including fixed point fusion, map fusion and short cut fusion.

Skip Supplemental Material Section

Supplemental Material

a68-hackett.webm

References

  1. Sascha Böhme. 2007. Free Theorems for Sublanguages of Haskell. Master’s thesis. Technische Universität Dresden.Google ScholarGoogle Scholar
  2. Joachim Breitner. 2015. Formally Proving a Compiler Transformation Safe. In Haskell Symposium. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Aloïs Brunel. 2015. Quantitative Classical Realizability. Information and Computation 241 (2015). Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Aloïs Brunel and Marco Gaboardi. 2015. Realizability Models for a Linear Dependent PCF. Theoretical Computer Science 585 (2015). Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Andrew J. Gill, John Launchbury, and Simon L. Peyton Jones. 1993. A Short Cut to Deforestation. In Functional Programming Languages and Computer Architecture. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Jörgen Gustavsson and David Sands. 1999. A Foundation for Space-Safe Transformations of Call-by-Need Programs. Electronic Notes on Theoretical Computer Science 26 (1999).Google ScholarGoogle Scholar
  7. Jörgen Gustavsson and David Sands. 2001. Possibilities and Limitations of Call-by-Need Space Improvement. In International Conference on Functional Programming. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Jennifer Hackett and Graham Hutton. 2014. Worker/Wrapper/Makes It/Faster. In International Conference on Functional Programming. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Jennifer Hackett and Graham Hutton. 2015. Programs for Cheap!. In Logic in Computer Science. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Jennifer Hackett and Graham Hutton. 2018. A Generic Foundation for Program Improvement. (2018). In preparation.Google ScholarGoogle Scholar
  11. Martin Handley and Graham Hutton. 2018. Improving Haskell. In Trends in Functional Programming.Google ScholarGoogle Scholar
  12. Graham Hutton and Jennifer Hackett. 2016. Mind the Gap: Unified Reasoning About Program Correctness and Efficiency. (2016). Engineering and Physical Sciences Research Council grant EP/P00587X/1.Google ScholarGoogle Scholar
  13. Patricia Johann and Janis Voigtländer. 2004. Free Theorems in the Presence of seq. In Principles of Programming Languages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. John Launchbury. 1993. A Natural Semantics for Lazy Evaluation. In Principles of Programming Languages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Erik Meijer, Maarten M. Fokkinga, and Ross Paterson. 1991. Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire. In Functional Programming Languages and Computer Architecture ’91 (Lecture Notes in Computer Science), Vol. 523. Springer. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Andrew Moran and David Sands. 1999a. Improvement in a Lazy Context: An Operational Theory for Call-by-Need. (1999). Extended version of { Moran and Sands 1999b }, available at http://tinyurl.com/ohuv8ox .Google ScholarGoogle Scholar
  17. Andrew Moran and David Sands. 1999b. Improvement in a Lazy Context: An Operational Theory for Call-by-Need. In Principles of Programming Languages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Andrew M. Pitts. 2000. Parametric Polymorphism and Operational Equivalence. Mathematical Structures in Computer Science 10, 03 (2000). Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Gordon D. Plotkin. 1977. LCF Considered as a Programming Language. Theoretical Computer Science 5, 3 (1977).Google ScholarGoogle Scholar
  20. John C. Reynolds. 1983. Types, Abstraction and Parametric Polymorphism. Proceedings of the IFIP 9th World Computer Congress (1983).Google ScholarGoogle Scholar
  21. David Sands. 1997. From SOS Rules to Proof Principles: An Operational Metatheory for Functional Languages. In Principles of Programming Languages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Manfred Schmidt-Schauß and David Sabel. 2015. Improvements in a Functional Core Language with Call-By-Need Operational Semantics. In Principles and Practice of Declarative Programming. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Daniel Seidel and Janis Voigtländer. 2011. Improvements for Free. In Quantitative Aspects of Programming Languages.Google ScholarGoogle Scholar
  24. Ilya Sergey, Dimitrios Vytiniotis, Simon L Peyton Jones, and Joachim Breitner. 2017. Modular, Higher Order Cardinality Analysis in Theory and Practice. Journal of Functional Programming 27 (2017).Google ScholarGoogle Scholar
  25. Peter Sestoft. 1997. Deriving a Lazy Abstract Machine. Journal of Functional Programming 7, 3 (1997). Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Jon Shultis. 1985. On the Complexity of Higher-Order Programs. Technical Report. University of Colorado.Google ScholarGoogle Scholar
  27. Hugo Simões, Pedro Vasconcelos, Mário Florido, Steffen Jost, and Kevin Hammond. 2012. Automatic Amortised Analysis of Dynamic Memory Allocation for Lazy Functional Programs. In International Conference on Functional Programming. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Christopher Strachey. 2000. Fundamental Concepts in Programming Languages. Higher-Order and Symbolic Computation 13, 1-2 (2000). Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Janis Voigtländer and Patricia Johann. 2007. Selective Strictness and Parametricity in Structural Operational Semantics, Inequationally. Theoretical Computer Science 388, 1-3 (2007). Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Philip Wadler. 1989. Theorems for Free!. In Functional Programming Languages and Computer Architecture. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Parametric polymorphism and operational improvement

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        • Published in

          cover image Proceedings of the ACM on Programming Languages
          Proceedings of the ACM on Programming Languages  Volume 2, Issue ICFP
          September 2018
          1133 pages
          EISSN:2475-1421
          DOI:10.1145/3243631
          Issue’s Table of Contents

          Copyright © 2018 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 30 July 2018
          Published in pacmpl Volume 2, Issue ICFP

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!