Use this URL to cite or link to this record in EThOS: https://ethos.bl.uk/OrderDetails.do?uin=uk.bl.ethos.796991
Title: Execution profiling for non-strict functional languages
Author: Sansom, Patrick M.
Awarding Body: University of Glasgow
Current Institution: University of Glasgow
Date of Award: 1994
Availability of Full Text:
Access from EThOS:
Access from Institution:
Abstract:
Profiling tools, which measure and display the dynamic space and time behaviour of programs, are essential for identifying execution bottlenecks. A variety of such tools exist for conventional languages, but almost none for non-strict functional languages. There is a good reason for this: lazy evaluation means that the program is executed in an order which is not immediately apparent from the source code, so it is difficult to relate dynamically-gathered statistics back to the original source. This thesis examines the difficulties of profiling lazy higher-order functional languages and develops a profiling tool which overcomes them. It relates information about both the time and space requirements of the program back to the original source expressions identified by the programmer. Considerable attention is paid to the cost semantics with two abstract cost semantics, lexical scoping and evaluation scoping, being investigated. Experience gained from the two profiling schemes led to the development of a hybrid cost semantics. All three schemes are described and compared in a single formal framework. These abstract cost semantics are mapped onto an operational semantics and an implementation based on the STG-machine is developed. The manipulation of cost centres is made precise by extending the state-transition operational semantics of the STG-machine. The profiling tool has been incorporated into the Glasgow Haskell compiler ghc. Our approach preserves the correct cost attribution of costs while allowing program optimisation to proceed largely unhindered. So far as we know ghc is the only lazy functional language compiler to support source-level time profiling. The use of the profiler has lead to significant performance improvements in the compiler itself and other large application programs.
Supervisor: Not available Sponsor: Not available
Qualification Name: Thesis (Ph.D.) Qualification Level: Doctoral
EThOS ID: uk.bl.ethos.796991  DOI: Not available
Share: