On the relationship between laziness and strictness

Title:
On the relationship between laziness and strictness
Creator:
Chang, Stephen (Author)
Contributor:
Felleisen, Matthias (Advisor)
Ahmed, Amal Jamil (Committee member)
Morrisett, Greg (Committee member)
Horn, David Van (Committee member)
Publisher:
Boston, Massachusetts : Northeastern University, 2014
Copyright date:
2014
Date Accepted:
May 2014
Date Awarded:
August 2014
Type of resource:
Text
Genre:
Dissertations
Format:
electronic
Digital origin:
born digital
Abstract/Description:
Lazy evaluation empowers programmers with the ability to create efficient, modular programs. Unfortunately, laziness also comes with some drawbacks. On one hand, lazy constructs incur time and space overhead so programmers should minimize their use when they are not needed. Thus, lazy-by-default languages are often not the best means to utilize laziness. On the other hand, programs with too little laziness may pay its costs without receiving any benefit in return. This is because laziness is a global property of programs and thus its effects are not immediately proportionate to the amount of laziness in the program. Specifically, laziness propagates according to a program's value flow, so for example, introducing laziness in one part of a program may require additional laziness in other parts before any benefits are realized. Thus, determining the appropriate amount of laziness for a program is a tricky endeavor that requires balancing the costs with the benefits.

Researchers have proposed various strategies for determining a balance of laziness and strictness in a program. Unfortunately, most previous strategies have failed to appropriately consider either the costs or the benefits involved. Thus the preferred way to manage laziness in practice today is via manual annotations, which is an error-prone task that requires extensive experience to get right. In this dissertation, we introduce two techniques, one static and one dynamic, that take a strict-first perspective on managing laziness and improve on the state of the art in two ways. First, our techniques weigh the costs of laziness against the benefits with models that capture the expertise typically required when reasoning about laziness placement, and thus our techniques more precisely identify which parts of a program should be strict and which should be lazy. Second, we implement concrete tools that utilize our strategies so programmers can compute where laziness is needed in a more automated manner.
Subjects and keywords:
lazy evaluation
strictness
modular programs
Computer Sciences
Computer programming -- Evaluation
Computer programmers
Modular programming -- Evaluation
DOI:
https://doi.org/10.17760/d20005030
Permanent URL:
http://hdl.handle.net/2047/d20005030
Use and reproduction:
In Copyright: This Item is protected by copyright and/or related rights. You are free to use this Item in any way that is permitted by the copyright and related rights legislation that applies to your use. For other uses you need to obtain permission from the right-holder(s). (http://rightsstatements.org/vocab/InC/1.0/)
Copyright restrictions may apply.

Downloads