What is a categorical model of the differential and the resource λ-calculi?

2012 ◽  
Vol 22 (3) ◽  
pp. 451-520 ◽  
Author(s):  
GIULIO MANZONETTO

The differential λ-calculus is a paradigmatic functional programming language endowed with a syntactical differentiation operator that allows the application of a program to an argument in a linear way. One of the main features of this language is that it is resource conscious and gives the programmer suitable primitives to handle explicitly the resources used by a program during its execution. The differential operator also allows us to write the full Taylor expansion of a program. Through this expansion, every program can be decomposed into an infinite sum (representing non-deterministic choice) of ‘simpler’ programs that are strictly linear.The aim of this paper is to develop an abstract ‘model theory’ for the untyped differential λ-calculus. In particular, we investigate what form a general categorical definition of a denotational model for this calculus should take. Starting from the work of Blute, Cockett and Seely on differential categories, we develop the notion of a Cartesian closed differential category and prove that linear reflexive objects living in such categories constitute sound and complete models of the untyped differential λ-calculus. We also give sufficient conditions for Cartesian closed differential categories to model the Taylor expansion. This requires that every model living in such categories equates all programs having the same full Taylor expansion.We then provide a concrete example of a Cartesian closed differential category modelling the Taylor expansion, namely the category MRel of sets and relations from finite multisets to sets. We prove that the extensional model of λ-calculus we have recently built in MRel is linear, and is thus also an extensional model of the untyped differential λ-calculus. In the same category, we build a non-extensional model and prove that it is, nevertheless, extensional on its differential part.Finally, we study the relationship between the differential λ-calculus and the resource calculus, which is a functional programming language combining the ideas behind the differential λ-calculus with those behind Boudol's λ-calculus with multiplicities. We define two translation maps between these two calculi and study the properties of these translations. In particular, this analysis shows that the two calculi share the same notion of a model, and thus that the resource calculus can be interpreted by translation into every linear reflexive object living in a Cartesian closed differential category.

2007 ◽  
Vol 17 (1) ◽  
pp. 131-143 ◽  
Author(s):  
DAVID WAKELING

AbstractThe functional programming community has shown some interest in spreadsheets, but surprisingly no one seems to have considered making a standard spreadsheet, such as Excel, work with a standard functional programming language, such as Haskell. In this paper, we show one way that this can be done. Our hope is that by doing so, we might get spreadsheet programmers to give functional programming a try.


Author(s):  
Juan Guti´errez-C´ardenas ◽  
Hernan Quintana-Cruz ◽  
Diego Mego-Fernandez ◽  
Serguei Diaz-Baskakov

1991 ◽  
Vol 1 (1) ◽  
pp. 3-20 ◽  
Author(s):  
F. Warren Burton

AbstractA parallel program may be indeterminate so that it can adapt its behavior to the number of processors available.Indeterminate programs are hard to write, understand, modify or verify. They are impossible to debug, since they may not behave the same from one run to the next.We propose a new construct, a polymorphic abstract data type called an improving value, with operations that have indeterminate behavior but simple determinate semantics. These operations allow the type of indeterminate behavior required by many parallel algorithms.We define improving values in the context of a functional programming language, but the technique can be used in procedural programs as well.


1995 ◽  
Vol 5 (1) ◽  
pp. 81-110 ◽  
Author(s):  
Peter Achten ◽  
Rinus Plasmeijer

AbstractFunctional programming languages have banned assignment because of its undesirable properties. The reward of this rigorous decision is that functional programming languages are side-effect free. There is another side to the coin: because assignment plays a crucial role in Input/Output (I/O), functional languages have a hard time dealing with I/O. Functional programming languages have therefore often been stigmatised as inferior to imperative programming languages because they cannot deal with I/O very well. In this paper, we show that I/O can be incorporated in a functional programming language without loss of any of the generally accepted advantages of functional programming languages. This discussion is supported by an extensive account of the I/O system offered by the lazy, purely functional programming language Clean. Two aspects that are paramount in its I/O system make the approach novel with respect to other approaches. These aspects are the technique of explicit multiple environment passing, and the Event I/O framework to program Graphical User I/O in a highly structured and high-level way. Clean file I/O is as powerful and flexible as it is in common imperative languages (one can read, write, and seek directly in a file). Clean Event I/O provides programmers with a high-level framework to specify complex Graphical User I/O. It has been used to write applications such as a window-based text editor, an object based drawing program, a relational database, and a spreadsheet program. These graphical interactive programs are completely machine independent, but still obey the look-and-feel of the concrete window environment being used. The specifications are completely functional and make extensive use of uniqueness typing, higher-order functions, and algebraic data types. Efficient implementations are present on the Macintosh, Sun (X Windows under Open Look) and PC (OS/2).


Sign in / Sign up

Export Citation Format

Share Document