Nothing Special   »   [go: up one dir, main page]

Skip to main content

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 4015))

Included in the following conference series:

Abstract

Starting with an evaluator for a language, an abstract machine for the same language can be mechanically derived using successive program transformations. This has relevance to studying both the time and space properties of programs because these can be estimated by counting transitions of the abstract machine and measuring the size of the additional data structures needed, such as environments and stacks. In this paper we will use this process to derive a function that accurately counts the number of steps required to evaluate expressions in a simple language, and illustrate this function with a range of examples.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. Ager, M.S.: From natural semantics to abstract machines. In: Etalle, S. (ed.) LOPSTR 2004. LNCS, vol. 3573, pp. 245–261. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  2. Ager, M.S., Biernacki, D., Danvy, O., Midtgaard, J.: A functional correspondence between evaluators and abstract machines. Technical Report RS-03-13, March 2003, pp. 28 Appears in, pp. 8–19 (2003)

    Google Scholar 

  3. Ager, M.S., Danvy, O., Midtgaard, J.: A functional correspondence between call-by-need evaluators and lazy abstract machines. Information Processing Letters 90(5), 223–232 (2004); Extended version available as the technical report BRICS-RS-04-3

    Article  MATH  MathSciNet  Google Scholar 

  4. Claessen, K., Hughes, J.: Quickcheck: a lightweight tool for random testing of haskell programs. In: ICFP, pp. 268–279 (2000)

    Google Scholar 

  5. Danvy, O.: A rational deconstruction of Landin’s SECD machine. Technical Report RS-03-33 (October 2003)

    Google Scholar 

  6. Danvy, O.: On evaluation contexts, continuations, and the rest of the computation. Number CSR-04-1, pp. 13–23, Birmingham B15 2TT, United Kingdom, Invited talk (2004)

    Google Scholar 

  7. Hutton, G.: A Tutorial on the Universality and Expressiveness of Fold. Journal of Functional Programming 9(4), 355–372 (1999)

    Article  MATH  MathSciNet  Google Scholar 

  8. Hutton, G., Wright, J.: Calculating an Exceptional Machine. In: The Proceedings of the Fifth Symposium on Trends in Functional Programming (to appear, 2005)

    Google Scholar 

  9. Peyton Jones, S.: Haskell 98 language and libraries: The revised report. Technical report

    Google Scholar 

  10. Plotkin, G.D.: A Structural Approach to Operational Semantics. Technical Report DAIMI FN-19, University of Aarhus (1981)

    Google Scholar 

  11. Reynolds, J.C.: Definitional interpreters for higher-order programming languages. Higher Order Symbol. Comput. 11(4), 363–397 (1998)

    Article  MATH  Google Scholar 

  12. Sansom, P.M., Peyton Jones, S.L.: Formally based profiling for higher-order functional languages. ACM Trans. Program. Lang. Syst. 19(2), 334–385 (1997)

    Article  Google Scholar 

  13. Schmidt, D.A.: Denotational semantics: a methodology for language development. William C. Brown Publishers, Dubuque (1986)

    Google Scholar 

  14. Shaffer, C.A.: A Practical Introduction to Data Structures and Algorithm Analysis. Prentice Hall PTR, Upper Saddle River (2000)

    Google Scholar 

  15. Wadler, P.: Monads for functional programming. In: Broy, M. (ed.) Program Design Calculi: Proceedings of the 1992 Marktoberdorf International Summer School. Springer, Heidelberg (1993)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Hope, C., Hutton, G. (2006). Accurate Step Counting. In: Butterfield, A., Grelck, C., Huch, F. (eds) Implementation and Application of Functional Languages. IFL 2005. Lecture Notes in Computer Science, vol 4015. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11964681_6

Download citation

  • DOI: https://doi.org/10.1007/11964681_6

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-69174-7

  • Online ISBN: 978-3-540-69175-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics