Skip to main content

2019 | OriginalPaper | Buchkapitel

Improving Haskell

verfasst von : Martin A. T. Handley, Graham Hutton

Erschienen in: Trends in Functional Programming

Verlag: Springer International Publishing

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

Lazy evaluation is a key feature of Haskell, but can make it difficult to reason about the efficiency of programs. Improvement theory addresses this problem by providing a foundation for proofs of program improvement in a call-by-need setting, and has recently been the subject of renewed interest. However, proofs of improvement are intricate and require an inequational style of reasoning that is unfamiliar to most Haskell programmers. In this article, we present the design and implementation of an inequational reasoning assistant that provides mechanical support for improvement proofs, and demonstrate its utility by verifying a range of improvement results from the literature.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Literatur
1.
Zurück zum Zitat Moran, A.K., Sands, D.: Improvement in a Lazy Context: An Operational Theory for Call-By-Need. Extended version of [40] (1999) Moran, A.K., Sands, D.: Improvement in a Lazy Context: An Operational Theory for Call-By-Need. Extended version of [40] (1999)
2.
Zurück zum Zitat Hackett, J., Hutton, G.: Worker/wrapper/makes it/faster. In: ICFP (2014) Hackett, J., Hutton, G.: Worker/wrapper/makes it/faster. In: ICFP (2014)
3.
Zurück zum Zitat Schmidt-Schauß, M., Sabel, D.: Improvements in a functional core language with call-by-need operational semantics. In: PPDP (2015) Schmidt-Schauß, M., Sabel, D.: Improvements in a functional core language with call-by-need operational semantics. In: PPDP (2015)
4.
Zurück zum Zitat Hackett, J., Hutton, G.: Parametric polymorphism and operational improvement. University of Nottingham (2017, in preparation) Hackett, J., Hutton, G.: Parametric polymorphism and operational improvement. University of Nottingham (2017, in preparation)
5.
Zurück zum Zitat Harper, R.: The Structure and Efficiency of Computer Programs. Carnegie Mellon University (2014) Harper, R.: The Structure and Efficiency of Computer Programs. Carnegie Mellon University (2014)
6.
Zurück zum Zitat Farmer, A.: Hermit: Mechanized Reasoning During Compilation in the Glasgow Haskell Compiler. Ph.D. thesis, University of Kansas (2015) Farmer, A.: Hermit: Mechanized Reasoning During Compilation in the Glasgow Haskell Compiler. Ph.D. thesis, University of Kansas (2015)
8.
Zurück zum Zitat Farmer, A., Höner zu Siederdissen, C., Gill, A.: The Hermit in the stream. In: PEMP (2014) Farmer, A., Höner zu Siederdissen, C., Gill, A.: The Hermit in the stream. In: PEMP (2014)
9.
Zurück zum Zitat Farmer, A., Sculthorpe, N., Gill, A.: Reasoning with the Hermit: tool support for equational reasoning on GHC core programs. In: Haskell Symposium (2015) Farmer, A., Sculthorpe, N., Gill, A.: Reasoning with the Hermit: tool support for equational reasoning on GHC core programs. In: Haskell Symposium (2015)
10.
Zurück zum Zitat Adams, M.D., Farmer, A., Magalhães, J.P.: Optimizing SYB Is easy! In: PEPM (2014) Adams, M.D., Farmer, A., Magalhães, J.P.: Optimizing SYB Is easy! In: PEPM (2014)
11.
Zurück zum Zitat Adams, M.D., Farmer, A., Magalhães, J.P.: Optimizing SYB traversals is easy!. Sci. Comput. Program. 112, 170–193 (2015)CrossRef Adams, M.D., Farmer, A., Magalhães, J.P.: Optimizing SYB traversals is easy!. Sci. Comput. Program. 112, 170–193 (2015)CrossRef
12.
Zurück zum Zitat Farmer, A., Gill, A., Komp, E., Sculthorpe, N.: The Hermit in the machine: a plugin for the interactive transformation of GHC core language programs. In: Haskell Symposium (2012) Farmer, A., Gill, A., Komp, E., Sculthorpe, N.: The Hermit in the machine: a plugin for the interactive transformation of GHC core language programs. In: Haskell Symposium (2012)
14.
Zurück zum Zitat Wadler, P.: The Concatenate Vanishes. University of Glasgow (1987) Wadler, P.: The Concatenate Vanishes. University of Glasgow (1987)
16.
Zurück zum Zitat Ariola, Z.M., Maraist, J., Odersky, M., Felleisen, M., Wadler, P.: A call-by-need lambda calculus. In: POPL (1995) Ariola, Z.M., Maraist, J., Odersky, M., Felleisen, M., Wadler, P.: A call-by-need lambda calculus. In: POPL (1995)
17.
Zurück zum Zitat Sculthorpe, N., Frisby, N., Gill, A.: The Kansas university rewrite engine. JFP 24, 434–473 (2014) Sculthorpe, N., Frisby, N., Gill, A.: The Kansas university rewrite engine. JFP 24, 434–473 (2014)
18.
Zurück zum Zitat Lämmel, R., Visser, E., Visser, J.: The Essence of Strategic Programming (2002) Lämmel, R., Visser, E., Visser, J.: The Essence of Strategic Programming (2002)
20.
Zurück zum Zitat Gill, A., Hutton, G.: The worker/wrapper transformation. JFP 19(2), 227–251 (2009)MATH Gill, A., Hutton, G.: The worker/wrapper transformation. JFP 19(2), 227–251 (2009)MATH
21.
22.
Zurück zum Zitat Tullsen, M.A.: Path, A Program Transformation System for Haskell. Ph.D. thesis. Yale University (2002) Tullsen, M.A.: Path, A Program Transformation System for Haskell. Ph.D. thesis. Yale University (2002)
23.
Zurück zum Zitat Guttmann, W., Partsch, H., Schulte, W., Vullinghs, T.: Tool support for the interactive derivation of formally correct functional programs. J. Univers. Comput. Sci. 9, 173 (2003) Guttmann, W., Partsch, H., Schulte, W., Vullinghs, T.: Tool support for the interactive derivation of formally correct functional programs. J. Univers. Comput. Sci. 9, 173 (2003)
24.
Zurück zum Zitat Thompson, S., Li, H.: Refactoring tools for functional languages. JFP 23(3), 293–350 (2013)MathSciNetMATH Thompson, S., Li, H.: Refactoring tools for functional languages. JFP 23(3), 293–350 (2013)MathSciNetMATH
25.
Zurück zum Zitat Li, H., Reinke, C., Thompson, S.: Tool support for refactoring functional programs. In: Haskell Workshop (2003) Li, H., Reinke, C., Thompson, S.: Tool support for refactoring functional programs. In: Haskell Workshop (2003)
26.
Zurück zum Zitat Gill, A.: Introducing the Haskell equational reasoning assistant. In: Haskell Workshop (2006) Gill, A.: Introducing the Haskell equational reasoning assistant. In: Haskell Workshop (2006)
27.
Zurück zum Zitat Mu, S.C., Ko, H.S., Jansson, P.: Algebra of programming in Agda: dependent types for relational program derivation. JFP 19(5), 545–579 (2009)MathSciNetMATH Mu, S.C., Ko, H.S., Jansson, P.: Algebra of programming in Agda: dependent types for relational program derivation. JFP 19(5), 545–579 (2009)MathSciNetMATH
29.
Zurück zum Zitat Bornat, R., Sufrin, B.: Animating formal proof at the surface: the jape proof calculator. Comput. J. 42(3), 177–192 (1999)CrossRef Bornat, R., Sufrin, B.: Animating formal proof at the surface: the jape proof calculator. Comput. J. 42(3), 177–192 (1999)CrossRef
31.
Zurück zum Zitat Norell, U.: Towards a Practical Programming Language Based on Dependent Type Theory. Ph.D. thesis, Chalmers University of Technology (2007) Norell, U.: Towards a Practical Programming Language Based on Dependent Type Theory. Ph.D. thesis, Chalmers University of Technology (2007)
32.
Zurück zum Zitat Wadler, P.: Strictness analysis aids time analysis. In: POPL (1988) Wadler, P.: Strictness analysis aids time analysis. In: POPL (1988)
33.
Zurück zum Zitat Bjerner, B., Holmström, S.: A composition approach to time analysis of first order lazy functional programs. In: FPCA (1989) Bjerner, B., Holmström, S.: A composition approach to time analysis of first order lazy functional programs. In: FPCA (1989)
34.
Zurück zum Zitat Okasaki, C.: Purely Functional Data Structures. Cambridge University Press, Cambridge (1999)MATH Okasaki, C.: Purely Functional Data Structures. Cambridge University Press, Cambridge (1999)MATH
35.
Zurück zum Zitat Danielsson, N.A.: Lightweight semiformal time complexity analysis for purely functional data structures. In: POPL (2008)MathSciNetCrossRef Danielsson, N.A.: Lightweight semiformal time complexity analysis for purely functional data structures. In: POPL (2008)MathSciNetCrossRef
37.
Zurück zum Zitat Çiçek, E., Barthe, G., Gaboardi, M., Garg, D., Hoffmann, J.: Relational cost analysis. In: POPL (2017) Çiçek, E., Barthe, G., Gaboardi, M., Garg, D., Hoffmann, J.: Relational cost analysis. In: POPL (2017)
38.
Zurück zum Zitat Sansom, P.M., Peyton Jones, S.L.: Formally based profiling for higher-order functional languages. TOPLAS (1997) Sansom, P.M., Peyton Jones, S.L.: Formally based profiling for higher-order functional languages. TOPLAS (1997)
39.
Zurück zum Zitat Claessen, K., Hughes, J.: QuickCheck: a lightweight tool for random testing of Haskell Programs. In: ICFP (2011) Claessen, K., Hughes, J.: QuickCheck: a lightweight tool for random testing of Haskell Programs. In: ICFP (2011)
40.
Zurück zum Zitat Moran, A.K., Sands, D.: Improvement in a lazy context: an operational theory for call-by-need. In: POPL (1999) Moran, A.K., Sands, D.: Improvement in a lazy context: an operational theory for call-by-need. In: POPL (1999)
Metadaten
Titel
Improving Haskell
verfasst von
Martin A. T. Handley
Graham Hutton
Copyright-Jahr
2019
DOI
https://doi.org/10.1007/978-3-030-18506-0_6