Results 1 -
2 of
2
Representing Layered Monads
- PROCEEDINGS OF THE TWENTY-SIXTH ANNUAL ACM SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES
, 1999
"... There has already been considerable research on constructing modular, monad-based specications of computational effects (state, exceptions, nondeterminism, etc.) in programming languages. We present a simple framework in this tradition, based on a Church-style effect-typing system for an ML-like lan ..."
Abstract
-
Cited by 48 (2 self)
- Add to MetaCart
There has already been considerable research on constructing modular, monad-based specications of computational effects (state, exceptions, nondeterminism, etc.) in programming languages. We present a simple framework in this tradition, based on a Church-style effect-typing system for an ML-like language. The semantics of this language is formally dened by a series of monadic translations, each one expanding away a layer of effects. Such a layered specication is easy to reason about, but its direct implementation (whether by parameterized interpretation or by actual translation) is often prohibitively inefficient. By exploiting deeper semantic properties of monads, however, it is also possible to derive a vastly more efficient implementation: we show that each layer of eects can be uniformly simulated by continuation-passing, and further that multiple such layers can themselves be simulated by a standard semantics for call/cc and mutable state. Thus, even multi-effect programs can be execu...
A Modular Interpreter In Scheme With Objects
, 2000
"... The problem of writing modular interpreters for functional languages has largely been studied from the perspective of statically typed languages. This paper explores the use of an object-oriented extension of Scheme for this purpose, and nds it to be largely successful. Use of a dynamically typed la ..."
Abstract
- Add to MetaCart
The problem of writing modular interpreters for functional languages has largely been studied from the perspective of statically typed languages. This paper explores the use of an object-oriented extension of Scheme for this purpose, and nds it to be largely successful. Use of a dynamically typed language has the advantages of greater uniformity and exibility. 1 The Problem of Extensibility, the Test Case of Modular Interpreters and the Search for a Solution in Object-Oriented Programming Extensibility is the ability of a program to be adapted to new tasks without accessing its source code [7]. Interpreters make an interesting extensibility problem, because in the terminology of Duponcheel [4], there are both syntactic and semantic aspects. By syntax, here, he means abstract syntax, i.e., the logical structure of expressions. By semantics, he means the computations and values engendered by those expressions. This extensibility problem should be contrasted with another that has also...

