skip to main content
US FlagAn official website of the United States government
dot gov icon
Official websites use .gov
A .gov website belongs to an official government organization in the United States.
https lock icon
Secure .gov websites use HTTPS
A lock ( lock ) or https:// means you've safely connected to the .gov website. Share sensitive information only on official, secure websites.


Title: Program adverbs and Tlön embeddings
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.  more » « less
Award ID(s):
2006535 1703835
PAR ID:
10606330
Author(s) / Creator(s):
 ;  
Publisher / Repository:
Association for Computing Machinery (ACM)
Date Published:
Journal Name:
Proceedings of the ACM on Programming Languages
Volume:
6
Issue:
ICFP
ISSN:
2475-1421
Format(s):
Medium: X Size: p. 312-342
Size(s):
p. 312-342
Sponsoring Org:
National Science Foundation
More Like this
  1. null (Ed.)
    Abstract We develop an $$\infty $$-categorical version of the classical theory of polynomial and analytic functors, initial algebras, and free monads. Using this machinery, we provide a new model for $$\infty $$-operads, namely $$\infty $$-operads as analytic monads. We justify this definition by proving that the $$\infty $$-category of analytic monads is equivalent to that of dendroidal Segal spaces, known to be equivalent to the other existing models for $$\infty $$-operads. 
    more » « less
  2. An adjunction is a pair of functors related by a pair of natural transformations, and relating a pair of categories. It displays how a structure, or a concept, projects from each category to the other, and back. Adjunctions are the common denominator of Galois connections, representation theories, spectra, and generalized quantifiers. We call an adjunction nuclear when its categories determine each other. We show that every adjunction can be resolved into a nuclear adjunction. This resolution is idempotent in a strong sense. The nucleus of an adjunction displays its conceptual core, just as the singular value decomposition of an adjoint pair of linear operators displays their canonical bases. The two composites of an adjoint pair of functors induce a monad and a comonad. Monads and comonads generalize the closure and the interior operators from topology, or modalities from logic, while providing a saturated view of algebraic structures and compositions on one side, and of coalgebraic dynamics and decompositions on the other. They are resolved back into adjunctions over the induced categories of algebras and of coalgebras. The nucleus of an adjunction is an adjunction between the induced categories of algebras and coalgebras. It provides new presentations for both, revealing the meaning of constructing algebras for a comonad and coalgebras for a monad. In his seminal early work, Ross Street described an adjunction between monads and comonads in 2-categories. Lifting the nucleus construction, we show that the resulting Street monad on monads is strongly idempotent, and extracts the nucleus of a monad. A dual treatment achieves the same for comonads. Applying a notable fragment of pure 2-category theory on an acute practical problem of data analysis thus led to new theoretical result. 
    more » « less
  3. null (Ed.)
    An adjunction is a pair of functors related by a pair of natural transformations, and relating a pair of categories. It displays how a structure, or a concept, projects from each category to the other, and back. Adjunctions are the common denominator of Galois connections, representation theories, spectra, and generalized quantifiers. We call an adjunction nuclear when its categories determine each other. We show that every adjunction can be resolved into a nuclear adjunction. The resolution is idempotent in a strict sense. The resulting nucleus displays the concept that was implicit in the original adjunction, just as the singular value decomposition of an adjoint pair of linear operators displays their canonical bases. In his seminal early work, Ross Street described an adjunction between monads and comonads in 2-categories. Lifting the nucleus construction, we show that the resulting Street monad on monads is strictly idempotent, and extracts the nucleus of a monad. A dual treatment achieves the same for comonads. This uncovers remarkably concrete applications behind a notable fragment of pure 2-category theory. The other way around, driven by the tasks and methods of machine learning and data analysis, the nucleus construction also seems to uncover remarkably pure and general mathematical content lurking behind the daily practices of network computation and data analysis. 
    more » « less
  4. Random data generators can be thought of as parsers of streams of randomness. This perspective on generators for random data structures is established folklore in the programming languages community, but it has never been formalized, nor have its consequences been deeply explored. We build on the idea of freer monads to develop free generators, which unify parsing and generation using a common structure that makes the relationship between the two concepts precise. Free generators lead naturally to a proof that a monadic generator can be factored into a parser plus a distribution over choice sequences. Free generators also support a notion of derivative, analogous to the familiar Brzozowski derivatives of formal languages, allowing analysis tools to preview the effect of a particular generator choice. This gives rise to a novel algorithm for generating data structures satisfying user-specified preconditions. 
    more » « less
  5. We introduce a theory of stratifications of noncommutative stacks (i.e., presentable stable ∞<#comment/> \infty -categories), and we prove a reconstruction theorem that expresses them in terms of their strata and gluing data. This reconstruction theorem is compatible with symmetric monoidal structures, and with more general operadic structures such as E n \mathbb {E}_n -monoidal structures. We also provide a suite of fundamental operations for constructing new stratifications from old ones: restriction, pullback, quotient, pushforward, and refinement. Moreover, we establish a dual form of reconstruction; this is closely related to Verdier duality and reflection functors, and gives a categorification of Möbius inversion. Our main application is to equivariant stable homotopy theory: for any compact Lie group G G , we give a symmetric monoidal stratification of genuine G G -spectra. In the case that G G is finite, this expresses genuine G G -spectra in terms of their geometric fixedpoints (as homotopy-equivariant spectra) and gluing data therebetween (which are given by proper Tate constructions). We also prove an adelic reconstruction theorem; this applies not just to ordinary schemes but in the more general context of tensor-triangular geometry, where we obtain a symmetric monoidal stratification over the Balmer spectrum. We discuss the particular example of chromatic homotopy theory. 
    more » « less