Strictness analysis using abstract reduction

In this paper we present a new and general strictness analysis technique for lazy functional languages. In contrast to many other methods, this method is practically usable. This is shown with results of a real implementation. The key idea is the use of an abstract domain of which the elements rep resent various kinds of sets of concrete values. Reduction as well aa pattern matching in the abstract domain mimics reduction and pattern matching in the concrete domain in a very natural way. With th~ abstract domain various kinds of strictness analysis are possible. In particular, higher order functions and general data types (tuples and lists, but also user defined data types) fit perfectly well in this mechanism. In contrast to methods based on abstract interpretation, the abstract domain is infinite. Recursive functions are handled by a technique called reduction path analysis, Complicated and expensive fixed point derivation techniques are not needed. The implementation in the Concurrent Clean system shows that the analyser is very fast and that it finds much strictness information.

[1]  Marko C. J. D. van Eekelen,et al.  Functional Programming and Parallel Graph Rewriting , 1993 .

[2]  Marinus J. Plasmeijer,et al.  The Concurrent CLEAN System, functional programming on the Macintosh , 1991 .

[3]  Simon L. Peyton Jones,et al.  Strictness Analysis - A Practical Approach , 1985, FPCA.

[4]  Chris Hankin,et al.  Abstract reduction: towards a theory via abstract interpretation , 1993 .

[5]  Sebastian Hunt,et al.  Frontiers and open sets in abstract interpretation , 1989, FPCA.

[6]  Prateek Mishra,et al.  Reasoning about Simple and Exhaustive Demand in Highter-Order Lazy Languages , 1991, FPCA.

[7]  Chris Hankin,et al.  Finding fixed points in finite lattices , 1987, FPCA.

[8]  Philip Wadler,et al.  Projections for strictness analysis , 1987, FPCA.

[9]  M. J. Plasmeijer,et al.  Term graph rewriting: theory and practice , 1993 .

[10]  Marko C. J. D. van Eekelen,et al.  Term Graph Rewriting , 1987, PARLE.

[11]  Chris Hankin,et al.  The theory of strictness analysis for higher order functions , 1985, Programs as Data Objects.

[12]  Alan Mycroft,et al.  Abstract interpretation and optimising transformations for applicative programs , 1982 .

[13]  Rinus Plasmeijer,et al.  The Functional Strategy and Transitive Term , 1993 .

[14]  Samson Abramsky,et al.  Strictness analysis and polymorphic invariance , 1985, Programs as Data Objects.

[15]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.