-
The categorical contours of the Chomsky-Schützenberger representation theorem
Authors:
Paul-André Melliès,
Noam Zeilberger
Abstract:
We develop fibrational perspectives on context-free grammars and on finite state automata over categories and operads. A generalized CFG is a functor from a free colored operad (= multicategory) generated by a pointed finite species into an arbitrary base operad: this encompasses classical CFGs by taking the base to be a certain operad constructed from a free monoid, as an instance of a more gener…
▽ More
We develop fibrational perspectives on context-free grammars and on finite state automata over categories and operads. A generalized CFG is a functor from a free colored operad (= multicategory) generated by a pointed finite species into an arbitrary base operad: this encompasses classical CFGs by taking the base to be a certain operad constructed from a free monoid, as an instance of a more general construction of an operad of spliced arrows $\mathcal{W}\,\mathcal{C}$ for any category $\mathcal{C}$. A generalized NDFA is a functor satisfying the unique lifting of factorizations and finite fiber properties, from an arbitrary bipointed category or pointed operad: this encompasses classical word automata and tree automata without $ε$-transitions, but also automata over non-free categories and operads. We show that generalized context-free and regular languages satisfy suitable generalizations of many of the usual closure properties, and in particular we give a simple conceptual proof that context-free languages are closed under intersection with regular languages. Finally, we observe that the splicing functor $\mathcal{W} : Cat \to Oper$ admits a left adjoint $\mathcal{C} : Oper \to Cat$, which we call the contour category construction since the arrows of $\mathcal{C}\,\mathcal{O}$ have a geometric interpretation as oriented contours of operations of $\mathcal{O}$. A direct consequence of the contour / splicing adjunction is that every pointed finite species induces a universal CFG generating a language of tree contour words. This leads us to a generalization of the Chomsky-Schützenberger Representation Theorem, establishing that a subset of a homset $L \subseteq \mathcal{C}(A,B)$ is a CFL of arrows iff it is a functorial image of the intersection of a $\mathcal{C}$-chromatic tree contour language with a regular language.
△ Less
Submitted 29 December, 2023;
originally announced May 2024.
-
Profinite lambda-terms and parametricity
Authors:
Sam van Gool,
Paul-André Melliès,
Vincent Moreau
Abstract:
Combining ideas coming from Stone duality and Reynolds parametricity, we formulate in a clean and principled way a notion of profinite lambda-term which, we show, generalizes at every type the traditional notion of profinite word coming from automata theory. We start by defining the Stone space of profinite lambda-terms as a projective limit of finite sets of usual lambda-terms, considered modulo…
▽ More
Combining ideas coming from Stone duality and Reynolds parametricity, we formulate in a clean and principled way a notion of profinite lambda-term which, we show, generalizes at every type the traditional notion of profinite word coming from automata theory. We start by defining the Stone space of profinite lambda-terms as a projective limit of finite sets of usual lambda-terms, considered modulo a notion of equivalence based on the finite standard model. One main contribution of the paper is to establish that, somewhat surprisingly, the resulting notion of profinite lambda-term coming from Stone duality lives in perfect harmony with the principles of Reynolds parametricity. In addition, we show that the notion of profinite lambda-term is compositional by constructing a cartesian closed category of profinite lambda-terms, and we establish that the embedding from lambda-terms modulo beta-eta-conversion to profinite lambda-terms is faithful using Statman's finite completeness theorem. Finally, we prove that the traditional Church encoding of finite words into lambda-terms can be extended to profinite words, and leads to a homeomorphism between the space of profinite words and the space of profinite lambda-terms of the corresponding Church type.
△ Less
Submitted 18 November, 2023; v1 submitted 29 January, 2023;
originally announced January 2023.
-
Parsing as a lifting problem and the Chomsky-Schützenberger representation theorem
Authors:
Paul-André Melliès,
Noam Zeilberger
Abstract:
We begin by explaining how any context-free grammar encodes a functor of operads from a freely generated operad into a certain "operad of spliced words". This motivates a more general notion of CFG over any category $C$, defined as a finite species $S$ equipped with a color denoting the start symbol and a functor of operads $p : Free[S] \to W[C]$ into the operad of spliced arrows in $C$. We show t…
▽ More
We begin by explaining how any context-free grammar encodes a functor of operads from a freely generated operad into a certain "operad of spliced words". This motivates a more general notion of CFG over any category $C$, defined as a finite species $S$ equipped with a color denoting the start symbol and a functor of operads $p : Free[S] \to W[C]$ into the operad of spliced arrows in $C$. We show that many standard properties of CFGs can be formulated within this framework, and that usual closure properties of CF languages generalize to CF languages of arrows. We also discuss a dual fibrational perspective on the functor $p$ via the notion of "displayed" operad, corresponding to a lax functor of operads $W[C] \to Span(Set)$.
We then turn to the Chomsky-Schützenberger Representation Theorem. We describe how a non-deterministic finite state automaton can be seen as a category $Q$ equipped with a pair of objects denoting initial and accepting states and a functor of categories $Q \to C$ satisfying the unique lifting of factorizations property and the finite fiber property. Then, we explain how to extend this notion of automaton to functors of operads, which generalize tree automata, allowing us to lift an automaton over a category to an automaton over its operad of spliced arrows. We show that every CFG over a category can be pulled back along a ND finite state automaton over the same category, and hence that CF languages are closed under intersection with regular languages. The last important ingredient is the identification of a left adjoint $C[-] : Operad \to Cat$ to the operad of spliced arrows functor, building the "contour category" of an operad. Using this, we generalize the C-S representation theorem, proving that any context-free language of arrows over a category $C$ is the functorial image of the intersection of a $C$-chromatic tree contour language and a regular language.
△ Less
Submitted 20 February, 2023; v1 submitted 18 December, 2022;
originally announced December 2022.
-
Comprehension and quotient structures in the language of 2-categories
Authors:
Paul-André Melliès,
Nicolas Rolland
Abstract:
Lawvere observed in his celebrated work on hyperdoctrines that the set-theoretic schema of comprehension can be elegantly expressed in the functorial language of categorical logic, as a comprehension structure on the functor $p:\mathscr{E}\to\mathscr{B}$ defining the hyperdoctrine.
In this paper, we formulate and study a strictly ordered hierarchy of three notions of comprehension structure on a…
▽ More
Lawvere observed in his celebrated work on hyperdoctrines that the set-theoretic schema of comprehension can be elegantly expressed in the functorial language of categorical logic, as a comprehension structure on the functor $p:\mathscr{E}\to\mathscr{B}$ defining the hyperdoctrine.
In this paper, we formulate and study a strictly ordered hierarchy of three notions of comprehension structure on a given functor $p:\mathscr{E}\to\mathscr{B}$, which we call (i) comprehension structure, (ii) comprehension structure with section, and (iii) comprehension structure with image.
Our approach is 2-categorical and we thus formulate the three levels of comprehension structure on a general morphism $p:\mathrm{\mathbf{E}}\to\mathrm{\mathbf{B}}$ in a 2-category $\mathscr{K}$.
This conceptual point of view on comprehension structures enables us to revisit the work by Fumex, Ghani and Johann on the duality between comprehension structures and quotient structures on a given functor $p:\mathscr{E}\to\mathscr{B}$.
In particular, we show how to lift the comprehension and quotient structures on a functor $p:\mathscr{E}\to\mathscr{B}$ to the categories of algebras or coalgebras associated to functors $F_{\mathscr{E}}:\mathscr{E}\to\mathscr{E}$ and $F_{\mathscr{B}}:\mathscr{B}\to\mathscr{B}$ of interest, in order to interpret reasoning by induction and coinduction in the traditional language of categorical logic, formulated in an appropriate 2-categorical way.
△ Less
Submitted 20 May, 2020;
originally announced May 2020.
-
Concurrent Separation Logic Meets Template Games
Authors:
Paul-André Melliès,
Léo Stefanesco
Abstract:
An old dream of concurrency theory and programming language semantics has been to uncover the fundamental synchronization mechanisms which regulate situations as different as game semantics for higher-order programs, and Hoare logic for concurrent programs with shared memory and locks. In this paper, we establish a deep and unexpected connection between two recent lines of work on concurrent separ…
▽ More
An old dream of concurrency theory and programming language semantics has been to uncover the fundamental synchronization mechanisms which regulate situations as different as game semantics for higher-order programs, and Hoare logic for concurrent programs with shared memory and locks. In this paper, we establish a deep and unexpected connection between two recent lines of work on concurrent separation logic (CSL) and on template game semantics for differential linear logic (DiLL). Thanks to this connection, we reformulate in the purely conceptual style of template games for DiLL the asynchronous and interactive interpretation of CSL designed by Melliès and Stefanesco. We believe that the analysis reveals something important about the secret anatomy of CSL, and more specifically about the subtle interplay, of a categorical nature, between sequential composition, parallel product, errors and locks.
△ Less
Submitted 9 May, 2020;
originally announced May 2020.
-
An Asynchronous soundness theorem for concurrent separation logic
Authors:
Paul-André Melliès,
Léo Stefanesco
Abstract:
Concurrent separation logic (CSL) is a specification logic for concurrent imperative programs with shared memory and locks. In this paper, we develop a concurrent and interactive account of the logic inspired by asynchronous game semantics. To every program $C$, we associate a pair of asynchronous transition systems $[C]_S$ and $[C]_L$ which describe the operational behavior of the Code when confr…
▽ More
Concurrent separation logic (CSL) is a specification logic for concurrent imperative programs with shared memory and locks. In this paper, we develop a concurrent and interactive account of the logic inspired by asynchronous game semantics. To every program $C$, we associate a pair of asynchronous transition systems $[C]_S$ and $[C]_L$ which describe the operational behavior of the Code when confronted to its Environment or Frame --- both at the level of machine states ($S$) and of machine instructions and locks ($L$). We then establish that every derivation tree $π$ of a judgment $Γ\vdash\{P\}C\{Q\}$ defines a winning and asynchronous strategy $[π]_{Sep}$ with respect to both asynchronous semantics $[C]_S$ and $[C]_L$. From this, we deduce an asynchronous soundness theorem for CSL, which states that the canonical map $\mathcal{L}:[C]_S\to[C]_L$ from the stateful semantics $[C]_S$ to the stateless semantics $[C]_L$ satisfies a basic fibrational property. We advocate that this provides a clean and conceptual explanation for the usual soundness theorem of CSL, including the absence of data races.
△ Less
Submitted 21 July, 2018;
originally announced July 2018.
-
A Game Semantics of Concurrent Separation Logic
Authors:
Paul-André Melliès,
Léo Stefanesco
Abstract:
In this paper, we develop a game-theoretic account of concurrent separation logic. To every execution trace of the Code confronted to the Environment, we associate a specification game where Eve plays for the Code, and Adam for the Environment. The purpose of Eve and Adam is to decompose every intermediate machine state of the execution trace into three pieces: one piece for the Code, one piece fo…
▽ More
In this paper, we develop a game-theoretic account of concurrent separation logic. To every execution trace of the Code confronted to the Environment, we associate a specification game where Eve plays for the Code, and Adam for the Environment. The purpose of Eve and Adam is to decompose every intermediate machine state of the execution trace into three pieces: one piece for the Code, one piece for the Environment, and one piece for the available shared resources. We establish the soundness of concurrent separation logic by interpreting every derivation tree of the logic as a winning strategy of this specification game.
△ Less
Submitted 6 October, 2017;
originally announced October 2017.
-
On bifibrations of model categories
Authors:
Pierre Cagne,
Paul-André Melliès
Abstract:
In this article, we develop a notion of Quillen bifibration which combines the two notions of Grothendieck bifibration and of Quillen model structure. In particular, given a bifibration $p:\mathcal E\to\mathcal B$, we describe when a family of model structures on the fibers $\mathcal E_A$ and on the basis category $\mathcal B$ combines into a model structure on the total category $\mathcal E$, suc…
▽ More
In this article, we develop a notion of Quillen bifibration which combines the two notions of Grothendieck bifibration and of Quillen model structure. In particular, given a bifibration $p:\mathcal E\to\mathcal B$, we describe when a family of model structures on the fibers $\mathcal E_A$ and on the basis category $\mathcal B$ combines into a model structure on the total category $\mathcal E$, such that the functor $p$ preserves cofibrations, fibrations and weak equivalences. Using this Grothendieck construction for model structures, we revisit the traditional definition of Reedy model structures, and possible generalizations, and exhibit their bifibrational nature.
△ Less
Submitted 29 September, 2017;
originally announced September 2017.
-
Five Basic Concepts of Axiomatic Rewriting Theory
Authors:
Paul-André Melliès
Abstract:
In this invited talk, I will review five basic concepts of Axiomatic Rewriting Theory, an axiomatic and diagrammatic theory of rewriting started 25 years ago in a LICS paper with Georges Gonthier and Jean-Jacques Lévy, and developed along the subsequent years into a full-fledged 2-dimensional theory of causality and residuation in rewriting. I will give a contemporary view on the theory, informed…
▽ More
In this invited talk, I will review five basic concepts of Axiomatic Rewriting Theory, an axiomatic and diagrammatic theory of rewriting started 25 years ago in a LICS paper with Georges Gonthier and Jean-Jacques Lévy, and developed along the subsequent years into a full-fledged 2-dimensional theory of causality and residuation in rewriting. I will give a contemporary view on the theory, informed by my later work on categorical semantics and higher-dimensional algebra, and also indicate a number of current research directions in the field.
△ Less
Submitted 27 September, 2016;
originally announced September 2016.
-
A bifibrational reconstruction of Lawvere's presheaf hyperdoctrine
Authors:
Paul-André Melliès,
Noam Zeilberger
Abstract:
Combining insights from the study of type refinement systems and of monoidal closed chiralities, we show how to reconstruct Lawvere's hyperdoctrine of presheaves using a full and faithful embedding into a monoidal closed bifibration living now over the compact closed category of small categories and distributors. Besides revealing dualities which are not immediately apparent in the traditional pre…
▽ More
Combining insights from the study of type refinement systems and of monoidal closed chiralities, we show how to reconstruct Lawvere's hyperdoctrine of presheaves using a full and faithful embedding into a monoidal closed bifibration living now over the compact closed category of small categories and distributors. Besides revealing dualities which are not immediately apparent in the traditional presentation of the presheaf hyperdoctrine, this reconstruction leads us to an axiomatic treatment of directed equality predicates (modelled by hom presheaves), realizing a vision initially set out by Lawvere (1970). It also leads to a simple calculus of string diagrams (representing presheaves) that is highly reminiscent of C. S. Peirce's existential graphs for predicate logic, refining an earlier interpretation of existential graphs in terms of Boolean hyperdoctrines by Brady and Trimble. Finally, we illustrate how this work extends to a bifibrational setting a number of fundamental ideas of linear logic.
△ Less
Submitted 12 August, 2016; v1 submitted 22 January, 2016;
originally announced January 2016.
-
Indexed linear logic and higher-order model checking
Authors:
Charles Grellois,
Paul-André Melliès
Abstract:
In recent work, Kobayashi observed that the acceptance by an alternating tree automaton A of an infinite tree T generated by a higher-order recursion scheme G may be formulated as the typability of the recursion scheme G in an appropriate intersection type system associated to the automaton A. The purpose of this article is to establish a clean connection between this line of work and Bucciarelli…
▽ More
In recent work, Kobayashi observed that the acceptance by an alternating tree automaton A of an infinite tree T generated by a higher-order recursion scheme G may be formulated as the typability of the recursion scheme G in an appropriate intersection type system associated to the automaton A. The purpose of this article is to establish a clean connection between this line of work and Bucciarelli and Ehrhard's indexed linear logic. This is achieved in two steps. First, we recast Kobayashi's result in an equivalent infinitary intersection type system where intersection is not idempotent anymore. Then, we show that the resulting type system is a fragment of an infinitary version of Bucciarelli and Ehrhard's indexed linear logic. While this work is very preliminary and does not integrate key ingredients of higher-order model-checking like priorities, it reveals an interesting and promising connection between higher-order model-checking and linear logic.
△ Less
Submitted 16 March, 2015;
originally announced March 2015.
-
Finitary semantics of linear logic and higher-order model-checking
Authors:
Charles Grellois,
Paul-André Melliès
Abstract:
In this paper, we explain how the connection between higher-order model-checking and linear logic recently exhibited by the authors leads to a new and conceptually enlightening proof of the selection problem originally established by Carayol and Serre using collapsible pushdown automata. The main idea is to start from an infinitary and colored relational semantics of the lambdaY-calculus already f…
▽ More
In this paper, we explain how the connection between higher-order model-checking and linear logic recently exhibited by the authors leads to a new and conceptually enlightening proof of the selection problem originally established by Carayol and Serre using collapsible pushdown automata. The main idea is to start from an infinitary and colored relational semantics of the lambdaY-calculus already formulated, and to replace it by its finitary counterpart based on finite prime-algebraic lattices. Given a higher-order recursion scheme G, the finiteness of its interpretation in the model enables us to associate to any MSO formula phi a new higher-order recursion scheme G_phi resolving the selection problem.
△ Less
Submitted 1 May, 2015; v1 submitted 18 February, 2015;
originally announced February 2015.
-
An Isbell Duality Theorem for Type Refinement Systems
Authors:
Paul-André Melliès,
Noam Zeilberger
Abstract:
Any refinement system (= functor) has a fully faithful representation in the refinement system of presheaves, by interpreting types as relative slice categories, and refinement types as presheaves over those categories. Motivated by an analogy between side effects in programming and *context effects* in linear logic, we study logical aspects of this "positive" (covariant) representation, as well a…
▽ More
Any refinement system (= functor) has a fully faithful representation in the refinement system of presheaves, by interpreting types as relative slice categories, and refinement types as presheaves over those categories. Motivated by an analogy between side effects in programming and *context effects* in linear logic, we study logical aspects of this "positive" (covariant) representation, as well as of an associated "negative" (contravariant) representation. We establish several preservation properties for these representations, including a generalization of Day's embedding theorem for monoidal closed categories. Then we establish that the positive and negative representations satisfy an Isbell-style duality. As corollaries, we derive two different formulas for the positive representation of a pushforward (inspired by the classical negative translations of proof theory), which express it either as the dual of a pullback of a dual, or as the double dual of a pushforward. Besides explaining how these constructions on refinement systems generalize familiar category-theoretic ones (by viewing categories as special refinement systems), our main running examples involve representations of Hoare Logic and linear sequent calculus.
△ Less
Submitted 31 July, 2015; v1 submitted 21 January, 2015;
originally announced January 2015.
-
Relational semantics of linear logic and higher-order model-checking
Authors:
Charles Grellois,
Paul-André Melliès
Abstract:
In this article, we develop a new and somewhat unexpected connection between higher-order model-checking and linear logic. Our starting point is the observation that once embedded in the relational semantics of linear logic, the Church encoding of any higher-order recursion scheme (HORS) comes together with a dual Church encoding of an alternating tree automata (ATA) of the same signature. Moreove…
▽ More
In this article, we develop a new and somewhat unexpected connection between higher-order model-checking and linear logic. Our starting point is the observation that once embedded in the relational semantics of linear logic, the Church encoding of any higher-order recursion scheme (HORS) comes together with a dual Church encoding of an alternating tree automata (ATA) of the same signature. Moreover, the interaction between the relational interpretations of the HORS and of the ATA identifies the set of accepting states of the tree automaton against the infinite tree generated by the recursion scheme. We show how to extend this result to alternating parity automata (APT) by introducing a parametric version of the exponential modality of linear logic, capturing the formal properties of colors (or priorities) in higher-order model-checking. We show in particular how to reunderstand in this way the type-theoretic approach to higher-order model-checking developed by Kobayashi and Ong. We briefly explain in the end of the paper how his analysis driven by linear logic results in a new and purely semantic proof of decidability of the formulas of the monadic second-order logic for higher-order recursion schemes.
△ Less
Submitted 1 May, 2015; v1 submitted 20 January, 2015;
originally announced January 2015.
-
An infinitary model of linear logic
Authors:
Charles Grellois,
Paul-André Melliès
Abstract:
In this paper, we construct an infinitary variant of the relational model of linear logic, where the exponential modality is interpreted as the set of finite or countable multisets. We explain how to interpret in this model the fixpoint operator Y as a Conway operator alternatively defined in an inductive or a coinductive way. We then extend the relational semantics with a notion of color or prior…
▽ More
In this paper, we construct an infinitary variant of the relational model of linear logic, where the exponential modality is interpreted as the set of finite or countable multisets. We explain how to interpret in this model the fixpoint operator Y as a Conway operator alternatively defined in an inductive or a coinductive way. We then extend the relational semantics with a notion of color or priority in the sense of parity games. This extension enables us to define a new fixpoint operator Y combining both inductive and coinductive policies. We conclude the paper by sketching the connection between the resulting model of lambda-calculus with recursion and higher-order model-checking.
△ Less
Submitted 28 January, 2015; v1 submitted 17 November, 2014;
originally announced November 2014.
-
Type refinement and monoidal closed bifibrations
Authors:
Paul-André Melliès,
Noam Zeilberger
Abstract:
The concept of_refinement_ in type theory is a way of reconciling the "intrinsic" and the "extrinsic" meanings of types. We begin with a rigorous analysis of this concept, settling on the simple conclusion that the type-theoretic notion of "type refinement system" may be identified with the category-theoretic notion of "functor". We then use this correspondence to give an equivalent type-theoretic…
▽ More
The concept of_refinement_ in type theory is a way of reconciling the "intrinsic" and the "extrinsic" meanings of types. We begin with a rigorous analysis of this concept, settling on the simple conclusion that the type-theoretic notion of "type refinement system" may be identified with the category-theoretic notion of "functor". We then use this correspondence to give an equivalent type-theoretic formulation of Grothendieck's definition of (bi)fibration, and extend this to a definition of_monoidal closed bifibrations_, which we see as a natural space in which to study the properties of proofs and programs. Our main result is a representation theorem for strong monads on a monoidal closed fibration, describing sufficient conditions for a monad to be isomorphic to a continuations monad "up to pullback".
△ Less
Submitted 1 October, 2013;
originally announced October 2013.
-
Asynchronous games: innocence without alternation
Authors:
Paul-André Melliès,
Samuel Mimram
Abstract:
The notion of innocent strategy was introduced by Hyland and Ong in order to capture the interactive behaviour of lambda-terms and PCF programs. An innocent strategy is defined as an alternating strategy with partial memory, in which the strategy plays according to its view. Extending the definition to non-alternating strategies is problematic, because the traditional definition of views is base…
▽ More
The notion of innocent strategy was introduced by Hyland and Ong in order to capture the interactive behaviour of lambda-terms and PCF programs. An innocent strategy is defined as an alternating strategy with partial memory, in which the strategy plays according to its view. Extending the definition to non-alternating strategies is problematic, because the traditional definition of views is based on the hypothesis that Opponent and Proponent alternate during the interaction. Here, we take advantage of the diagrammatic reformulation of alternating innocence in asynchronous games, in order to provide a tentative definition of innocence in non-alternating games. The task is interesting, and far from easy. It requires the combination of true concurrency and game semantics in a clean and organic way, clarifying the relationship between asynchronous games and concurrent games in the sense of Abramsky and Melliès. It also requires an interactive reformulation of the usual acyclicity criterion of linear logic, as well as a directed variant, as a scheduling criterion.
△ Less
Submitted 8 June, 2007;
originally announced June 2007.
-
Resource modalities in game semantics
Authors:
Paul-André Melliès,
Nicolas Tabareau
Abstract:
The description of resources in game semantics has never achieved the simplicity and precision of linear logic, because of a misleading conception: the belief that linear logic is more primitive than game semantics. We advocate instead the contrary: that game semantics is conceptually more primitive than linear logic. Starting from this revised point of view, we design a categorical model of res…
▽ More
The description of resources in game semantics has never achieved the simplicity and precision of linear logic, because of a misleading conception: the belief that linear logic is more primitive than game semantics. We advocate instead the contrary: that game semantics is conceptually more primitive than linear logic. Starting from this revised point of view, we design a categorical model of resources in game semantics, and construct an arena game model where the usual notion of bracketing is extended to multi- bracketing in order to capture various resource policies: linear, affine and exponential.
△ Less
Submitted 3 May, 2007;
originally announced May 2007.