# Imperative functional programming

@inproceedings{Jones1993ImperativeFP, title={Imperative functional programming}, author={S. Jones and P. Wadler}, booktitle={POPL '93}, year={1993} }

We present a new model, based on monads, for performing input/output in a non-strict, purely functional language. It is composable, extensible, efficient, requires no extensions to the type system, and extends smoothly to incorporate mixed-language working and in-place array updates.

#### Topics from this paper

#### 1,085 Citations

How to declare an imperative

- Computer Science
- CSUR
- 1997

This tutorial describes a solution to this problem based on a monad of interaction based on synchronous streams, continuations, linear logic, and side effects in a purely declarative language. Expand

Composable memory transactions

- Computer Science
- CACM
- 2008

This paper presents a new concurrency model, based on transactional memory, that offers far richer composition, and describes new modular forms of blocking and choice that have been inaccessible in earlier work. Expand

Reasoning About Deterministic Concurrent Functional I/O

- Computer Science
- IFL
- 2004

This paper develops a language for reasoning about concurrent functional I/O and proves that under certain conditions evaluation in this language is deterministic. Expand

Lazy functional state threads

- Computer Science
- PLDI '94
- 1994

This work presents a way of securely encapsulating stateful computations that manipulate multiple, named, mutable objects, in the context of a non-strict, purely-functional language, using parametricity. Expand

About classical logic and imperative programming

- Mathematics, Computer Science
- Annals of Mathematics and Artificial Intelligence
- 2005

It is shown how a λ-calculus system in second-order classical logic can modelize some aspects of imperative programming languages, such as assignment and escape instructions, by means of some simple examples. Expand

From Functional Programs to Interaction Nets via the Rewriting Calculus

- Computer Science
- Electron. Notes Theor. Comput. Sci.
- 2007

We use the @r-calculus as an intermediate language to compile functional languages with pattern-matching features, and give an interaction net encoding of the @r-terms arising from the compilation.… Expand

Composable memory transactions

- Computer Science
- Commun. ACM
- 2008

This paper presents a concurrency model, based on transactional memory, that offers far richer composition, and describes modular forms of blocking and choice that were inaccessible in earlier work. Expand

Variable elimination for building interpreters

- Computer Science
- ArXiv
- 2010

This paper builds an interpreter by reusing host language functions instead of recoding mechanisms of function application that are already available in the host language, and uses combinatory logic : lambda-abstractions are transformed into a composition of combinators. Expand

Combining Monads

- Computer Science
- Functional Programming
- 1992

This work describes how some monads may be combined with others to yield a combined monad, a way of structuring functional programs. Expand

Directions in Functional Programming for Real(-Time) Applications

- Computer Science
- EMSOFT
- 2001

This work addresses the use of types to classify properties of real-time computations and attempts to explain the relevance of functional programming concepts to the real- time applications domain. Expand

#### References

SHOWING 1-10 OF 78 REFERENCES

Linearity and Laziness

- Computer Science
- FPCA
- 1990

Wadler's proposal involves the use of a type system based on the linear logic of Girard that allows the programmer to specify the “natural” imperative operations without at the same time sacrificing the crucial property of referential transparency. Expand

Unboxed Values as First Class Citizens in a Non-Strict Functional Language

- Computer Science
- FPCA
- 1991

The code compiled from a non-strict functional program usually manipulates heap-allocated boxed numbers and optimises operations on boxed numbers into simpler operations on their unboxed forms. Expand

A semantic model of reference counting and its abstraction (detailed summary)

- Computer Science
- LFP '86
- 1986

Most interpreters for functional languages (as well as Lisp) employ at some level in the implementation a notion of sharing, whether manifested indirectly through an environment or directly via… Expand

The essence of functional programming

- Computer Science
- POPL '92
- 1992

This paper explores the use monads to structure functional programs and describes the relation between monads and the continuation-passing style in a compiler for Haskell that is written in Haskell. Expand

Integrating functional and imperative programming

- Computer Science
- LFP '86
- 1986

A class of programming languages that enables the advantages of functional and imperative computation to be combined within a single program, which is called fluent languages, which have distinct sublanguages forfunctional and imperative programming. Expand

Computational lambda-calculus and monads

- Mathematics, Computer Science
- [1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science
- 1989

The author gives a calculus based on a categorical semantics for computations, which provides a correct basis for proving equivalence of programs, independent from any specific computational model. Expand

Single-threaded polymorphic lambda calculus

- Mathematics, Computer Science
- [1990] Proceedings. Fifth Annual IEEE Symposium on Logic in Computer Science
- 1990

The primary goal of this study is to devise a method to express mutations to state in a modern (higher order, polymorphic, nonstrict) functional language, without sacrificing referential… Expand

Detecting global variables in denotational specifications

- Computer Science
- TOPL
- 1985

The criteria and transformation are useful for transforming denotational definitions into compilers and interpreters for imperative machines, for optimizing applicative programs, and for judging the suitability of semantic notations for describing imperative languages. Expand

On the Expressiveness of Purely Functional I/O Systems

- Computer Science
- 1989

A series of surprisingly simple translations between the three models of I/O are given, demonstrating that they are not as diierent as their programming styles suggest, and implying that the styles could be mixed within a single program. Expand

Assignments for Applicative Languages

- Computer Science
- FPCA
- 1991

A theoretical framework for adding assignments and dynamic data to functional languages without violating their semantic properties is proposed, and a new form of abstraction called observer is designed to encapsulate state-oriented computation from the remaining purely applicative computation. Expand