Results 1 -
7 of
7
Static Type Inference in a Dynamically Typed Language
- In Eighteenth Annual ACM Symposium on Principles of Programming Languages
, 1991
"... We present a type inference system for FL based on an operational, rather than a denotational, formulation of types. The essential elements of the system are a type language based on regular trees and a type inference logic that implements an abstract interpretation of the operational semantics of F ..."
Abstract
-
Cited by 59 (7 self)
- Add to MetaCart
We present a type inference system for FL based on an operational, rather than a denotational, formulation of types. The essential elements of the system are a type language based on regular trees and a type inference logic that implements an abstract interpretation of the operational semantics of FL. We use a non-standard approach to type inference because our requirements---using type information in the optimization of functional programs---differ substantially from those of other type systems. 1 Introduction Compilers derive at least two benefits from static type inference: the ability to detect and report potential run-time errors at compile-time, and the use of type information in program optimization. Traditionally, type systems have emphasized the detection of type errors. Statically typed functional languages such as Haskell [HWA*88] and ML [HMT89] include type constraints as part of the language definition, making some type inference necessary to ensure that type constraints ...
Code optimizations for lazy evaluation
- LISP and Symbolic Computation
, 1988
"... Implementations of lazy evaluation for non-strict functional languages usually involve the notion of a delayed representation of the value of an expression, which we call a thunk. We present several techniques for implementing thunks and formalize a class of optimizations that reduce both the space ..."
Abstract
-
Cited by 15 (0 self)
- Add to MetaCart
Implementations of lazy evaluation for non-strict functional languages usually involve the notion of a delayed representation of the value of an expression, which we call a thunk. We present several techniques for implementing thunks and formalize a class of optimizations that reduce both the space and time overhead of these techniques. The optimizations depend on a compile-time inferencing strategy called path analysis, a generalization of strictness analysis that uncovers order-of-evaluation information. Although the techniques in this paper are focused on the compilation of a non-strict functional language for a conventional architecture, they are directly applicable to most of the virtual machines commonly used for implementing such languages. The same techniques also apply to other forms of delayed evaluation such as futures and promises. 1
On-line Off-line Partial Evaluation: Semantic Specifications and Correctness Proofs
- Yale University
, 1993
"... This paper presents semantic specifications and correctness proofs for both on-line and offline partial evaluation of strict first-order functional programs. To do so, our strategy consists of defining a core semantics as a basis for the specification of three non-standard evaluations: instrumented ..."
Abstract
-
Cited by 9 (1 self)
- Add to MetaCart
This paper presents semantic specifications and correctness proofs for both on-line and offline partial evaluation of strict first-order functional programs. To do so, our strategy consists of defining a core semantics as a basis for the specification of three non-standard evaluations: instrumented evaluation, on-line and off-line partial evaluation. We then use the technique of logical relations to prove the correctness of both on-line and off-line partial evaluation semantics. The contributions of this work are as follows. 1. We provide a uniform framework to defining and proving correct both on-line and off-line partial evaluation. 2. This work required a formal specification of on-line partial evaluation with polyvariant specialization. We define criteria for its correctness with respect to an instrumented standard semantics. As a byproduct, on-line partial evaluation appears to be based on a fixpoint iteration process, just like binding-time analysis. 3. We show that binding-time...
An optimising compiler for a modern functional language
- Computer Journal
, 1989
"... One of the factors hindering the use of functional languages has been their relatively poor performance in comparison to more traditional languages such as C and Pascal. During the last decade tremendous progress has been made in building implementations of functional languages but the approaches ad ..."
Abstract
-
Cited by 3 (0 self)
- Add to MetaCart
One of the factors hindering the use of functional languages has been their relatively poor performance in comparison to more traditional languages such as C and Pascal. During the last decade tremendous progress has been made in building implementations of functional languages but the approaches adopted have employed specialist hardware andlor compiler optimisations that have been developed specifically for functional languages. Building specialist hardware may be the best long-term solution but in the short run it is possible to increase the use and acceptance of functional languages by exploiting the performance of commercially available machines. The goal of the project described in this paper has been to design an optimising compiler that produces fast code for functional languages on conventional sequential and parallel machines.
Semantic Analyses for Storage Management Optimizations in Functional Language Implementations
, 1991
"... One of the major overheads in implementing functional languages is the storage management overhead due to dynamic allocation and automatic reclamation of indefinite-extent storage. This dissertation investigates the problems of statically inferring lifetime information about dynamically-allocated ob ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
One of the major overheads in implementing functional languages is the storage management overhead due to dynamic allocation and automatic reclamation of indefinite-extent storage. This dissertation investigates the problems of statically inferring lifetime information about dynamically-allocated objects in higher-order polymorphic functional languages, both strict and non-strict, and of applying that information to reduce the storage management overhead. We have developed a set of compile-time semantic analyses for a higher-order, monomorphic, strict functional language based on denotational semantics and abstract interpretation. They are 1) escape analysis, which provides information about the relative lifetimes of objects such as arguments and local objects defin...
Abstract Interpretation and Attribute Grammars
, 1992
"... The objective of this thesis is to explore the connections between abstract interpretation and attribute grammars as frameworks in program analysis. Abstract interpretation is a semantics-based program analysis method. A large class of data flow analysis problems can be expressed as non-standard sem ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
The objective of this thesis is to explore the connections between abstract interpretation and attribute grammars as frameworks in program analysis. Abstract interpretation is a semantics-based program analysis method. A large class of data flow analysis problems can be expressed as non-standard semantics where the “meaning ” contains information about the runtime behaviour of programs. In an abstract interpretation the analysis is proved correct by relating it to the usual semantics for the language. Attribute grammars provide a method and notation to specify code generation and program analysis directly from the syntax of the programming language. They are especially used for describing compilation of programming languages and very efficient evaluators have been developed for subclasses of attribute grammars. By relating abstract interpretation and attribute grammars we obtain a closer connection between the specification and implementation of abstract interpretations which at the same time facilitates the correctness proofs of interpretations. Implementation and specification of abstract interpretations using circular attribute grammars is realised with an evaluator system for a class of domain theoretic attribute grammars. In this system thecircularity of attribute grammars is resolved by fixpoint iteration. The use of finite lattices in abstract interpretations requires automatic generation of specialised fixpoint iterators. This is done using a technique called lazy fixpoint iteration which is presented in the thesis. Methods from abstract interpretation can also be used in correctness proofs of attribute grammars. This proof technique introduces a new class of attribute grammars based on domain theory. This method is illustrated with examples. i ii SUMMARY
Z1: A Data Flow Analyzer Generator
"... We have developed a software tool called Z1 by which one can quickly achieve an accurate yet affordable program analysis. The user writes an analysis specification and sets a parameter for a desired cost-accuracy tradeoff. The tool then creates an executable analyzer that has the specified performan ..."
Abstract
- Add to MetaCart
We have developed a software tool called Z1 by which one can quickly achieve an accurate yet affordable program analysis. The user writes an analysis specification and sets a parameter for a desired cost-accuracy tradeoff. The tool then creates an executable analyzer that has the specified performance balance. Z1 has been used for developing both conventional and non-conventional flow analyses. These analyses were for programs written in C, FORTRAN, and Standard ML, without restriction upon the programs treated. We present experimental data showing the performances of Z1 for analyzing C, FORTRAN, and Standard ML programs. Index Terms: data flow analysis, abstract interpretation, global program analysis, collecting analysis, lattice, projection Correspondence: Kwangkeun Yi, kwang@research.att.com AT&T Bell Laboratories, Rm 2A-421, Murray Hill, NJ 07974, USA. A preliminary version of this paper appeared in the Proceedings of the 20th ACM SIGPLAN-SIGACT Symposium on Principles of Prog...

