Galois connecting call-by-value and call-by-name

by   Dylan McDermott, et al.

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.


page 1

page 2

page 3

page 4


Gradual Type Theory (Extended Version)

Gradually typed languages are designed to support both dynamically typed...

Equational reasoning for non-determinism monad: the case of Spark aggregation

As part of the author's studies on equational reasoning for monadic prog...

Quantitative Strongest Post

We present a novel strongest-postcondition-style calculus for quantitati...

A program logic for fresh name generation

We present a program logic for Pitts and Stark's ν-calculus, an extensio...

One Monad to Prove Them All (Functional Pearl)

One Monad to Prove Them All is a modern fairy tale about curiosity and p...

Temporal Verification with Answer-Effect Modification

Type-and-effect systems are a widely-used approach to program verificati...

Reasoning about the garden of forking paths

Lazy evaluation is a powerful tool for functional programmers. It enable...