Results 1 - 10
of
27
Single Intermediate Language That Supports Multiple Implementations of Exceptions
, 2000
"... We present mechanisms that enable our compiler-target language, C--, to express four of the best known techniques for implementing exceptions, all within a single, uniform framework. We define the mechanisms precisely, using a formal operational semantics. We also show that exceptions need not requi ..."
Abstract
-
Cited by 45 (18 self)
- Add to MetaCart
We present mechanisms that enable our compiler-target language, C--, to express four of the best known techniques for implementing exceptions, all within a single, uniform framework. We define the mechanisms precisely, using a formal operational semantics. We also show that exceptions need not require special treatment in the optimizer; by introducing extra dataflow edges, we make standard optimization techniques work even on programs that use exceptions. Our approach clarifies the design space of exceptionhandling techniques, and it allows a single optimizer to handle a variety of implementation techniques. Our ultimate goal is to allow a source-language compiler the freedom to choose its exception-handling policy, while encapsulating the architecture-dependent mechanisms and their optimization in an implementation of C-- that can be used by compilers for many source languages.
Implementation strategies for first-class continuations
- Higher-Order and Symbolic Computation
, 1999
"... Abstract. Scheme and Smalltalk continuations may have unlimited extent. This means that a purely stack-based implementation of continuations, as suffices for most languages, is inadequate. We review several implementation strategies for continuations and compare their performance using instruction c ..."
Abstract
-
Cited by 20 (1 self)
- Add to MetaCart
Abstract. Scheme and Smalltalk continuations may have unlimited extent. This means that a purely stack-based implementation of continuations, as suffices for most languages, is inadequate. We review several implementation strategies for continuations and compare their performance using instruction counts for the normal case and continuation-intensive synthetic benchmarks for other scenarios, including coroutines and multitasking. All of the strategies constrain a compiler in some way, resulting in indirect costs that are hard to measure directly. We use related measurements on a set of benchmarks to calculate upper bounds for these indirect costs.
An infrastructure for profile-driven dynamic recompilation
- ICCL'98, THE IEEE COMPUTER SOCIETY INTERNATIONAL CONFERENCE ON COMPUTER LANGUAGES
, 1998
"... ..."
On Exceptions versus Continuations in the Presence of State
- Programming Languages and Systems, 9th European Symposium on Programming, ESOP 2000,, number 1782 in LNCS
, 2000
"... . We compare the expressive power of exceptions and continuations when added to a language with local state in the setting of operational semantics. Continuations are shown to be more expressive than exceptions because they can cause a function call to return more than once, whereas exceptions only ..."
Abstract
-
Cited by 14 (3 self)
- Add to MetaCart
. We compare the expressive power of exceptions and continuations when added to a language with local state in the setting of operational semantics. Continuations are shown to be more expressive than exceptions because they can cause a function call to return more than once, whereas exceptions only allow discarding part of the calling context. 1 Introduction Exceptions are part of nearly all modern programming languages, including mainstream ones like Java and C++. Continuations are present only in Scheme and the New Jersey dialect of ML, yet are much more intensely studied by theoreticians and logicians. The relationship between exceptions and continuations is not as widely understood as one would hope, partly because continuations, though in some sense canonical, are more powerful than would at rst appear, and because the control aspect of exceptions can be obscured by intricacies of typing and syntax. We have recently shown that exceptions and continuations, when added to a purely...
From Control Effects to Typed Continuation Passing
- In 30th SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’03
, 2003
"... First-class continuations are a powerful computational effect, allowing the programmer to express any form of jumping. Types and effect systems can be used to reason about continuations, both in the source language and in the target language of the continuation-passing transform. In this paper, we e ..."
Abstract
-
Cited by 13 (1 self)
- Add to MetaCart
First-class continuations are a powerful computational effect, allowing the programmer to express any form of jumping. Types and effect systems can be used to reason about continuations, both in the source language and in the target language of the continuation-passing transform. In this paper, we establish the connection between an effect system for first-class continuations and typed versions of continuationpassing style. A region in the effect system determines a local answer type for continuations, such that the continuation transforms of pure expressions are parametrically polymorphic in their answer types. We use this polymorphism to derive transforms that make use of effect information, in particular, a mixed linear/non-linear continuation-passing transform, in which expressions without control effects are passed their continuations linearly.
Final Shift for Call/cc: Direct Implementation of Shift and Reset
, 2002
"... We present a direct implementation of the shift and reset control operators in the Scheme 48 system. The new implementation improves upon the traditional technique of simulating shift and reset via call/cc. Typical applications of these operators exhibit space savings and a significant overall perfo ..."
Abstract
-
Cited by 12 (0 self)
- Add to MetaCart
We present a direct implementation of the shift and reset control operators in the Scheme 48 system. The new implementation improves upon the traditional technique of simulating shift and reset via call/cc. Typical applications of these operators exhibit space savings and a significant overall performance gain. Our technique is based upon the popular incremental stack/heap strategy for representing continuations. We present implementation details as well as some benchmark measurements for typical applications.
Fast and Effective Procedure Inlining
- IN 4TH INTERNATIONAL SYMPOSIUM ON STATIC ANALYSIS
, 1997
"... Inlining is an important optimization for programs that use procedural abstraction. Because inlining trades code size for execution speed, the effectiveness of an inlining algorithm is determined not only by its ability to recognize inlining opportunities but also by its discretion in exercising tho ..."
Abstract
-
Cited by 11 (1 self)
- Add to MetaCart
Inlining is an important optimization for programs that use procedural abstraction. Because inlining trades code size for execution speed, the effectiveness of an inlining algorithm is determined not only by its ability to recognize inlining opportunities but also by its discretion in exercising those opportunities. This paper presents a new inlining algorithm for higher-order languages that combines simple analysis techniques with demand-driven online transformation to achieve consistent and often dramatic performance gains in fast linear time. Benchmark results reported here demonstrate that this inlining algorithm is as effective as and significantly faster than offline, analysis-intensive algorithms recently described in the literature.
Featherweight Concurrency in a Portable Assembly Language
, 2001
"... What abstractions should a reusable code generator provide to make it easy for a language implementor to compile a highly concurrent language? The implementation of concurrency is typically tightly interwoven with the code generator and run-time system of the high-level language. Our contribution is ..."
Abstract
-
Cited by 8 (0 self)
- Add to MetaCart
What abstractions should a reusable code generator provide to make it easy for a language implementor to compile a highly concurrent language? The implementation of concurrency is typically tightly interwoven with the code generator and run-time system of the high-level language. Our contribution is to tease out the tricky low-level concurrency mechanisms and to package them in an elegant way, so they can be reused by many front ends. This paper has been submitted to PLDI'01. 1 Introduction C-- is a compiler-target language intended to be independent of both source programming language and target architecture (Peyton Jones, Oliva, and Nordin 1997; Peyton Jones, Ramsey, and Reig 1999; Ramsey and Peyton Jones 2000). It acts as an interface between a front end and a reusable code generator. The idea is that the front end translates your favorite language into C--, leaving the C-- compiler to do the rest. C-- encapsulates compilation techniques that are well understood, but dicult to im...
Compiler Support for Lightweight Concurrency
, 2001
"... This paper describes our approach to implementing the concurrency features of the MOBY programming language. Our approach is based on our direct-style -calculus intermediate representation called BOL, which we have equipped with a weak but cheap form of continuations and primitives to support an abs ..."
Abstract
-
Cited by 8 (0 self)
- Add to MetaCart
This paper describes our approach to implementing the concurrency features of the MOBY programming language. Our approach is based on our direct-style -calculus intermediate representation called BOL, which we have equipped with a weak but cheap form of continuations and primitives to support an abstract model of thread creation, termination, and scheduling. This implementation strategy allows flexibility in both the design of MOBY's surface language concurrency features and in the runtime implementation. In addition, because our support for concurrency is integrated into the compiler's IR, we can use standard IR-based optimizations, such as inlining, to optimize concurrency code. In this paper, we describe BOL's continuations and thread manipulation primitives and illustrate their use in implementing various concurrency operations. We also describe our current implementation, which is a direct mapping onto POSIX threads, and we sketch a possible many-to-many implementation.

