Program Adverbs and Tlön Embeddings

07/11/2022
by   Yao Li, et al.
0

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. 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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
06/10/2020

S-semantics – an example

The s-semantics makes it possible to explicitly deal with variables in p...
research
06/26/2022

Applications of Recursively Defined Data Structures

A circular program contains a data structure whose definition is self-re...
research
12/29/2017

Unifying Theories of Reactive Design Contracts

Design-by-contract is an important technique for model-based design in w...
research
11/20/2017

Dynamic Neural Program Embedding for Program Repair

Neural program embeddings have shown much promise recently for a variety...
research
11/25/2017

A Language for Probabilistically Oblivious Computation

An oblivious computation is one that is free of direct and indirect info...
research
04/10/2018

Semantic embeddings for program behavior patterns

In this paper, we propose a new feature extraction technique for program...
research
07/27/2017

Providing Self-Aware Systems with Reflexivity

We propose a new type of self-aware systems inspired by ideas from highe...

Please sign up or login with your details

Forgot password? Click here to reset