Accurate Step Counting

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.

[1]  Carl A. Gunter Semantics of programming languages: structures and techniques , 1993, Choice Reviews Online.

[2]  Philip Wadler Monads for Functional Programming , 1995, Advanced Functional Programming.

[3]  John C. Reynolds,et al.  Definitional Interpreters for Higher-Order Programming Languages , 1972, ACM '72.

[4]  Gordon D. Plotkin,et al.  A structural approach to operational semantics , 2004, J. Log. Algebraic Methods Program..

[5]  Jozef Gruska Foundations of Computing , 1997 .

[6]  Mads Sig Ager,et al.  From Natural Semantics to Abstract Machines , 2004, LOPSTR.

[7]  Olivier Danvy A Rational Deconstruction of Landin's SECD Machine , 2003 .

[8]  Clifford A. Shaffer,et al.  A practical introduction to data structures and algorithm analysis prentice hall , 1996 .

[9]  David A. Schmidt Denotational Semantics: A Methodology for Language Development by Phil , 1987 .

[10]  Graham Hutton,et al.  A tutorial on the universality and expressiveness of fold , 1999, Journal of Functional Programming.

[11]  Peyton Jones,et al.  Haskell 98 language and libraries : the revised report , 2003 .

[12]  J. Meigs,et al.  WHO Technical Report , 1954, The Yale Journal of Biology and Medicine.

[13]  Koen Claessen,et al.  QuickCheck: a lightweight tool for random testing of Haskell programs , 2000, ICFP.

[14]  Simon L. Peyton Jones,et al.  Formally based profiling for higher-order functional languages , 1997, TOPL.

[15]  Mads Sig Ager From Natural Semantics to Abstract Machines , 2004 .

[16]  Graham Hutton,et al.  Calculating an exceptional machine , 2004, Trends in Functional Programming.

[17]  Olivier Danvy,et al.  A functional correspondence between call-by-need evaluators and lazy abstract machines , 2003, Inf. Process. Lett..

[18]  Olivier Danvy,et al.  On Evaluation Contexts, Continuations, and the Rest of the Computation , 2004 .

[19]  Olivier Danvy,et al.  A functional correspondence between evaluators and abstract machines , 2003, PPDP '03.