Program Adverbs and Tlön Embeddings

Yao Li, Stephanie Weirich
7/11/2022
cs.PL

Official code: lastland/ProgramAdverbs (2 stars, Coq, MIT, last commit 2023-06-19).

Abstract

Free monads (and their variants) have become a popular general-purpose tool for representing the semantics of effectful programs in proof assistants. These data structures support the compositional definition of semantics parameterized by uninterpreted events, while admitting a rich equational theory of equivalence.

Show full abstract

But monads are not the only way to structure effectful computation, why should we limit ourselves? In this paper, inspired by applicative functors, selective functors, and other structures, we define a collection of data structures and theories, which we call program adverbs, that capture a variety of computational patterns. Program adverbs are themselves composable, allowing them to be used to specify the semantics of languages with multiple computation patterns. We use program adverbs as the basis for a new class of semantic embeddings called Tlön embeddings. Compared with embeddings based on free monads, Tlön embeddings allow more flexibility in computational modeling of effects, while retaining more information about the program's syntactic structure.

View on arXivView PDF

Code Implementations(1)

MIT

The Coq formalization of the paper Program Adverbs and Tlön Embeddings by Yao Li and Stephanie Weirich, published at ICFP 2022.

20Coq, MakefileJun 1, 20223 years agoMIT

Similar Papers

Cite this paper

@article{li2022program,
  title  = {Program Adverbs and Tlön Embeddings},
  author = {Yao Li and Stephanie Weirich},
  year   = {2022},
  eprint = {2207.05227},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2207.05227}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2207.05227.svg)](https://codeofpaper.com/paper/2207.05227)

Discussion