|
Abstract : |
We investigate the soundness of a specialisation technique due to Scherlis, expression procedures, in the context of a higher-order non-strict functional language. An expression procedure is a generalised procedure construct providing a contextually specialised definition. The addition of expression procedures thereby facilitates the manipulation and specialisation of programs. In the expression procedure approach, programs thus generalised are transformed by means of three key transformation rules: composition, application and abstraction. Arguably, the most notable, yet most overlooked feature of the expression procedure approach to transformation, is that the transformation rules always preserve the meaning of programs. This is in contrast to the unfold-fold transformation rules of Burstall and Darlington. In Scherlis ' thesis, this distinguishing property was shown to hold for a strict first-order language. Rules for call-by-name evaluation order were stated but not proved correct. In this paper we show that the expression procedure approach is correct for call-by-name evaluation, including lazy data structures and higher order functions. 1, |