- Front Matter
- 10.1016/s1571-0661(05)80574-2
Preface: Volume 69
- Feb 01, 2003
- Electronic Notes in Theoretical Computer Science
- Richard Blute + 1 more +1
Preface: Volume 69
This book is a thoroughly revised edition of a monograph that presents an approach to the design and implementation of programming languages based on the relationship between lambda-calculus and category theory. The foundations of a new combinatory logic are laid down. Compilation and evaluation techniques are investigated. A simple abstract machine, called the Categorical Abstract Machine, is presented: it has served as the core of the implementation of the language CAML, of the ML family, developed at INRIA-Roquencourt and Ecole Normale Superieure, and first released in 1987. The main characteristics of this approach are conceptual simplicity and compactness, with bearings on portability, efficiency, and correctness proofs. A mathematical semantics of sequentiality is proposed, in which sequential rather than functions are used to interpret procedures. The theoretical investigation has led to the development of a programming language, CDSO, in which basic and functional types are not differentiated. The evaluation framework is a demand-driven data flow network. The model of algorithms is fully abstract with respect to this language: two procedures have the same denotation if and only if they have the same behaviour. Background on full abstraction is given. The new edition covers new results, and introduces new connections, as suggested by the following non-exhaustive fist of keywords: confluence properties of categorical combinators, explicit substitutions, control operations, linear logic, geometry of interaction, strong stability.
Preface: Volume 69
Preface: Volume 69
Complexity-theoretic aspects of programming language design
We survey three of Paris Kanellakis's contributions to the complexity-theoretic analysis of constructs in the design of programming languages. These are (1) his result that first-order unification is complete for polynomial time; (2) his contributions to the complexity analysis of type inference for polymorphicallytyped functional programming languages, which was proven to be complete for exponential time; and (3) his work on expressibility of simply typed lambda calculus when used as a functional database programming language. These research investigations are interrelated, emphasizing common themes and difficulties in the design of programming languages, with concrete implications that can be appreciated by language designers. First-order unification is a ubiquitous building block in implementations of sophisticated programming languages. It is, for example, the workhorse of logic programming engines, and the essential component of compile-time type analysis. The research on unification provided a secure foundation for understanding the complexity of automatic polymorphic type inference in functional languages such as ML and Haskell. Modern functional languages are based on the typed lambda calculus, so it is then natural to consider its computational expressiveness. We describe how the degree of higher-order functionality in simply typed terms can be related directly to well known complexity classes.
Read moreOn the design of a functional programming framework
A framework for compiler construction of functional programming languages is described. The framework has been designed to allow experimenting with functional programming languages and their implementations. Its three main characteristics are: (1) given the existing implementation of a functional programming language (not necessary in a source code), the implementation of a new functional programming language can be easily and efficiently developed, using the framework; (2) the framework enables enhancement of already implemented languages with new features; and (3) implementations of the languages in the framework are transparent, which can be freely exchanged between the languages.
Read moreModeling sharing and recursion for weak reduction strategies using explicit substitution
We present the λσ w a -calculus, a formal synthesis of the concepts of sharing and explicit substitution for weak reduction. We show how λσ w a , can be used as a foundation of implementations of functional programming languages by modeling the essential ingredients of such implementations, namely weak reduction strategies, recursion, space leaks, recursive data structures, and parallel evaluation. We use λσ w a , to give a unified model of several computational aspects. First, we give a precise account of the major reduction strategies used in functional programming and the consequences of choosing λ-graph-reduction vs. environment-based evaluation. Second, we show how to add constructors and explicit recursion to give a precise account of recursive functions and data structures even with respect to space complexity. Third, we formalize the notion of space leaks in λσ w a and use this to define a space leak free calculus; this suggests optimisations for call-by-need reduction that prevent space leaking and enables us to prove that the “trimming” performed by the STG machine does not leak space. In summary we give a formal account of several implementation techniques used by state of the art implementations of functional programming languages.
Read moreThe categorical abstract machine
The categorical abstract machine
The categorical abstract machine
The Cartesian closed categories have been shown by several authors to provide the right framework of the model theory of λ-calculus. The second author developed this as a syntactic equivalence between two calculi, giving rise to a new kind of combinatory logic: the categorical combinatory logic, where computations can be done through simple rewrite rules, and, as usual with combinators, avoiding problems with variable name clashes. This paper goes further (though not requiring a previous knowledge of categorical combinatory logic) and describes a very simple machine where categorical terms can be considered as code acting on a graph of values. The only saving mechanism is a stack containing pointers on code or on the graph. Abstractions are handled using closures. The machine is called categorical abstract machine or CAM. The CAM is easier to grasp and prove than the SECD machine. The natural evaluation strategy in the CAM is call-by-value, but lazy evaluation can be easily incorporated. The paper discusses the implementation of a real functional programming language, ML, through the CAM. A basic acquaintance with λ-calculus is required.
Read moreRelationships between category theory and functional programming with an application
The most recent studies in mathematics are concerned with objects, morphisms, and the relationship between morphisms. Prominent examples can be listed as functions, vector spaces with linear transformations, and groups with homomorphisms. Category theory proposes and constitutes new structures by examining objects, morphisms, and compositions. Source and target of a morphism in category theory corresponds to input and output in programming language. Thus, a connection can be obtained between category theory and functional programming languages. From this point, this paper constructs a small category implementation in a functional programming language called Haskell.
Read moreCategorical combinators
Categorical combinators
Towards a typed Geometry of Interaction
Girard's Geometry of Interaction (GoI) develops a mathematical framework for modelling the dynamics of cut elimination. We introduce a typed version of GoI, called Multiobject GoI for both multiplicative linear logic (MLL) and multiplicative exponential linear logic (MELL) with units. We present a categorical setting that includes our previous (untyped) GoI models, as well as more general models based on monoidal *-categories. Our development of multiobject GoI depends on a new theory of partial traces and trace classes, which we believe is of independent interest, as well as an abstract notion of orthogonality (which is related to work of Hyland and Schalk). We develop Girard's original theory of types, data and algorithms in our setting, and show his execution formula to be an invariant of cut elimination (under some restrictions). We prove soundness theorems for the MGoI interpretation (for Multiplicative and Multiplicative Exponential Linear Logic) in partially traced *-categories with an orthogonality. Finally, we briefly discuss the relationship between our GoI interpretation and other categorical interpretations of GoI.
Read moreCall-by-Value λ-Graph Rewriting Without Rewriting
Girard’s Geometry of Interaction offers a low-level decomposition of the cut-elimination process in linear logic, which can be used as a compilation technique for functional programming languages. It is the basis of the Geometry of Interaction Machine, which performs call-by-name computations in graph representations of functional programs without doing any graph reduction. Computation is given by a graph traversal algorithm: a simple intuition is that of a single token traveling through a fixed graph (the program to be evaluated), unraveling the evaluation. Here we continue this line of research to derive alternative ways of following this execution path which give call-by-alue computations.
Read moreSharing Continuations: Proofnets for Languages with Explicit Control
We introduce graph reduction technology that implements functional languages with control, such as Scheme with call/cc, where continuations can be manipulated explicitly as values, and can be optimally reduced in the sense of LEvy. The technology is founded on proofnets for multiplicative-exponential linear logic, extending the techniques originally proposed by Lamping, where we adapt the continuation-passing style transformation to yield a new understanding of sharable values. Confluence is maintained by returning multiple answers to a (shared) continuation. Proofnets provide a concurrent version of linear logic proofs, eliminating structurally irrelevant sequentialization, and ignoring asymmetric distinctions between inputs and outputs--dually, expressions and continuations. While Lamping's graphs and their variants encode an embedding of intuitionistic logic into linear logic, our construction implicitly contains an embedding of classical logic into linear logic. We propose a family of translations, produced uniformly by beginning with a continuation-passing style semantics for the languages, employing standard codings into proofnets using call-by-value, call-by-name--or hybrids of the two--to locate proofnet boxes, and converting the proofnets to direct style. The resulting graphs can be reduced simply (cut elimination for linear logic), have a consistent semantics that is preserved by reduction (geometry of interaction, via the so-called context semantics), and allow shared, incremental evaluation of continuations (optimal reduction).
Read moreLe concept d’opérateur en linguistique
Linguists do not always use the term “ operator” clearly. Still, applying an operator to an operand is a basic operation in some applicative formalisms (λ-calculus, combinatory logics, functional programming) used by linguists. An operator is associated to syncategorematic linguistic expressions. Church’s functional types are a suitable formalization of different types of operators in Categorial Grammars. Since linguistic units are viewed as operators, they can be composed by means of the combinators of Curry’s Combinatory Logic. A formal link between application and implication in propositional calculus explains the relevance of the Curry-Howard correspondence between functional types and the implication in propositional calculus ; this correspondence is evaluated in the field of linguistics.
Read moreA nonstandard standardization theorem
Standardization is a fundamental notion for connecting programming languages and rewriting calculi. Since both programming languages and calculi rely on substitution for defining their dynamics, explicit substitutions (ES) help further close the gap between theory and practice. This paper focuses on standardization for the linear substitution calculus, a calculus with ES capable of mimicking reduction in lambda-calculus and linear logic proof-nets. For the latter, proof-nets can be formalized by means of a simple equational theory over the linear substitution calculus. Contrary to other extant calculi with ES, our system can be equipped with a residual theory in the sense of Lévy, which is used to prove a left-to-right standardization theorem for the calculus with ES but without the equational theory. Such a theorem, however, does not lift from the calculus with ES to proof-nets, because the notion of left-to-right derivation is not preserved by the equational theory. We then relax the notion of left-to-right standard derivation, based on a total order on redexes, to a more liberal notion of standard derivation based on partial orders. Our proofs rely on Gonthier, Lévy, and Melliès' axiomatic theory for standardization. However, we go beyond merely applying their framework, revisiting some of its key concepts: we obtain uniqueness (modulo) of standard derivations in an abstract way and we provide a coinductive characterization of their key abstract notion of external redex. This last point is then used to give a simple proof that linear head reduction --a nondeterministic strategy having a central role in the theory of linear logic-- is standard.
Read moreMusings around the geometry of interaction, and coherence
Musings around the geometry of interaction, and coherence
Resource Management in Linear Logic Proof Search Revisited
Linear logic provides a logical framework to express fundamental computational concepts in a declarative style. As a consequence, it has been used as a sound foundation for the design of expressive programming and specification languages. Unfortunately, linearity is as convenient for specifying as difficult to implement. In particular, the successful implementation of linear logic languages and provers involving context splitting strongly depends on the efficiency of the method computing a suitable split. A number of solutions have been proposed, referred to as lazy splitting or resource management systems. In this paper, we present a new resource management system for the Lolli linear logic language. We show that the choice of the structure employed to represent the contexts has a strong influence on the overall performance of the resource management system. We also estimate the performance of previous proposals, and compare them to our new system.KeywordsLinear LogicLogic ProgrammingLolliImplementationLazy Splitting
Read more