2019
DOI: 10.1145/3341687
|View full text |Cite
|
Sign up to set email alerts
|

Closure conversion is safe for space

Abstract: We formally prove that closure conversion with flat environments for CPS lambda calculus is correct (preserves semantics) and safe for time and space, meaning that produced code preserves the time and space required for the execution of the source program. We give a cost model to pre-and post-closure-conversion code by formalizing profiling semantics that keep track of the time and space resources needed for the execution of a program, taking garbage collection into account. To show preservation of time and sp… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
2
1
1
1

Citation Types

0
4
0

Year Published

2020
2020
2023
2023

Publication Types

Select...
4
3
1

Relationship

1
7

Authors

Journals

citations
Cited by 15 publications
(6 citation statements)
references
References 32 publications
0
4
0
Order By: Relevance
“…We need to show that (σ , e ′ ) ⇓ f trg OOT. From the hypothesis that the source diverges, we have that σ ; e ⇓ (f ,c ) src OOT for some c. Therefore, from the first hypothesis, we know that there exists f ′ ≥ f such that (σ , e ′ ) ⇓ This style of reasoning is employed by both the CakeML [Owens et al 2016[Owens et al , 2017 and the CertiCoq [Paraskevopoulou and Appel 2019; compilers. CertiCoq generalizes the previous lemma to also apply to transformations that may reduce the amount of steps that a program takes.…”
Section: Semanticsmentioning
confidence: 97%
See 2 more Smart Citations
“…We need to show that (σ , e ′ ) ⇓ f trg OOT. From the hypothesis that the source diverges, we have that σ ; e ⇓ (f ,c ) src OOT for some c. Therefore, from the first hypothesis, we know that there exists f ′ ≥ f such that (σ , e ′ ) ⇓ This style of reasoning is employed by both the CakeML [Owens et al 2016[Owens et al , 2017 and the CertiCoq [Paraskevopoulou and Appel 2019; compilers. CertiCoq generalizes the previous lemma to also apply to transformations that may reduce the amount of steps that a program takes.…”
Section: Semanticsmentioning
confidence: 97%
“…[Ahmed 2006;Appel and McAllester 2001]. Although logical relations are most frequently indexed by types, untyped logical relations are not uncommon [Acar et al 2008;Owens et al 2017;Paraskevopoulou and Appel 2019].…”
Section: The Logical Relationmentioning
confidence: 99%
See 1 more Smart Citation
“…In CertiCoq, (intermediate) languages semantics and proofs of correctness are based on big-step semantics (for terminating computations). However, big-step semantics is refined with other notions such as step-indexed logical relations and context-based semantics [40,42] to account for additional properties, for instance, compositionality. In addition, the idea of adapting this technique to be useful for general-purpose programming languages is barely mentioned in [40].…”
Section: Related Workmentioning
confidence: 99%
“…The space inefficiency of environment machines is also observed by Krishnaswami et al [26], who propose some techniques to alleviate it in the context of functional-reactive programming and based on linear types. The relevance for space of disabling environment sharing is also stressed by Paraskevopoulou and Appel [31] in their cost-aware study of closure conversion. A characterization of PSPACE in the -calculus is given by Gaboardi et al [21], but it relies on alternating time rather than on a notion of space.…”
Section: Introductionmentioning
confidence: 99%