Results 1 - 10
of
16
Debugging Standard ML Without Reverse Engineering
- In Proceedings of the 1990 ACM Conference on Lisp and Functional Programming
, 1990
"... We have built a novel and efficient replay debugger for our Standard ML compiler. Debugging facilities are provided by instrumenting the user's source code; this approach, made feasible by ML's safety property, is machineindependent and back-end independent. Replay is practical because ML is normall ..."
Abstract
-
Cited by 43 (3 self)
- Add to MetaCart
We have built a novel and efficient replay debugger for our Standard ML compiler. Debugging facilities are provided by instrumenting the user's source code; this approach, made feasible by ML's safety property, is machineindependent and back-end independent. Replay is practical because ML is normally used functionally, and our compiler uses continuation-passing style; thus most of the program's state can be checkpointed quickly and compactly using call-with-current-continuation. Together, instrumentation and replay support a simple and elegant debugger featuring full variable display, polymorphic type resolution, stack trace-back, breakpointing, and reverse execution, even though our compiler is very highly optimizing and has no run-time stack. 1. Introduction Traditional "source-level" debuggers do their real work at machine level. They rely on detailed information about the underlying machine model, compiler back end, and runtime system. Although debuggers typically have access to t...
A Dynamic Extent Control Operator for Partial Continuations
- In Conference Record of the Eighteenth Annual ACM Symposium on Principles of Programming Languages
, 1991
"... : A partial continuation is a prefix of the computation that remains to be done. We propose in this paper a new operator which precisely controls which prefix is to be abstracted into a partial continuation. This operator is strongly related to the notion of dynamic extent which we denotationally ch ..."
Abstract
-
Cited by 30 (6 self)
- Add to MetaCart
: A partial continuation is a prefix of the computation that remains to be done. We propose in this paper a new operator which precisely controls which prefix is to be abstracted into a partial continuation. This operator is strongly related to the notion of dynamic extent which we denotationally characterize. Some programming examples are commented and we also show how to express previously proposed control operators. A suggested implementation is eventually discussed. Keywords: continuation, partial continuation, dynamic and indefinite extent, escape feature. Continuations were introduced within denotational semantics to express the "rest of the computation" in these cases where some constructs of a language can alter it. Non local exits or jumps (stop, goto), exception handling, failure semantics in Prolog-like languages are usually described with continuations [Stoy 77, Schmidt 86]. The Scheme language [Rees & Clinger 86] offers procedural first-class continuations with indefinit...
Partial Evaluation for Higher-Order Languages with State
, 1996
"... We have designed and implemented an offline partial evaluator for a higher-order language with first-class references. Its distinguishing feature over other partial evaluators is its ability to perform assignments to local and global references at specialization time for a higher-order language. The ..."
Abstract
-
Cited by 23 (7 self)
- Add to MetaCart
We have designed and implemented an offline partial evaluator for a higher-order language with first-class references. Its distinguishing feature over other partial evaluators is its ability to perform assignments to local and global references at specialization time for a higher-order language. The partial evaluator consists of a region-based monovariant binding-time analysis and a specializer in essentially continuation-passing store-passing style, thus generalizing type-based binding-time analysis and continuation-based partial evaluation. The partial evaluator yields good results for realistic problems such as object-oriented programming, unification, and specializer generation. Keywords: higher-order programming, program transformation, partial evaluation, state Categories: D.1.1 Applicative (Functional) Programming, D.1.2 Automatic Programming, D.3.1 Formal Definitions and Theory, Semantics, D.3.2 Language Classifications, Applicative languages, D.3.4 Processors, I.2.2 Automatic...
Persistence + Undoability = Transactions
- In Proc. of HICSS-25
, 1992
"... Persistence means objects live potentially forever. Undoability means that any change to a program's store can potentially be undone. In our design and implementation of support for single-threaded nested transactions in Standard ML of New Jersey (SML/NJ), we provide persistence and undoability as o ..."
Abstract
-
Cited by 21 (9 self)
- Add to MetaCart
Persistence means objects live potentially forever. Undoability means that any change to a program's store can potentially be undone. In our design and implementation of support for single-threaded nested transactions in Standard ML of New Jersey (SML/NJ), we provide persistence and undoability as orthogonal features and combine them in a simple and elegant manner. We provide support for persistence through an SML interface that lets users manipulate a set of persistent roots and provides a save function that causes all data reachable from the persistent roots to be moved into the persistent heap. We provide support for undoability through an SML interface that exports two functions: checkpoint, which checkpoints the current store, and restore, which undoes all changes made to the previously checkpointed store. Finally, we succinctly define a higher-order function transact completely in terms of the interfaces for persistence and undoability. 1 Motivation 1.1 Revisiting Transactions ...
Purely Functional Representations of Catenable Sorted Lists.
- In Proceedings of the 28th Annual ACM Symposium on Theory of Computing
, 1996
"... The power of purely functional programming in the construction of data structures has received much attention, not only because functional languages have many desirable properties, but because structures built purely functionally are automatically fully persistent: any and all versions of a structur ..."
Abstract
-
Cited by 16 (5 self)
- Add to MetaCart
The power of purely functional programming in the construction of data structures has received much attention, not only because functional languages have many desirable properties, but because structures built purely functionally are automatically fully persistent: any and all versions of a structure can coexist indefinitely. Recent results illustrate the surprising power of pure functionality. One such result was the development of a representation of double-ended queues with catenation that supports all operations, including catenation, in worst-case constant time [19].
Purely Functional, Real-Time Deques with Catenation
- Journal of the ACM
, 1999
"... We describe an efficient, purely functional implementation of deques with catenation. In addition to being an intriguing problem in its own right, finding a purely functional implementation of catenable deques is required to add certain sophisticated programming constructs to functional programming ..."
Abstract
-
Cited by 12 (2 self)
- Add to MetaCart
We describe an efficient, purely functional implementation of deques with catenation. In addition to being an intriguing problem in its own right, finding a purely functional implementation of catenable deques is required to add certain sophisticated programming constructs to functional programming languages. Our solution has a worst-case running time of O(1) for each push, pop, inject, eject and catenation. The best previously known solution has an O(log k) time bound for the k deque operation. Our solution is not only faster but simpler. A key idea used in our result is an algorithmic technique related to the redundant digital representations used to avoid carry propagation in binary counting.
A Library of High Level Control Operators
- Lisp Pointers, ACM SIGPLAN Special Interest Publ. on Lisp
, 1993
"... Numerous high-level control operators, with various properties, exist in the literature. To understand or compare them is difficult since their definitions use quite different theoretical frameworks; moreover, to our knowledge, no implementation offers them all. This paper tries to explain control o ..."
Abstract
-
Cited by 11 (0 self)
- Add to MetaCart
Numerous high-level control operators, with various properties, exist in the literature. To understand or compare them is difficult since their definitions use quite different theoretical frameworks; moreover, to our knowledge, no implementation offers them all. This paper tries to explain control operators by the often simple stack manipulation they perform. We therefore present what we think these operators are, in an executable framework derived from abstract continuations. This library is published in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For instance, we do not claim our implementation to be faithful nor we attempt to formally derive these implementations from their original definitions. The goal is to give a flavor of what control operators are, from an implementation point of view. Last but worth to say, all errors are mine. Among the many existing control operators, w...
Making Data Structures Confluently Persistent
, 2001
"... We address a longstanding open problem of [10, 9], and present a general transformation that transforms any pointer based data structure to be confluently persistent. Such transformations for fully persistent data structures are given in [10], greatly improving the performance compared to the naive ..."
Abstract
-
Cited by 10 (0 self)
- Add to MetaCart
We address a longstanding open problem of [10, 9], and present a general transformation that transforms any pointer based data structure to be confluently persistent. Such transformations for fully persistent data structures are given in [10], greatly improving the performance compared to the naive scheme of simply copying the inputs. Unlike fully persistent data structures, where both the naive scheme and the fully persistent scheme of [10] are feasible, we show that the naive scheme for confluently persistent data structures is itself infeasible (requires exponential space and time). Thus, prior to this paper there was no feasible method for implementing confluently persistent data structures at all. Our methods give an exponential reduction in space and time compared to the naive method, placing confluently persistent data structures in the realm of possibility.

