Results 11  20
of
32
What is a Purely Functional Language?
 Journal of Functional Programming
, 1998
"... Functional programming languages are informally classified into pure and impure languages. The precise meaning of this distinction has been a matter of controversy. We therefore investigate a formal definition of purity. We begin by showing that some proposed definitions that rely on confluence, sou ..."
Abstract

Cited by 14 (6 self)
 Add to MetaCart
Functional programming languages are informally classified into pure and impure languages. The precise meaning of this distinction has been a matter of controversy. We therefore investigate a formal definition of purity. We begin by showing that some proposed definitions that rely on confluence, soundness of the beta axiom, preservation of pure observational equivalences, and independence of the order of evaluation, do not withstand close scrutiny. We propose instead a definition based on parameterpassing independence. Intuitively, the definition implies that functions are pure mappings from arguments to results; the operational decision of how to pass the arguments is irrelevant. In the context of Haskell, our definition is consistent with the fact that the traditional callbyname denotational semantics coincides with the traditional callbyneed implementation. Furthermore, our definition is compatible with the streambased, continuationbased, and monadbased integration of computa...
Reasoning about Explicit and Implicit Representations of State
 YALE UNIVERSITY
, 1993
"... The semantics of imperative languages are often expressed in terms of a storepassing translation and an algebra for reasoning about stores. We axiomatize the semantics of several typical imperative languages via equational axioms by "inverting" the storepassing translation as well as t ..."
Abstract

Cited by 12 (4 self)
 Add to MetaCart
The semantics of imperative languages are often expressed in terms of a storepassing translation and an algebra for reasoning about stores. We axiomatize the semantics of several typical imperative languages via equational axioms by "inverting" the storepassing translation as well as the algebraic axioms for reasoning about the store. The inversion process is simple and systematic and results in theories that are similar to equational theories for imperative languages that have been derived in more complicated ways, and is likely to be applicable to languages other than those presented here.
Delimiting the Scope of Effects
 In Proceedings of the Conference on Functional Programming Languages and Computer Architecture
, 1993
"... Program fragments in functional languages may be observationally congruent in a language without effects (continuations, state, exceptions) but not in an extension with effects. We give a generic way to preserve pure functional congruences by means of an effects delimiter. The effects delimiter is ..."
Abstract

Cited by 11 (1 self)
 Add to MetaCart
(Show Context)
Program fragments in functional languages may be observationally congruent in a language without effects (continuations, state, exceptions) but not in an extension with effects. We give a generic way to preserve pure functional congruences by means of an effects delimiter. The effects delimiter is defined semantically using the retraction techniques of [14], but can also be given an operational semantics. We show that the effects delimiter restores observational congruences between purely functional pieces of code, thus achieving a modular separation between the purely functional language and its extensions. 1 Introduction Functional programming is a powerful paradigm, but it has long been recognized that purely functional programs are often inefficient and cumbersome. Many modern functional languages, e.g., SML [9], build in control and state features that strictly fall outside the functional paradigm. For example, SML of New Jersey includes a "callwithcurrentcontinuation" opera...
The Typed Polymorphic LabelSelective λCalculus
 IN PROC. ACM SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES
, 1994
"... Formal calculi of record structures have recently been a focus of active research. However, scarcely anyone has studied formally the dual notioni.e., argumentpassing to functions by keywords, and its harmonization with currying. We have. Recently, we introduced the labelselective calculus, a ..."
Abstract

Cited by 8 (0 self)
 Add to MetaCart
Formal calculi of record structures have recently been a focus of active research. However, scarcely anyone has studied formally the dual notioni.e., argumentpassing to functions by keywords, and its harmonization with currying. We have. Recently, we introduced the labelselective calculus, a conservative extension of calculus that uses a labeling of abstractions and applications to perform unordered currying. In other words, it enables some form of commutation between arguments. This improves program legibility, thanks to the presence of labels, and efficiency, thanks to argument commuting. In this paper, we propose a simply typed version of the calculus, then extend it to one with MLlike polymorphic types. For the latter calculus, we establish the existence of principal types and we give an algorithm to compute them. Thanks to the fact that labelselective calculus is a conservative extension of calculus by adding numeric labels to stand for argument positions, its...
A linear logic model of state
 Manuscript
, 1993
"... We propose an abstract formal model of state manipulation in the framework of Girard’s linear logic. Two issues motivate this work: how to describe the semantics of higherorder imperative programming languages and how to incorporate state manipulation in functional programming languages. The centra ..."
Abstract

Cited by 4 (0 self)
 Add to MetaCart
We propose an abstract formal model of state manipulation in the framework of Girard’s linear logic. Two issues motivate this work: how to describe the semantics of higherorder imperative programming languages and how to incorporate state manipulation in functional programming languages. The central idea is that a state is linear and “regenerative”, where the latter is the property of a value that generates a new value upon each use. Based on this, we define a type constructor for states and a “modality” type constructor for regenerative values. Just as Girard’s “of course ” modality allows him to express static values and intuitionistic logic within the framework of linear logic, our regenerative modality allows us to express dynamic values and imperative programs within the same framework. We demonstrate the expressiveness of the model by showing that a higherorder Algollike language can be embedded in it. 1
Type reconstruction for SCI
 Functional Programming, Glasgow 1995, Electronic Workshops in Computing
