Abstract
A new denotational semantics is introduced for realistic non-strict functional languages, which have a polymorphic type system and support higher order functions and user definable algebraic data types. It maps each function definition to a demand propagator, which is a higher order function, that propagates context demands to function arguments. The relation of this “higher order demand propagation semantics” to the standard semantics is explained and it is used to define a backward strictness analysis. The strictness information deduced by this analysis is very accurate, because demands can actually be constructed during the analysis. These demands conform better to the analysed functions than abstract values, which are constructed alone with respect to types like in other existing strictness analyses. The richness of the semantic domains of higher order demand propagation makes it possible to express generalised strictness information for higher order functions even across module boundaries.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
G. Baraki. Abstract Interpretation of Polymorphic Higher-Order Functions. Ph.D. Thesis, University of Glasgow, 1993.
G. Burn. Lazy Functional Languages: Abstract Interpretation and Compilation. Pitman, 1991.
M.K. Davis. Projection-Based Program Analysis. Ph.D. Thesis, University of Glasgow, 1994.
P. Dybjer. Inverse Image Analysis. In Th. Ottman, editor, Automata, Languages and Programming. LNCS 267, pages 21–30, Springer-Verlag, 1987.
E. Fehr. Semantik von Programmiersprachen. Springer-Verlag, Heidelberg, 1989.
C.V. Hall and D.S. Wise. Compiling Strictness into Streams. In Proceedings-14th Annual ACM Symposium on Principles of Programming Languages, pages 132–142, Munich, 1987.
M. Horn. Improving Parallel Implementations of Lazy Functional Languages Using Evaluation Transformers. Technical Report B 95-15, Dept. of Comp. Science, FU Berlin, 1995.
J. Hughes and A. Ferguson. A Loop-Detecting Interpreter for Lazy, Higher-Order Programs. In J. Launchbury and P.M. Sansom, editors, Functional Programming, Workshops in Computing, Springer-Verlag, 1992.
S. Kamin. Head Strictness Is Not a Monotonic Abstract Property. In Information Processing Letters, North Holland, 1992.
A. Mycroft. Abstract Interpretation and Optimising Transformations for Applicative Programs. Ph.D. Thesis, University of Edinburgh, 1981.
E. Nöcker. Strictness Analysis Using Abstract Reduction. Technical Report, University of Nijmegen, 1993.
D. Pape. Higher Order Demand Propagation. Technical Report B 98-15, Dept. of Comp. Science, FU Berlin, 1998.
D. Pape. The Safety of Higher Order Demand Propagation. Technical Report B 98-16, Dept. of Comp. Science, FU Berlin, 1998. Available at http://www.inf.fu-berlin.de/~pape/papers/
J. Peterson, K. Hammond, editors, and many authors. Report of the Programming Language Haskell-A Non-Strict, Purely Functional Language-Version 1.4. Available at http://www.haskell.org/onlinereport/
S.L. Peyton Jones. The Implementation of Functional Programming Languages. Prentice-Hall, 1987.
P. W. Trinder, K. Hammond, et. al. Algorithm + Strategy = Parallelism. In Journal of Functional Programming, 8(1), 1998.
G. Tremblay. Parallel Implementation of Lazy Functional Languages Using Abstract Demand Propagation. Ph.D. Thesis, McGill University Montréal, 1994.
P. Wadler. Strictness Analysis on Non-Flat Domains by Abstract Interpretation. In S. Abramsky and C. Hankin, editors, Abstract Interpretation of Declarative Languages, Ellis-Horwood, 1987.
P. Wadler and R.J.M. Hughes. Projections for Strictness Analysis. In Proceedings of the 1987 Conference on Functional Programming Languages and Computer Architecture, Portland, Oregon, LNCS 274, Springer-Verlag, 1987.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1999 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Pape, D. (1999). Higher Order Demand Propagation. In: Hammond, K., Davie, T., Clack, C. (eds) Implementation of Functional Languages. IFL 1998. Lecture Notes in Computer Science, vol 1595. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-48515-5_10
Download citation
DOI: https://doi.org/10.1007/3-540-48515-5_10
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-66229-7
Online ISBN: 978-3-540-48515-5
eBook Packages: Springer Book Archive