151 research outputs found
String Diagrams for -calculi and Functional Computation
This tutorial gives an advanced introduction to string diagrams and graph
languages for higher-order computation. The subject matter develops in a
principled way, starting from the two dimensional syntax of key categorical
concepts such as functors, adjunctions, and strictification, and leading up to
Cartesian Closed Categories, the core mathematical model of the lambda calculus
and of functional programming languages. This methodology inverts the usual
approach of proceeding from syntax to a categorical interpretation, by
rationally reconstructing a syntax from the categorical model. The result is a
graph syntax -- more precisely, a hierarchical hypergraph syntax -- which in
many ways is shown to be an improvement over the conventional linear term
syntax. The rest of the tutorial focuses on applications of interest to
programming languages: operational semantics, general frameworks for type
inference, and complex whole-program transformations such as closure conversion
and automatic differentiation
The Dynamic Geometry of Interaction Machine: A Token-Guided Graph Rewriter
In implementing evaluation strategies of the lambda-calculus, both
correctness and efficiency of implementation are valid concerns. While the
notion of correctness is determined by the evaluation strategy, regarding
efficiency there is a larger design space that can be explored, in particular
the trade-off between space versus time efficiency. Aiming at a unified
framework that would enable the study of this trade-off, we introduce an
abstract machine, inspired by Girard's Geometry of Interaction (GoI), a machine
combining token passing and graph rewriting. We show soundness and completeness
of our abstract machine, called the \emph{Dynamic GoI Machine} (DGoIM), with
respect to three evaluations: call-by-need, left-to-right call-by-value, and
right-to-left call-by-value. Analysing time cost of its execution classifies
the machine as ``efficient'' in Accattoli's taxonomy of abstract machines.Comment: arXiv admin note: text overlap with arXiv:1802.0649
- …