Improving the Lazy Krivine Machine

dc.contributor.authorFriedman, Daniel; Ghuloum, Abdulaziz; Siek, Jeremy; Winebarger, Lynn
dc.date.accessioned2025-11-12T00:33:53Z
dc.date.available2025-11-12T00:33:53Z
dc.date.issued2003-11
dc.description.abstractKrivine presents the K machine, which produces weak head normal form results. Sestoft introduces several call-by-need variants of the K machine that implement result sharing via pushing update markers on the stack in a way similar to the TIM and the STG machine. When a sequence of consecutive markers appears on the stack, all but the first cause redundant updates. Improvements related to these sequences have dealt with either the consumption of the markers or the removal of the markers once they appear. Here we present an improvement that eliminates the production of marker sequences of length greater than one. This improvement results in the C machine, a more space and time efficient variant of K. We then apply the classic optimization of short-circuiting operand variable dereferences to create the call-by-need S machine. Finally, we combine the two improvements in the CS machine. On our benchmarks this machine uses half the stack space, performs one quarter as many updates, and executes between 27% faster and 17% slower than our L variant of Sestoft's lazy Krivine machine. More interesting is that on one benchmark L, S, and C consume unbounded space, but CS consumes constant space. Our comparisons to Sestoft's Mark 2 machine are not exact, however, since we restrict ourselves to unpreprocessed closed lambda terms. Our variant of his machine does no environment trimming, conversion to deBruijn-style variable access, and does not provide basic constants, data type constructors, or the recursive let. (The Y combinator is used instead.)
dc.identifier.urihttps://hdl.handle.net/2022/34424
dc.relation.ispartofseriesIndiana University Computer Science Technical Reports; TR581
dc.rightsThis work is protected by copyright unless stated otherwise.
dc.rights.uri
dc.titleImproving the Lazy Krivine Machine

Files

Original bundle

Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
TR581.pdf
Size:
236.71 KB
Format:
Adobe Portable Document Format
Can’t use the file because of accessibility barriers? Contact us