Results 1 -
9 of
9
Implicit and Explicit Parallel Programming in Haskell
, 1993
"... Abstract It has often been suggested that functional languages provide an excellent basis for programming parallel computer systems. This is largely a result of the lack of side effects which makes it possible to evaluate the subexpressions of a given term without any risk of interference. On the ot ..."
Abstract
-
Cited by 29 (1 self)
- Add to MetaCart
Abstract It has often been suggested that functional languages provide an excellent basis for programming parallel computer systems. This is largely a result of the lack of side effects which makes it possible to evaluate the subexpressions of a given term without any risk of interference. On the other hand, the lack of side-effects has also been seen as a weakness of functional languages since it rules out many features of traditional imperative languages such as state, I/O and exceptions. These ideas can be simulated in a functional language but the resulting programs are sometimes unnatural and inefficient. On the bright side, recent work has shown how many of these features can be naturally incorporated into a functional language without compromising efficiency by expressing computations in terms of monads or continuations. Unfortunately, the "single-threading " implied by these techniques often destroys many opportunities for parallelism. In this paper, we describe a simple extension to the Haskell I/O monad that allows a form of explicit high-level concurrency. It is a simple matter to incorporate these features in a sequential implementation, and genuine parallelism can be obtained on a parallel machine. In addition, the inclusion of constructs for explicit concurrency enhances the use of Haskell as an executable specification language, since some programs are most naturally described as a composition of parallel processes. \Lambda This research was supported by ARPA via a subcontract to Intermetrics, Inc. 1
Monadic Encapsulation of Effects: A Revised Approach (Extended Version)
- Journal of Functional Programming
, 1999
"... Launchbury and Peyton Jones came up with an ingenious idea for embedding regions of imperative programming in a pure functional language like Haskell. The key idea was based on a simple modification of Hindley-Milner's type system. Our first contribution is to propose a more natural encapsulation co ..."
Abstract
-
Cited by 27 (4 self)
- Add to MetaCart
Launchbury and Peyton Jones came up with an ingenious idea for embedding regions of imperative programming in a pure functional language like Haskell. The key idea was based on a simple modification of Hindley-Milner's type system. Our first contribution is to propose a more natural encapsulation construct exploiting higher-order kinds, which achieves the same encapsulation effect, but avoids the ad hoc type parameter of the original proposal. The second contribution is a type safety result for encapsulation of strict state using both the original encapsulation construct and the newly introduced one. We establish this result in a more expressive context than the original proposal, namely in the context of the higher-order lambda-calculus. The third contribution is a type safety result for encapsulation of lazy state in the higher-order lambda-calculus. This result resolves an outstanding open problem on which previous proof attempts failed. In all cases, we formalize the intended implementations as simple big-step operational semantics on untyped terms, which capture interesting implementation details not captured by the reduction semantics proposed previously. 1
Monadic Encapsulation in ML
- In Proceedings of the 4th ACM SIGPLAN International Conference on Functional Programming (ICFP’99
, 1999
"... In a programming language with procedures and assignments, it is often important to isolate uses of state to particular program fragments. The frameworks of type, region, and effect inference, and monadic state are technologies that have been used to state and enforce the property that an expression ..."
Abstract
-
Cited by 15 (2 self)
- Add to MetaCart
In a programming language with procedures and assignments, it is often important to isolate uses of state to particular program fragments. The frameworks of type, region, and effect inference, and monadic state are technologies that have been used to state and enforce the property that an expression has no visible side-effects. This property has been exploited to justify the deallocation of memory regions despite the presence of dangling pointers. Starting from an idea developed in the context of monadic state in Haskell, we develop an ML-like language with full assignments and an operator that enforces the encapsulation of effects. Using this language, we formalize and prove the folklore connection between effect masking and monadic encapsulation. Then, by employing a novel set of reductions to deal with dangling pointers, we establish the soundness of the type-based encapsulation with a proof based on a standard subject reduction argument. 1 Introduction Two of the recurring theme...
Type System of an Object-Oriented Database Programming Language (Extended Abstract)
- ACM Computing Surveys (CSUR
, 1999
"... In this paper we present the type system of the TIGUKAT database programming language. It is a highly parametric object-oriented type system that combines multiple dispatch with reflexivity, separation of interface and implementation, precise behavior typing, and union and intersection types. We dem ..."
Abstract
-
Cited by 7 (0 self)
- Add to MetaCart
In this paper we present the type system of the TIGUKAT database programming language. It is a highly parametric object-oriented type system that combines multiple dispatch with reflexivity, separation of interface and implementation, precise behavior typing, and union and intersection types. We demonstrate the inner workings of the type system by considering a concrete example of type specification in TIGUKAT. We also review type systems of several existing programming languages and conclude that the proposed type system has a unique combination of features particularly suited for object-oriented database programming. This is an expanded version of the extended abstract submitted to DBPL 97. 1 INTRODUCTION 1 1 Introduction In the past two decades, several new database application areas have emerged. These new areas include office automation systems, geographical information systems, CASE tools, medical systems, and CAD/CAM systems. These complicated applications demand new, more ...
Imperative Lambda Calculus Revisited
, 1997
"... Imperative Lambda Calculus is a type system designed to combine functional and imperative programming features in an orthogonal fashion without compromising the algebraic properties of functions. It has been noted that the original system is too restrictive and lacks the subject reduction property. ..."
Abstract
-
Cited by 3 (1 self)
- Add to MetaCart
Imperative Lambda Calculus is a type system designed to combine functional and imperative programming features in an orthogonal fashion without compromising the algebraic properties of functions. It has been noted that the original system is too restrictive and lacks the subject reduction property. We define a revised type system that solves these problems using ideas from Reynolds's Syntactic Control of Interference. We also extend it to handle Hindley-Milner style polymorphism and devise type reconstruction algorithms. A sophisticated constraint language is designed to formulate principal types for terms. 1 Introduction The recent research in programming languages has greatly clarified the interaction between imperative and functional programming. The conventional notion that functional programming and imperative state-manipulation are in conflict has been dispelled. Several programming languages have now been designed which combine functions and assignments without destroying algeb...
Type reconstruction for SCI
- Functional Programming, Glasgow 1995, Electronic Workshops in Computing
, 1996
"... We present atype reconstruction algorithm for SCIR [10], atype system for a language with syntactic control of interference. SCIR guarantees that terms of passive type do not cause any side e ects, and that distinct identi ers do not interfere. A reconstruction algorithm for this type system must de ..."
Abstract
-
Cited by 3 (3 self)
- Add to MetaCart
We present atype reconstruction algorithm for SCIR [10], atype system for a language with syntactic control of interference. SCIR guarantees that terms of passive type do not cause any side e ects, and that distinct identi ers do not interfere. A reconstruction algorithm for this type system must deal with di erent kinds (passive and general) and di erent uses of identi ers (passive and active). In particular, there may not be a unique choice of kinds for type variables. Our work extends SCIR typings with kind constraints. We show that principal type schemes exist for this extended system and outline an algorithm for computing them. 1
Calculi for Functional Programming Languages with Assignment
, 1996
"... Calculi for Functional Programming Languages with Assignment Daniel Eli Rabin 1996 Pure functional programming and imperative programming appear to be contradictory approaches to the design of programming languages. Pure functional programming insists that variables have unchanging bindings and tha ..."
Abstract
-
Cited by 3 (0 self)
- Add to MetaCart
Calculi for Functional Programming Languages with Assignment Daniel Eli Rabin 1996 Pure functional programming and imperative programming appear to be contradictory approaches to the design of programming languages. Pure functional programming insists that variables have unchanging bindings and that these bindings may be substituted freely for occurrences of the variables. Imperative programming, however, relies for its computational power on the alteration of variable bindings by the action of the program. One particular approach to merging the two design principles into the same programming language introduces a notion of assignable variable distinct from that of functionally bound variable. In this approach, functional programming languages are extended with new syntactic constructs denoting sequences of actions, including assignment to and reading from assignable variables. Swarup, Reddy and Ireland have proposed a typed lambda-calculus in this style as a foundation for programmin...
Type reconstruction for syntactic control of interference, part 2
- Loyola University, Chicago
, 1998
"... Syntactic Control of Interference (SCI) [17] has long been studied asabasis for interference-free programming, with cleaner reasoning properties and semantics than traditional imperative languages. This paper improves upon Huang and Reddy's type inference system [7] for SCI-based languages in two si ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
Syntactic Control of Interference (SCI) [17] has long been studied asabasis for interference-free programming, with cleaner reasoning properties and semantics than traditional imperative languages. This paper improves upon Huang and Reddy's type inference system [7] for SCI-based languages in two signi cant ways. First, we eliminate the need for explicit coercion operators in terms. Second, we consider adding let-bound polymorphism, which appears to be nontrivial in the presence of interference control. SCI can be adapted to a wide variety of languages, and our techniques should be applicable to any such language with SCI-based interference control. 1
Type Reconstruction for SCI, Part 2
, 1997
"... Syntactic Control of Interference (SCI) [Rey78] has long been studied as a basis for interferencefree programming, with cleaner reasoning properties and semantics than traditional imperative languages. This paper makes SCI-based languages more practical by introducing a revised version of Huang and ..."
Abstract
- Add to MetaCart
Syntactic Control of Interference (SCI) [Rey78] has long been studied as a basis for interferencefree programming, with cleaner reasoning properties and semantics than traditional imperative languages. This paper makes SCI-based languages more practical by introducing a revised version of Huang and Reddy's type reconstruction system [HR96] with two significant improvements. First, we eliminate the need for explicit coercion operators in terms. Although this can lead to more complex principal typings, we introduce some minor restrictions on the inference system to keep the typings manageable. Second, we consider adding let-bound polymorphism. Such a modification appears to be nontrivial. We propose a new approach which addresses issues of both polymorphism and interference control. Some examples show the utility of our system. SCI can be adapted to a wide variety of languages, and our techniques should be applicable to any such language with SCI-based interference control. 1 Introducti...

