Results 1  10
of
17
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
Correctness of Monadic State: An Imperative CallbyNeed Calculus
 In Proc. 25th ACM Symposium on Principles of Programming Languages
, 1998
"... The extension of Haskell with a builtin state monad combines mathematical elegance with operational efficiency: ffl Semantically, at the source language level, constructs that act on the state are viewed as functions that pass an explicit store data structure around. ffl Operationally, at the imp ..."
Abstract

Cited by 20 (2 self)
 Add to MetaCart
The extension of Haskell with a builtin state monad combines mathematical elegance with operational efficiency: ffl Semantically, at the source language level, constructs that act on the state are viewed as functions that pass an explicit store data structure around. ffl Operationally, at the implementation level, constructs that act on the state are viewed as statements whose evaluation has the sideeffect of updating the implicit global store in place. There are several unproven conjectures that the two views are consistent. Recently, we have noted that the consistency of the two views is far from obvious: all it takes for the implementation to become unsound is one judiciouslyplaced betastep in the optimization phase of the compiler. This discovery motivates the current paper in which we formalize and show the correctness of the implementation of monadic state. For the proof, we first design a typed callbyneed language that models the intermediate language of the compiler, to...
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...
Efficient Distributed Memory Implementation of a Data Parallel Functional Language
 In Proceedings of the PARLE ’94, volume 817 of LNCS
, 1994
"... ..."
Rolling Your Own Mutable ADT  A Connection between Linear Types and Monads 
 In Proc. Symp. POPL '97, ACM
, 1997
"... A methodology is described whereby a linear ADT may be rigorously encapsulated within a state monad. A CPSlike translation from the original ADT axioms into monadic ones is also described and proven correct, so that reasoning can be accomplished at the monadic level without exposing the state. The ..."
Abstract

Cited by 13 (0 self)
 Add to MetaCart
(Show Context)
A methodology is described whereby a linear ADT may be rigorously encapsulated within a state monad. A CPSlike translation from the original ADT axioms into monadic ones is also described and proven correct, so that reasoning can be accomplished at the monadic level without exposing the state. The ADT axioms are suitably constrained by a linear type system to make this translation possible. This constraint also allows the state to be "updated in place," a notion made precise via a graphrewrite operational semantics. 1 Introduction In recent years, numerous proposals for I/O, destructive updates to data structures, mutable variables, nondeterminism, and concurrency have been put forth, all using monads to structure programs in such a way that details of the computation are effectively hidden and encapsulated [18, 20]. One of the most important uses of monads is in dealing with state, resulting in a style of programming referred to appropriately by Peyton Jones and Wadler as imperativ...
SingleThreaded Objects in ACL2
 Practical Aspects of Declarative Languages (PADL), volume 2257 of LNCS
, 1999
"... ACL2 is a firstorder applicative programming language based on Common Lisp. It is also a mathematical logic for which a mechanical theoremprover has been implemented in the style of the BoyerMoore theorem prover. The ACL2 system is used primarily in the modeling and verification of computer hardwa ..."
Abstract

Cited by 10 (2 self)
 Add to MetaCart
(Show Context)
ACL2 is a firstorder applicative programming language based on Common Lisp. It is also a mathematical logic for which a mechanical theoremprover has been implemented in the style of the BoyerMoore theorem prover. The ACL2 system is used primarily in the modeling and verification of computer hardware and software, where the executability of the language allows models to be used as prototype designs or "simulators." To support efficient execution of certain kinds of models, especially models of microprocessors, ACL2 provides "singlethreaded objects," structures with the usual "copy on write" applicative semantics but for which writes are implemented destructively. Syntactic restrictions insure consistency between the formal semantics and the implementation. The design of singlethreaded objects has been influenced both by the need to make execution efficient and the need to make proofs about them simple. We discuss the issues. 1 Background "ACL2" stands for "A Computational Logic for...
Call byName, Assignment and the Lambda Calculus
 In Proc. ACM Symposium on Principles of Programming Languages
, 1992
"... We define an extension of the callbyname lambda calculus with additional constructs and reduction rules that represent mutable variables and assignments. The extended calculus has neither a concept of an explicit store nor a concept of evaluation order; nevertheless, we show that programs in the c ..."
Abstract

Cited by 7 (5 self)
 Add to MetaCart
We define an extension of the callbyname lambda calculus with additional constructs and reduction rules that represent mutable variables and assignments. The extended calculus has neither a concept of an explicit store nor a concept of evaluation order; nevertheless, we show that programs in the calculus can be implemented using a singlethreaded store. We also show that the new calculus has the ChurchRosser property and that it is a conservative extension of classical lambda calculus with respect to operational equivalence; that is, all algebraic laws of the functional subset are preserved. 1 Introduction Are assignments harmful? Common wisdom in the functional programming community has it that they are: seemingly, they destroy referential transparency, they require a determinate evaluation order, and they weaken otherwise powerful type systems such as ML's. Consequently, programming languages with a strong functional orientation often forbid or at least discourage the use of assi...
A Second Year Course on Data Structures Based on Functional Programming
 Nijmegen (The Netherlands
, 1995
"... . In this paper, we make a proposal for a second year course on advanced programming, based on the functional paradigm. It assumes the existence of a first course on programming, also based on functional languages. Its main subject is data structures. We claim that advanced data structures and algo ..."
Abstract

Cited by 7 (1 self)
 Add to MetaCart
(Show Context)
. In this paper, we make a proposal for a second year course on advanced programming, based on the functional paradigm. It assumes the existence of a first course on programming, also based on functional languages. Its main subject is data structures. We claim that advanced data structures and algorithms can be better taught at the functional paradigm than at the imperative one, and that this can be done without losing efficiency. We also claim that, as a consequence of the higher level of abstraction of functional languages, more subjects can be covered in the given amount of time. In the paper, numerous examples of unusual data structures and algorithms are presented illustrating the contents and the philosophy of the proposed course. 1 Introduction The controversy about the use of a functional language as the first programming language is still alive. Several proposals have been made on a first programming course based on the functional paradigm or on a mixture of the functional a...
Partial Monadic Approach in Process Functional Language
 Acta Electrotechnica et Informatica
, 2003
"... This paper is devoted to manipulating the state in process functional language (PFL) using monadic approach [13,19], preserving at the same time the visibility of memory cells. Instead of exploiting just pure functional expressions, as it is done in Haskell, balanced binding of functional and state ..."
Abstract

Cited by 2 (2 self)
 Add to MetaCart
(Show Context)
This paper is devoted to manipulating the state in process functional language (PFL) using monadic approach [13,19], preserving at the same time the visibility of memory cells. Instead of exploiting just pure functional expressions, as it is done in Haskell, balanced binding of functional and state aspects of computation in PFL using monads is presented. Monadic approach in PFL is partial in the sense that it may be exploited at any hierarchical level of computation, concentrating to the points in which state manipulation and pure functional evaluation are switched. From this point of view, this paper contributes to a systematic joining of function and state aspects of computation.