Formally based profiling for higher-order functional languages

PM Sansom, SL Peyton Jones - ACM Transactions on Programming …, 1997 - dl.acm.org
PM Sansom, SL Peyton Jones
ACM Transactions on Programming Languages and Systems (TOPLAS), 1997dl.acm.org
We present the first source-level profiler for a compiled, nonstrict, higher-order, purely
functional language capable of measuring time as well as space usage. Our profiler is
implemented in a production-quality optimizing compiler for Haskell and can successfully
profile large applications. A unique feature of our approach is that we give a formal
specification of the attribution of execution costs to cost centers. This specification enables
us to discuss our design decisions in a precise framework, prove properties about the …
We present the first source-level profiler for a compiled, nonstrict, higher-order, purely functional language capable of measuring time as well as space usage. Our profiler is implemented in a production-quality optimizing compiler for Haskell and can successfully profile large applications. A unique feature of our approach is that we give a formal specification of the attribution of execution costs to cost centers. This specification enables us to discuss our design decisions in a precise framework, prove properties about the attribution of costs, and examine to effects of different program transformations on the attribution of costs. Since it is not obvious how to map this specification onto a particular implementation, we also present an implementation-oriented operational semantics, and prove it equivalent to the specification.
ACM Digital Library