Results 1  10
of
11
A Functional Theory of Local Names
, 1994
"... ## is an extension of the #calculus with a binding construct for local names. The extension has properties analogous to classical #calculus and preserves all observational equivalences of #. It is useful as a basis for modeling widespectrum languages that build on a functional core. 1 Introducti ..."
Abstract

Cited by 35 (2 self)
 Add to MetaCart
## is an extension of the #calculus with a binding construct for local names. The extension has properties analogous to classical #calculus and preserves all observational equivalences of #. It is useful as a basis for modeling widespectrum languages that build on a functional core. 1 Introduction Recentyears have given us a good deal of theoretical research on the interaction of imperative programming #exempli#ed byvariable assignment# and functional programming #exempli#ed by higher order functions# #3,6,19,21, 24#. The common method of all these works is to propose a #calculus extended with imperative features and to carry out an exploration of the operational semantics of the new calculus. Based on our own experience in devising such an extended # calculus #13#, the presentwork singles out the name, whose only observational property is its identity, as an essential componentofany such extension. We present a simple extension of the pure #calculus with names; we showby ex...
Implicit and Explicit Parallel Programming in Haskell
, 1993
"... Abstract It has often been suggested that functional languages provide an excellent basis for programming parallel computer systems. This is largely a result of the lack of side effects which makes it possible to evaluate the subexpressions of a given term without any risk of interference. On the ot ..."
Abstract

Cited by 31 (1 self)
 Add to MetaCart
(Show Context)
Abstract It has often been suggested that functional languages provide an excellent basis for programming parallel computer systems. This is largely a result of the lack of side effects which makes it possible to evaluate the subexpressions of a given term without any risk of interference. On the other hand, the lack of sideeffects has also been seen as a weakness of functional languages since it rules out many features of traditional imperative languages such as state, I/O and exceptions. These ideas can be simulated in a functional language but the resulting programs are sometimes unnatural and inefficient. On the bright side, recent work has shown how many of these features can be naturally incorporated into a functional language without compromising efficiency by expressing computations in terms of monads or continuations. Unfortunately, the &quot;singlethreading &quot; implied by these techniques often destroys many opportunities for parallelism. In this paper, we describe a simple extension to the Haskell I/O monad that allows a form of explicit highlevel concurrency. It is a simple matter to incorporate these features in a sequential implementation, and genuine parallelism can be obtained on a parallel machine. In addition, the inclusion of constructs for explicit concurrency enhances the use of Haskell as an executable specification language, since some programs are most naturally described as a composition of parallel processes. \Lambda This research was supported by ARPA via a subcontract to Intermetrics, Inc. 1
Monadic Encapsulation of Effects: A Revised Approach (Extended Version)
 Journal of Functional Programming
, 1999
"... Launchbury and Peyton Jones came up with an ingenious idea for embedding regions of imperative programming in a pure functional language like Haskell. The key idea was based on a simple modification of HindleyMilner's type system. Our first contribution is to propose a more natural encapsulati ..."
Abstract

Cited by 30 (5 self)
 Add to MetaCart
