Results 1 - 10
of
21
A Syntactic Approach to Type Soundness
- Information and Computation
, 1992
"... We present a new approach to proving type soundness for Hindley/Milner-style polymorphic type systems. The keys to our approach are (1) an adaptation of subject reduction theorems from combinatory logic to programming languages, and (2) the use of rewriting techniques for the specification of the la ..."
Abstract
-
Cited by 490 (20 self)
- Add to MetaCart
We present a new approach to proving type soundness for Hindley/Milner-style polymorphic type systems. The keys to our approach are (1) an adaptation of subject reduction theorems from combinatory logic to programming languages, and (2) the use of rewriting techniques for the specification of the language semantics. The approach easily extends from polymorphic functional languages to imperative languages that provide references, exceptions, continuations, and similar features. We illustrate the technique with a type soundness theorem for the core of Standard ML, which includes the first type soundness proof for polymorphic exceptions and continuations. 1 Type Soundness Static type systems for programming languages attempt to prevent the occurrence of type errors during execution. A definition of type error depends on a specific language and type system, but always includes the use of a function on arguments for which it is not defined, and the attempted application of a non-function. ...
Lambda-Calculus Schemata
, 1993
"... A lambda-calculus schema is an expression of the lambda calculus augmented by uninterpreted constant and operator symbols. It is an abstraction of programming languages such as LISP which permit functions to be passed to and returned from other functions. When given an interpretation for its constan ..."
Abstract
-
Cited by 91 (1 self)
- Add to MetaCart
A lambda-calculus schema is an expression of the lambda calculus augmented by uninterpreted constant and operator symbols. It is an abstraction of programming languages such as LISP which permit functions to be passed to and returned from other functions. When given an interpretation for its constant and operator symbols, certain schemata, called lambda abstractions, naturally define partial functions over the domain of interpretation. Two implementation strategies are considered: the retention strategy in which all variable bindings are retained until no longer needed (implying the use of some sort of garbage-collected store) and the deletion strategy, modeled after the usual stack implementation of ALGOL 60, in which variable bindings are destroyed when control leaves the procedure (or block) in which they were created. Not all lambda abstractions evaluate correctly under the deletion strategy. Nevertheless, both strategies are equally powerful in the sense that any lambda abstraction can be mechanically translated into another that evaluates correctly under the deletion strategy and defines the same partial function over the domain of interpretation as the original. Proof is by translation into continuation-passing style.
Scheme: An interpreter for extended lambda calculus
- MEMO 349, MIT AI LAB
, 1975
"... Inspired by ACTORS [7, 17], we have implemented an interpreter for a LISP-like language, SCHEME, based on the lambda calculus [2], but extended for side effects, multiprocessing, and process synchronization. The purpose of this implementation is tutorial. We wish to: 1. alleviate the confusion cause ..."
Abstract
-
Cited by 64 (2 self)
- Add to MetaCart
Inspired by ACTORS [7, 17], we have implemented an interpreter for a LISP-like language, SCHEME, based on the lambda calculus [2], but extended for side effects, multiprocessing, and process synchronization. The purpose of this implementation is tutorial. We wish to: 1. alleviate the confusion caused by Micro-PLANNER, CONNIVER, etc., by clarifying the embedding of non-recursive control structures in a recursive host language like LISP. 2. explain how to use these control structures, independent of such issues as pattern matching and data base manipulation. 3. have a simple concrete experimental domain for certain issues of programming semantics and style. This paper is organized into sections. The first section is a short “reference manual ” containing specifications for all the unusual features of SCHEME. Next, we present a sequence of programming examples which illustrate various programming styles, and how to use them. This will raise certain issues of semantics which we will try to clarify with lambda calculus in the third section. In the fourth section we will give a general discussion of the issues facing an implementor of an interpreter for a language based on lambda calculus. Finally, we will present a completely annotated interpreter for SCHEME, written in MacLISP [13], to acquaint programmers with the tricks of the trade of implementing non-recursive control structures in a recursive language like LISP.
For a Better Support of Static Data Flow
- Functional Programming Languages and Computer Architecture
"... . This paper identifies and solves a class of problems that arise in binding time analysis and more generally in partial evaluation of programs: the approximation and loss of static information due to dynamic expressions with static subexpressions. Solving this class of problems yields substantial b ..."
Abstract
-
Cited by 58 (16 self)
- Add to MetaCart
. This paper identifies and solves a class of problems that arise in binding time analysis and more generally in partial evaluation of programs: the approximation and loss of static information due to dynamic expressions with static subexpressions. Solving this class of problems yields substantial binding time improvements and thus dramatically better results not only in the case of partial evaluation but also for static analyses of programs --- this last point actually is related to a theoretical result obtained by Nielson. Our work can also be interpreted as providing a solution to the problem of conditionally static data, the dual of partially static data. We point out which changes in the control flow of a source program may improve its static data flow. Unfortunately they require one to iterate earlier phases of partial evaluation. We show how these changes are subsumed by transforming the source program into continuation-passing style (CPS). The transformed programs get specializ...
Static and Dynamic Semantics Processing
- Proceedings of the Eighteenth Annual ACM Symposium on Principles of Programming Languages
, 1991
"... This paper presents a step forward in the use of partial evaluation for interpreting and compiling programs, as well as for automatically generating a compiler from denotational definitions of programming languages. We determine the static and dynamic semantics of a programming language, reduce the ..."
Abstract
-
Cited by 47 (25 self)
- Add to MetaCart
This paper presents a step forward in the use of partial evaluation for interpreting and compiling programs, as well as for automatically generating a compiler from denotational definitions of programming languages. We determine the static and dynamic semantics of a programming language, reduce the expressions representing the static semantics, and generate object code by instantiating the expressions representing the dynamic semantics. By processing the static semantics of the language, programs get compiled. By processing the static semantics of the partial evaluator, compilers are generated. The correctness of a compiler is guaranteed by the correctness of both the executable specification and our partial evaluator. The results reported in this paper improve on previous work in the domain of compiler generation [16, 30], and solves several open problems in the domain of partial evaluation [15]. In essence: ffl Our compilation goes beyond a mere syntax-tosemantics mapping since the ...
Trampolined Style
- IN INTERNATIONAL CONFERENCE ON FUNCTIONAL PROGRAMMING
, 1999
"... A trampolined program is organized as a single loop in which computations are scheduled and their execution allowed to proceed in discrete steps. Writing programs in trampolined style supports primitives for multithreading without language support for continuations. Various forms of trampolining all ..."
Abstract
-
Cited by 34 (3 self)
- Add to MetaCart
A trampolined program is organized as a single loop in which computations are scheduled and their execution allowed to proceed in discrete steps. Writing programs in trampolined style supports primitives for multithreading without language support for continuations. Various forms of trampolining allow for different degrees of interaction between threads. We present two architectures based on an only mildly intrusive trampolined style. Concurrency can be supported at multiple levels of granularity by performing the trampolining transformation multiple times.
On-Line Software Version Change
, 1994
"... what constitutes an "acceptable" behavior of such a process. We capture this notion in our definition of the validity of an on-line change. We define an on-line change to be valid if some time after the change, the process reaches a reachable state of the new program version. Thus, validity ensures ..."
Abstract
-
Cited by 27 (0 self)
- Add to MetaCart
what constitutes an "acceptable" behavior of such a process. We capture this notion in our definition of the validity of an on-line change. We define an on-line change to be valid if some time after the change, the process reaches a reachable state of the new program version. Thus, validity ensures that following a change, the process starts behaving like the new version of the program after a "transition period". We first consider validity of on-line changes to programs written in sequential procedure based languages. For this purpose, a very simple model in which procedures and functions are not allowed is first considered. State is modelled as a mapping from variable names to values. For this model, we show that it is undecidable to find whether or not a given on-line change is valid. This result has important consequences. It means that computable necessary and sufficient conditions for validity of change can not be obtained. Undecidability in this simple model also
Building Interpreters by Composing Monads
- In 21st Annual ACM Symposium on Principles of Programming Languages (POPL'94
, 1994
"... : We exhibit a set of functions coded in Haskell that can be used as building blocks to construct a variety of interpreters for Lisp-like languages. The building blocks are joined merely through functional composition. Each building block contributes code to support a specific feature, such as numbe ..."
Abstract
-
Cited by 27 (0 self)
- Add to MetaCart
: We exhibit a set of functions coded in Haskell that can be used as building blocks to construct a variety of interpreters for Lisp-like languages. The building blocks are joined merely through functional composition. Each building block contributes code to support a specific feature, such as numbers, continuations, functions calls, or nondeterminism. The result of composing some number of building blocks is a parser, an interpreter, and a printer that support exactly the expression forms and data types needed for the combined set of features, and no more. The data structures are organized as pseudomonads, a generalization of monads that allows composition. Functional composition of the building blocks implies type composition of the relevant pseudomonads. Our intent was that the Haskell type resolution system ought to be able to deduce the approprate data types automatically. Unfortunately there is a deficiency in current Haskell implementations related to recursive data types: circ...
Programming Languages as Operating Systems (or Revenge of the Son of the Lisp Machine)
- In Proceedings of the 1999 ACM International Conference on Functional Programming (ICFP ’99
, 1999
"... The MrEd virtual machine serves both as the implementation platform for the DrScheme programming environment, and as the underlying Scheme engine for executing expressions and programs entered into DrScheme's read-eval-print loop. We describe the key elements of the MrEd virtual machine for building ..."
Abstract
-
Cited by 21 (6 self)
- Add to MetaCart
The MrEd virtual machine serves both as the implementation platform for the DrScheme programming environment, and as the underlying Scheme engine for executing expressions and programs entered into DrScheme's read-eval-print loop. We describe the key elements of the MrEd virtual machine for building a programming environment, and we step through the implementation of a miniature version of DrScheme in MrEd. More generally, we show how MrEd defines a high-level operating system for graphical programs. 1 MrEd: A Scheme Machine The DrScheme programming environment [10] provides students and programmers with a user-friendly environment for developing Scheme programs. To make programming accessible and attractive to novices, DrScheme provides a thoroughly graphical environment and runs under several major windowing systems (Windows, MacOS, and Unix/X). More than 60 universities and high schools currently employ DrScheme in their computing curriculum, and new schools adopt DrScheme every s...
Type Reconstruction with First-Class Polymorphic Values
, 1989
"... We present the first type reconstruction system which combines the implicit typing of ML with the full power of the explicitly typed second-order polymorphic lambda calculus. The system will accept ML-style programs, explicitly typed programs, and programs that use explicit types for all first-class ..."
Abstract
-
Cited by 11 (0 self)
- Add to MetaCart
We present the first type reconstruction system which combines the implicit typing of ML with the full power of the explicitly typed second-order polymorphic lambda calculus. The system will accept ML-style programs, explicitly typed programs, and programs that use explicit types for all first-class polymorphic values. We accomplish this flexibility by providing both generic and explicitly-quantified polymorphic types, as well as operators which convert between these two forms of polymorphism. This type reconstruction system is an integral part of the FX-89 programming language. We present a type reconstruction algorithm for the system. The type reconstruction algorithm is proven sound and complete with respect to the formal typing rules.

