Path analysis for lazy data structures

1Citations
Citations of this article
1Readers
Mendeley users who have this article in their library.
Get full text

Abstract

We present a method to statically infer evaluation order information for data structures in typed lazy functional programs. Our goal is to determine in what order and to what extent variables and data structures are evaluated. This subsumes backwards data structure strictness analysis and can be used to optimize the implementation of suspensions (or "thunks") in lazy languages. The order of evaluation of the variables in an expression is described by variable paths, which are sequences of variables. The evaluation order of a data structure is described by a context. This is the type of the data structure together with path sets describing the order of evaluation of its components. Thus for the type natlist::= Nil | Cons nat natlist we record the order in which the nat and natlist fields of Cons are evaluated (if at all). To obtain a terminating analysis, only uniform contexts are allowed for recursively defined types such as natlist: all the recursive components (those of type natlist) must have the same description. Contexts seem to be natural tools for describing and reasoning with data structure strictness. In particular, one can characterize head strictness also in the absence of tail strictness. The main advantage of this work over previous work [2] [4] is the handling of data structures.

Cite

CITATION STYLE

APA

Gomard, C. K., & Sestoft, P. (1992). Path analysis for lazy data structures. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 631 LNCS, pp. 54–68). Springer Verlag. https://doi.org/10.1007/3-540-55844-6_127

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free