scholarly journals Using Category Theory to Design Programming Languages

Author(s):  
John C. Reynolds
Author(s):  
Ash Asudeh ◽  
Gianluca Giorgolo

This book presents a theory of enriched meanings for natural language interpretation. Certain expressions that exhibit complex effects at the semantics/pragmatics boundary live in an enriched meaning space while others live in a more basic meaning space. These basic meanings are mapped to enriched meanings just when required compositionally, which avoids generalizing meanings to the worst case. The theory is captured formally using monads, a concept from category theory. Monads are also prominent in functional programming and have been successfully used in the semantics of programming languages to characterize certain classes of computation. They are used here to model certain challenging linguistic computations at the semantics/pragmatics boundary. Part I presents some background on the semantics/pragmatics boundary, informally presents the theory of enriched meanings, reviews the linguistic phenomena of interest, and provides the necessary background on category theory and monads. Part II provides novel compositional analyses of the following phenomena: conventional implicature, substitution puzzles, and conjunction fallacies. Part III explores the prospects of combining monads, with particular reference to these three cases. The authors show that the compositional properties of monads model linguistic intuitions about these cases particularly well. The book is an interdisciplinary contribution to Cognitive Science: These phenomena cross not just the boundary between semantics and pragmatics, but also disciplinary boundaries between Linguistics, Philosophy and Psychology, three of the major branches of Cognitive Science, and are here analyzed with techniques that are prominent in Computer Science, a fourth major branch. A number of exercises are provided to aid understanding, as well as a set of computational tools (available at the book's website), which also allow readers to develop their own analyses of enriched meanings.


1983 ◽  
Vol 12 (163) ◽  
Author(s):  
Nisse Husberg

Heterogeneous algebraic theories and algebras are treated in detail with examples showing how to model programming languages. All categorial concepts needed --- and only those --- are defined and explained assuming no earlier background in category theory. The presentation covers language grammars and syntax fairly well, but semantics is treated only in general terms.


1973 ◽  
Vol 7 (3) ◽  
pp. 304-317 ◽  
Author(s):  
David C. Rine

1992 ◽  
Vol 2 (1) ◽  
pp. 23-59 ◽  
Author(s):  
Andrea Asperti

AbstractIn the last two decades, category theory has become one of the main tools for the denotational investigation of programming languages. Taking advantage of the algebraic nature of the categorical semantics, and of the rewriting systems it suggests, it is possible to use these denotational descriptions as a base for research into more operational aspects of programming languages.This approach proves to be particularly interesting in the study and the definition of environment machines for functional languages. The reason is that category theory offers a simple and uniform language for handling terms and environments (substitutions), and for studying their interaction (through application).Several examples of known machines are discussed, among which the Categorical Abstract Machine of Cousineau et al. (1987) and Krivine's machine. Moreover, as an example of the power and fruitfulness of this approach, we define two original categorical machines. The first one is a variant of the CAM implementing a λ-calculus with both call-by-value and call-by-name as parameters passing modes. The second one is a variant of Krivine's machine performing complete reduction of λ-terms.


1991 ◽  
Vol 1 (2) ◽  
pp. 141-158 ◽  
Author(s):  
C. E. Martin ◽  
C. A. R. Hoare ◽  
He Jifeng

Category theory offers a unified mathematical framework for the study of specifications and programs in a variety of styles, such as procedural, functional and concurrent. One way that these different languages may be treated uniformly is by generalising the definitions of some standard categorical concepts. In this paper we reproduce in the generalised theory analogues of some standard theorems on isomorphism, and outline their applications to programming languages.


2016 ◽  
Vol 8 (2) ◽  
pp. 115-136 ◽  
Author(s):  
Konrad Grzanek

Abstract Using formal methods for software verification slowly becomes a standard in the industry. Overall it is a good idea to integrate as many checks as possible with the programming language. This is a major cause of the apparent success of strong typing in software, either performed on the compile time or dynamically, on runtime. Unfortunately, only some of the properties of software may be expressed in the type system of event the most sophisticated programming languages. Many of them must be performed dynamically. This paper presents a flexible library for the dynamically typed, functional programming language running in the JVM environment. This library offers its users a close to zero run-time overhead and strong mathematical background in category theory.


2018 ◽  
Vol 25 (3) ◽  
pp. 75
Author(s):  
Rafael Castro G. Silva ◽  
Karina Girardi Roggia ◽  
Cristiano Damiani Vasconcellos

Types systems of programming languages are becoming more and more sophisticated and, in some cases, they are based on concepts from Logic, Type Theory and Category Theory. Haskell is a language with a modern type system and it is often singled out as an example using such theories. This work presents a small formalization of the Haskell type system and an analysis based on the mentioned theories, including its relation with the Intuitionist Propositional Second Order Logic and its logical characteristics, if there is a category in its type system and how monads are just monoids in the category of Haskell's endofunctors.


Sign in / Sign up

Export Citation Format

Share Document