[Paper Review] Galois Connecting Call-by-Value and Call-by-Name
This paper establishes a general framework for reasoning about the relationship between call-by-value and call-by-name evaluation in the presence of computational effects, using Levy's call-by-push-value (CBPV) calculus as a unifying foundation. It shows that under certain axiomatic conditions on effects—such as thunkability and discardability—maps between call-by-value and call-by-name interpretations form Galois connections, enabling a systematic comparison of observable behaviors. The key contribution is a general reasoning principle (Theorem 6.2) that relates the outcomes of programs under different evaluation orders.
We establish a general framework for reasoning about the relationship between call-by-value and call-by-name. In languages with side-effects, call-by-value and call-by-name executions of programs often have different, but related, observable behaviours. For example, if a program might diverge but otherwise has no side-effects, then whenever it terminates under call-by-value, it terminates with the same result under call-by-name. We propose a technique for stating and proving these properties. The key ingredient is Levy’s call-by-push-value calculus, which we use as a framework for reasoning about evaluation orders. We construct maps between the call-by-value and call-by-name interpretations of types. We then identify properties of side-effects that imply these maps form a Galois connection. These properties hold for some side-effects (such as divergence), but not others (such as mutable state). This gives rise to a general reasoning principle that relates call-by-value and call-by-name. We apply the reasoning principle to example side-effects including divergence and nondeterminism.
Motivation & Objective
- To develop a general technique for reasoning about how observable behaviors of programs change when switching between call-by-value and call-by-name evaluation.
- To identify axiomatic properties of computational effects that enable systematic comparison of evaluation orders.
- To formalize the relationship between call-by-value and call-by-name via logical relations and Galois connections in the call-by-push-value calculus.
- To provide a reusable framework that applies to various effects, including divergence and nondeterminism, by abstracting over effect-specific semantics.
Proposed method
- Using Levy’s call-by-push-value (CBPV) calculus as a common semantic framework to translate expressions into call-by-value and call-by-name forms.
- Defining a family of set-theoretic logical relations that compare observable behaviors of terms with different types (CBV vs. CN).
- Establishing a theorem (Theorem 4.7) that relates the CBV and CN translations of an expression under conditions on computational effects, such as discardability and reorderability.
- Constructing maps between call-by-value and call-by-name interpretations of types, showing they form Galois connections under stronger conditions like thunkability.
- Composing these Galois maps with the CBPV translations to enable direct comparison of terms under different evaluation orders.
- Deriving a general reasoning principle (Theorem 6.2) that allows proving properties like 'if M terminates under CBV, then M′ terminates with the same result under CN'.
Experimental results
Research questions
- RQ1Under what conditions on computational effects do call-by-value and call-by-name evaluations of the same expression exhibit related observable behaviors?
- RQ2Can a Galois connection be established between the call-by-value and call-by-name interpretations of types in a way that reflects the behavior of expressions?
- RQ3How can logical relations between CBV and CN translations be used to derive general theorems about evaluation order changes?
- RQ4What axiomatic properties of effects (e.g., thunkability, discardability) are necessary and sufficient for relating CBV and CN via Galois connections?
- RQ5Can this framework be applied uniformly to diverse effects such as divergence, nondeterminism, and combinations thereof?
Key findings
- The paper establishes that under conditions such as discardability and reorderability of effects, the call-by-value and call-by-name translations of an expression are logically related via a set-theoretic relation (Theorem 4.7).
- For effects like divergence, the reasoning principle implies that if a program terminates under call-by-value, it also terminates with the same result under call-by-name.
- For nondeterministic effects, the principle shows that every possible result of a call-by-value execution is a possible result of the corresponding call-by-name execution.
- The maps between call-by-value and call-by-name type interpretations form Galois connections when effects are thunkable, enabling a formal duality between the two evaluation strategies.
- The general reasoning principle (Theorem 6.2) allows deriving order-sensitive properties of programs by comparing their behaviors under different evaluation orders.
- The framework is general and applies to combinations of effects, such as divergence and nondeterminism, provided their axiomatic properties are satisfied.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.