, 1996
"... We present atype reconstruction algorithm for SCIR [10], atype system for a language with syntactic control of interference. SCIR guarantees that terms of passive type do not cause any side e ects, and that distinct identi ers do not interfere. A reconstruction algorithm for this type system must de ..."
Abstract

Cited by 3 (3 self)
 Add to MetaCart
(Show Context)
We present atype reconstruction algorithm for SCIR [10], atype system for a language with syntactic control of interference. SCIR guarantees that terms of passive type do not cause any side e ects, and that distinct identi ers do not interfere. A reconstruction algorithm for this type system must deal with di erent kinds (passive and general) and di erent uses of identi ers (passive and active). In particular, there may not be a unique choice of kinds for type variables. Our work extends SCIR typings with kind constraints. We show that principal type schemes exist for this extended system and outline an algorithm for computing them. 1
Imperative Lambda Calculus Revisited
, 1997
"... Imperative Lambda Calculus is a type system designed to combine functional and imperative programming features in an orthogonal fashion without compromising the algebraic properties of functions. It has been noted that the original system is too restrictive and lacks the subject reduction property. ..."
Abstract

Cited by 3 (1 self)
 Add to MetaCart
(Show Context)
Imperative Lambda Calculus is a type system designed to combine functional and imperative programming features in an orthogonal fashion without compromising the algebraic properties of functions. It has been noted that the original system is too restrictive and lacks the subject reduction property. We define a revised type system that solves these problems using ideas from Reynolds's Syntactic Control of Interference. We also extend it to handle HindleyMilner style polymorphism and devise type reconstruction algorithms. A sophisticated constraint language is designed to formulate principal types for terms. 1 Introduction The recent research in programming languages has greatly clarified the interaction between imperative and functional programming. The conventional notion that functional programming and imperative statemanipulation are in conflict has been dispelled. Several programming languages have now been designed which combine functions and assignments without destroying algeb...
LabelSelective LambdaCalculi and Transformation Calculi
, 1994
"... The labelselective lambdacalculus, in its different variants, and its offspring, the transformation calculus, are the results of a research on the role of Currying in the lambda calculus. Currying is the simple trick by which functions of multiple arguments can be written in the lambda calculus, w ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
The labelselective lambdacalculus, in its different variants, and its offspring, the transformation calculus, are the results of a research on the role of Currying in the lambda calculus. Currying is the simple trick by which functions of multiple arguments can be written in the lambda calculus, which is essentialy monoargument. The idea is to transform a function on a pair, into a function whose result, once applied to its first argument, must be applied to its second one. That is f (a; b) = (f (a))(b). In our first system, the labelselective lambdacalculus, we give a method to curry starting from a labeled record, in place of a simple pair. The calculus we encode in has to be more complex than simple lambdacalculus, because of these labels, but it appears to keep the quasi totality of its properties. We have of course confluence, and models similar to lambda calculus; and we can apply both simple and polymorphic typings, for which we get strong normalization, as we had with la...
The Transformation Calculus
"... The lambdacalculus, by its ability to express any computable function, is theoretically able to represent any algorithm. However, notwithstanding their equivalence in expressiveness, it is not so easy to find a natural translation for algorithms described in an imperative way. The transformation ca ..."
Abstract
 Add to MetaCart
(Show Context)
The lambdacalculus, by its ability to express any computable function, is theoretically able to represent any algorithm. However, notwithstanding their equivalence in expressiveness, it is not so easy to find a natural translation for algorithms described in an imperative way. The transformation calculus, a conservative extension of lambdacalculus, corrects this flaw by reintroducing an implicit notion of state in the calculus. This calculus stays very close to lambdacalculus, and keeps most of its properties. We prove here its confluence. ANY OTHER IDENTIFYING INFORMATION OF THIS REPORT DISTRIBUTION STATEMENT First issue 40 copies. This technical report is available via anonymous FTP from ftp.is.s.utokyo.ac.jp (directory /pub/techreports). SUPPLEMENTARY NOTES REPORT DATE April 25, 1994 TOTAL NO. OF PAGES 19 WRITTEN LANGUAGE English NO. OF REFERENCES 17 DEPARTMENT OF INFORMATION SCIENCE Faculty of Science, University of Tokyo 731 Hongo, Bunkyoku Tokyo, 113 Japan Th...
The Transformation Calculus and its Typing
, 1993
"... Many calculi supporting a notion of state have been proposed. However this notion is nearly always based on the intuition of a store, that is a binding from name to values. The exception, monads, recently focused on for I/Os, suffers from its rigidity. The transformation calculus, an extension of la ..."
Abstract
 Add to MetaCart
(Show Context)
Many calculi supporting a notion of state have been proposed. However this notion is nearly always based on the intuition of a store, that is a binding from name to values. The exception, monads, recently focused on for I/Os, suffers from its rigidity. The transformation calculus, an extension of lambda calculus, shows another, more general way to do that. It is different from others in that no orthogonal reduction rule is added to fireduction, but only structural ones. We introduce here the transformation calculus, and give our approach to its typing. Fundamental properties, like confluence, have been shown, and two type systems, simple and polymorphic, are proposed. 1 Introduction What we call state is a complex notion. It can be as well the external state of a device (like for I/O), the internal value of a variable, which changes during the evaluation, or even, why not, a local value. What makes it a state is fundamentally the way we look at it, the meaning we give to it. The answ...