Results 1 - 10
of
23
The Semantics of Future and Its Use in Program Optimization
- Rice University
, 1995
"... The future annotations of MultiLisp provide a simple method for taming the implicit parallelism of functional programs. Past research concerning futures has focused on implementation issues. In this paper, we present a series of operational semantics for an idealized functional language with futures ..."
Abstract
-
Cited by 44 (4 self)
- Add to MetaCart
The future annotations of MultiLisp provide a simple method for taming the implicit parallelism of functional programs. Past research concerning futures has focused on implementation issues. In this paper, we present a series of operational semantics for an idealized functional language with futures with varying degrees of intensionality. We develop a set-based analysis algorithm from the most intensional semantics, and use that algorithm to perform touch optimization on programs. Experiments with the Gambit compiler indicates that this optimization substantially reduces program execution times. 1 Implicit Parallelism via Annotations Programs in functional languages offer numerous opportunities for executing program components in parallel. In a call-by-value language, for example, the evaluation of every function application could spawn a parallel thread for each sub-expression. However, if such a strategy were applied indiscriminately, the execution of a program would generate far t...
A Syntactic Theory of Dynamic Binding
- Higher-Order and Symbolic Computation
, 1997
"... . Dynamic binding, which has always been associated with Lisp, is still semantically obscure to many. Although largely replaced by lexical scoping, not only does dynamic binding remain an interesting and expressive programming technique in specialised circumstances, but also it is a key notion in se ..."
Abstract
-
Cited by 26 (1 self)
- Add to MetaCart
. Dynamic binding, which has always been associated with Lisp, is still semantically obscure to many. Although largely replaced by lexical scoping, not only does dynamic binding remain an interesting and expressive programming technique in specialised circumstances, but also it is a key notion in semantics. This paper presents a syntactic theory that enables the programmer to perform equational reasoning on programs using dynamic binding. The theory is proved to be sound and complete with respect to derivations allowed on programs in "dynamic-environment passing style". From this theory, we derive a sequential evaluation function in a context-rewriting system. Then, we exhibit the power and usefulness of dynamic binding in two different ways. First, we prove that dynamic binding adds expressiveness to a purely functional language. Second, we show that dynamic binding is an essential notion in semantics that can be used to define the semantics of exceptions. Afterwards, we further refin...
Fine-grain Multithreading with Minimal Compiler Support -- A Cost Effective Approach to Implementing Efficient Multithreading Languages
- PLDI'97
, 1997
"... It is difficult to map the execution model of multithread-ing languages (languages which support fine-grain dynamic thread creation) onto the single stack execution model of C. Consequently, previous work on efficient multithreading uses elaborate frame formats and allocation strategy, with com-pile ..."
Abstract
-
Cited by 20 (5 self)
- Add to MetaCart
It is difficult to map the execution model of multithread-ing languages (languages which support fine-grain dynamic thread creation) onto the single stack execution model of C. Consequently, previous work on efficient multithreading uses elaborate frame formats and allocation strategy, with com-pilers customized for them. This paper presents an alterna-tive cost-effective implementation strategy for multithread-ing languages which can maximally exploit current sequen-tial C compilers. We identify a set of primitives whereby ef-ficient dynamic thread creation and switch can be achieved and clarify implementation issues and solutions which work under the stack frame layout and calling conventions of cur-rent C compilers. The primitives are implemented as a C library and named StackThreads. In StackThreads, a thread creation is done just by a C procedure call, max-imizing thread creation performance. When a procedure suspends an execution, the context of the procedure, which is roughly a stack frame of the procedure, is saved into heap and resumed later. With StackThreads, the compiler writer can straightforwardly translate sequential constructs of the source language into corresponding C statements or expres-sions, while using StackThreads primitives as a blackbox mechanism which switches execution between C procedures.
Polling Efficiently on Stock Hardware
- in Proceedings of the 1993 ACM SIGPLAN Conference on Functional Programming and Computer Architecture
, 1993
"... Two strategies for supporting asynchronous interrupts are: the use of the processor's hardware interrupt system and the use of polling. The advantages of polling include: portability, simplicity, and low cost for handling interrupts. Unfortunately, polling has an overhead for the explicit interrupt ..."
Abstract
-
Cited by 20 (5 self)
- Add to MetaCart
Two strategies for supporting asynchronous interrupts are: the use of the processor's hardware interrupt system and the use of polling. The advantages of polling include: portability, simplicity, and low cost for handling interrupts. Unfortunately, polling has an overhead for the explicit interrupt checks inserted in the code. This paper describes balanced polling , a method for placing the interrupt checks which has a low overhead and also guarantees an upper bound on interrupt latency. This method has been used by Gambit (an optimizing native code compiler for Scheme) to support a number of features including multiprocessing and stack overflow detection. The overhead of balanced polling is less than for call-return polling which places interrupt checks at every procedure entry and exit. The overhead of call-return polling is typically 70% larger (but sometimes over 400% larger) than the overhead of balanced polling. 1 Introduction In this paper, the term interrupt is defined as an ...
The Semantics of Scheme with Future
- In In ACM SIGPLAN International Conference on Functional Programming (ICFP'96
, 1996
"... future is an annotation by which the programmer indicates that some expressions may be evaluated in parallel. We present the formal semantics of future in a Scheme-like language which has both side-effects and first-class continuations. Correctness is established by proving that programs annotated b ..."
Abstract
-
Cited by 18 (7 self)
- Add to MetaCart
future is an annotation by which the programmer indicates that some expressions may be evaluated in parallel. We present the formal semantics of future in a Scheme-like language which has both side-effects and first-class continuations. Correctness is established by proving that programs annotated by future have the same observable behaviour as their non-annotated counterparts, even though evaluation may be parallel. In this paper, we describe four abstract machines that highlight different aspects of a programming language with future: (i) The CS-machine, a context-rewriting machine, can be regarded as the sequential semantics of the language we deal with. (ii) The P (CS)-machine, also a context-rewriting machine, considers future as a construct that may create parallelism. (iii) The F-PCKS-machine is a refinement of the second machine; it features an explicit shared memory, placeholders, and a notion of legitimacy. (iv) The fourth machine, called the F-PCEKS-machine, further refines...
A Provably Time-Efficient Parallel Implementation of Full Speculation
- In Proceedings of the 23rd ACM Symposium on Principles of Programming Languages
, 1996
"... Speculative evaluation, including leniency and futures, is often used to produce high degrees of parallelism. Existing speculative implementations, however, may serialize computation because of their implementation of queues of suspended threads. We give a provably efficient parallel implementation ..."
Abstract
-
Cited by 15 (4 self)
- Add to MetaCart
Speculative evaluation, including leniency and futures, is often used to produce high degrees of parallelism. Existing speculative implementations, however, may serialize computation because of their implementation of queues of suspended threads. We give a provably efficient parallel implementation of a speculative functional language on various machine models. The implementation includes proper parallelization of the necessary queuing operations on suspended threads. Our target machine models are a butterfly network, hypercube, and PRAM. To prove the efficiency of our implementation, we provide a cost model using a profiling semantics and relate the cost model to implementations on the parallel machine models. 1 Introduction Futures, lenient languages, and several implementations of graph reduction for lazy languages all use speculative evaluation (call-by-speculation [15]) to expose parallelism. The basic idea of speculative evaluation, in this context, is that the evaluation of a...
Using MultiLisp for Solving Constraint Satisfaction Problems: An Application to Nucleic Acid 3D Structure Determination
- Lisp and Symbolic Computation
, 1994
"... Département d’informatique et de recherche opérationnelle, Université de Montréal, Montréal ..."
Abstract
-
Cited by 13 (2 self)
- Add to MetaCart
Département d’informatique et de recherche opérationnelle, Université de Montréal, Montréal
Correctness of a Distributed-Memory Model for Scheme
- In Second International Europar Conference (EURO-PAR'96), number 1123 in Lecture Notes in Computer Science
, 1996
"... We propose a high-level approach to program distributed applications; it is based on the annotation future by which the programmer specifies which expressions may be evaluated remotely in parallel. We present the CEKDS-Machine, an abstract machine with a distributed memory, able to evaluate Schemel ..."
Abstract
-
Cited by 10 (8 self)
- Add to MetaCart
We propose a high-level approach to program distributed applications; it is based on the annotation future by which the programmer specifies which expressions may be evaluated remotely in parallel. We present the CEKDS-Machine, an abstract machine with a distributed memory, able to evaluate Schemelike future-based programs. In this paper, we focus on the issue of task migration and prove that task migration is transparent to the user, i.e. task migration does not change the observable behaviour of programs. 1 Introduction Distributed systems are omnipresent: local area networks and the explosion of the Internet in the past years are particular illustrations of the ubiquity of distributed computing. A major research focus in this area has been the design of new languages or programming paradigms to develop distributed applications, like for instance PVM [8], MPI [6], Nexus [7], Cilk [1]. We argue that those systems were designed in the perspective of building high-performance distrib...
The PCKS-machine. an abstract machine for sound evaluation of parallel functional programs with first-class continuations
- In European Symposium on Programming (ESOP'94), number 788 in Lecture Notes in Computer Science
, 1994
"... Abstract. The PCKS-machine is an abstract machine that evaluates parallel functional programs with rst-class continuations. Parallelism is introduced by the construct pcall, which provides a fork-and-join type of parallelism. To the best of our knowledge, the PCKS-machine is the rst implementation o ..."
Abstract
-
Cited by 7 (3 self)
- Add to MetaCart
Abstract. The PCKS-machine is an abstract machine that evaluates parallel functional programs with rst-class continuations. Parallelism is introduced by the construct pcall, which provides a fork-and-join type of parallelism. To the best of our knowledge, the PCKS-machine is the rst implementation of such a language that is proved to have a transparent construct for parallelism: every program using such a construct returns the same result as in the absence of this construct. This machine is also characterised by the non-speculative invocation of continuations whose interest is illustrated in an application. 1
The semantics of Future
- Its Use in Program Optimizations. ACM Principles of Programming Languages
, 1994
"... The future annotation introduced by MultiLisp provides a simple method for taming the implicit parallelism of functional programs. Prior research on futures has concentrated on implementation and design issues, and has largely ignored the development ofasemantic characterization of futures. This pap ..."
Abstract
-
Cited by 7 (3 self)
- Add to MetaCart
The future annotation introduced by MultiLisp provides a simple method for taming the implicit parallelism of functional programs. Prior research on futures has concentrated on implementation and design issues, and has largely ignored the development ofasemantic characterization of futures. This paper presents four operational semantics for an idealized functional language with futures with varying degrees of intensionality. The rst semantics de nes future to be a semantically-transparent annotation. The second semantics interprets a future expression as a potentially parallel task. The third semantics explicates the coordination of parallel tasks and the need for touch operations on placeholder-strict arguments to certain primitive operations by introducing placeholder objects. The fourth and last semantics is a low-level re nement of the third semantics, which explicates just enough information to permit the smooth derivation of program analyses. The paper includes proofs showing the equivalence of