(Show Context)
Launchbury and Peyton Jones came up with an ingenious idea for embedding regions of imperative programming in a pure functional language like Haskell. The key idea was based on a simple modification of HindleyMilner's type system. Our first contribution is to propose a more natural encapsulation construct exploiting higherorder kinds, which achieves the same encapsulation effect, but avoids the ad hoc type parameter of the original proposal. The second contribution is a type safety result for encapsulation of strict state using both the original encapsulation construct and the newly introduced one. We establish this result in a more expressive context than the original proposal, namely in the context of the higherorder lambdacalculus. The third contribution is a type safety result for encapsulation of lazy state in the higherorder lambdacalculus. This result resolves an outstanding open problem on which previous proof attempts failed. In all cases, we formalize the intended implementations as simple bigstep operational semantics on untyped terms, which capture interesting implementation details not captured by the reduction semantics proposed previously. 1
Isolating Side Effects in Sequential Languages
 In Proceedings of the 22nd ACM SIGPLANSIGACT Symposium on Principles of Programming Languages (POPL’95
, 1995
"... It is well known that adding side effects to functional languages changes the operational equivalences of the language. We develop a new language construct, encap, that forces imperative pieces of code to behave purely functionally, i.e., without any visible side effects. The coercion operator enca ..."
Abstract

Cited by 19 (2 self)
 Add to MetaCart
(Show Context)
It is well known that adding side effects to functional languages changes the operational equivalences of the language. We develop a new language construct, encap, that forces imperative pieces of code to behave purely functionally, i.e., without any visible side effects. The coercion operator encap provides a means of extending the simple reasoning principles for equivalences of code in a functional language to a language with side effects. In earlier work [36], similar coercion operators were developed, but their correctness required the underlying functional language to include parallel operations. The coercion operators developed here are simpler and are proven correct for purely sequential languages. The sequential setting requires the construction of fully abstract models for sequential callbyvalue languages and the formulation of a weak form of "monad" suitable for expressing the semantics of callbyvalue languages with side effects. 1 Introduction Two pieces of code are...
The Formal Relationship Between Direct and ContinuationPassing Style Optimizing Compilers: A Synthesis of Two Paradigms
, 1994
"... Compilers for higherorder programming languages like Scheme, ML, and Lisp can be broadly characterized as either "direct compilers" or "continuationpassing style (CPS) compilers", depending on their main intermediate representation. Our central result is a precise correspondenc ..."
Abstract

Cited by 15 (0 self)
 Add to MetaCart
Compilers for higherorder programming languages like Scheme, ML, and Lisp can be broadly characterized as either "direct compilers" or "continuationpassing style (CPS) compilers", depending on their main intermediate representation. Our central result is a precise correspondence between the two compilation strategies. Starting from
Note on algol and conservatively extending functional programming
 Journal of Functional Programming
, 1995
"... ..."
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...
Doctor Thesis 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
 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 lambda calculus. An immediate application of such a system is to add outoforder labeled application to curried functional languages, like ML. Since Currying introduces partial applications,
Conservative Extensions of Polymorphic PCF
, 1996
"... We prove that product and sum types are definable in polymorphic PCF with callbyname evaluation strategy. This establishes polymorphic PCF and its extensions can be conservatively extended by product and sum types and recursive types. 1. Introduction When we employ typed calculi to investigate a ..."
Abstract
 Add to MetaCart
(Show Context)
We prove that product and sum types are definable in polymorphic PCF with callbyname evaluation strategy. This establishes polymorphic PCF and its extensions can be conservatively extended by product and sum types and recursive types. 1. Introduction When we employ typed calculi to investigate a complex programming language, it is often useful to concentrate first on a "basic but sufficient" typed calculus and then on its extensions by the corresponding syntax constructs. One of such basic and sufficient calculi is PCF, which is a typed calculus to compute integers with fixpoint operator with an evaluation strategy 8 . The extensions by polymorphism, by records etc. has been investigated in theoretical computer science 4 . A central roll is played by "operational" equivalence of PCFterms, which captures the equivalence of programs. Here, the operational equivalence between M and N in a system L, written M ' L N , is roughly defined as follows: for any program context C[ ]...
A Generic Framework for Specialization (Abridged Version)
"... . We present a generic framework for specifying and implementing offline partial evaluators. The framework provides the infrastructure for specializing higherorder programs with computational effects specified through a monad. It performs sound specialization for all monadic instances and is ev ..."
Abstract
 Add to MetaCart
(Show Context)
. We present a generic framework for specifying and implementing offline partial evaluators. The framework provides the infrastructure for specializing higherorder programs with computational effects specified through a monad. It performs sound specialization for all monadic instances and is evaluationorder independent. It subsumes most previously published partial evaluators for higherorder functional programming languages in the sense that they are instances of the generic framework with respect to a particular monad. Keywords: higherorder programming, program transformation, partial evaluation, computational effects 1 Introduction A partial evaluator [10, 23] specializes a program with respect to a known part of its input. The resulting specialized program takes the rest of the input and delivers the same result as the original program applied to the whole input. The specialized program usually runs faster than the original one. One particular flavor of partial evalua...