scispace - formally typeset
Search or ask a question

Showing papers by "Michael I. Schwartzbach published in 1992"


Book ChapterDOI
29 Jun 1992
TL;DR: The implementation of a type inference algorithm for untyped object-oriented programs with inheritance, assignments, and late binding is presented, which significantly improves the previous one, presented at OOPSLA'91, since it can handle collection classes, such as List, in a useful way.
Abstract: We present the implementation of a type inference algorithm for untyped object-oriented programs with inheritance, assignments, and late binding The algorithm significantly improves our previous one, presented at OOPSLA'91, since it can handle collection classes, such as List, in a useful way Abo, the complexity has been dramatically improved, from exponential time to low polynomial time The implementation uses the techniques of incremental graph construction and constraint template instantiation to avoid representing intermediate results, doing superfluous work, and recomputing type information Experiments indicate that the implementation type checks as much as 100 lines pr second This results in a mature product, on which a number of tools can be based, for example a safety tool, an image compression tool, a code optimization tool, and an annotation tool This may make type inference for object-oriented languages practical

103 citations


Journal ArticleDOI
TL;DR: It is proved that safety analysis accepts strickly more safe lambda terms than does type inference for Thatte's partial types.

34 citations


Journal ArticleDOI
TL;DR: This paper summarizes three discussions conducted at the ECOOP'91 W5 Workshop on "Types, Inheritance, and Assignments" Tuesday July 16, 1991 in Geneva, Switzerland, organized by the authors.
Abstract: This paper summarizes three discussions conducted at the ECOOP'91 W5 Workshop on "Types, Inheritance, and Assignments" Tuesday July 16, 1991 in Geneva, Switzerland, organized by the authors.

20 citations


Proceedings ArticleDOI
24 Oct 1992
TL;DR: The authors give an O(n/sup 3/) algorithm that constructs a certain finite automaton that represents a canonical solution to a given set of type constraints.
Abstract: Partial types for the lambda -calculus were introduced by Thatte (1988) as a means of typing objects that are not typable with simple types, such as heterogeneous lists and persistent data. He showed that type inference for partial types was semidecidable. Decidability remained open until O'Keefe and Wand gave an exponential time algorithm for type inference. The authors give an O(n/sup 3/) algorithm. The algorithm constructs a certain finite automaton that represents a canonical solution to a given set of type constraints. Moreover, the construction works equally well for recursive types. >

15 citations


Journal ArticleDOI
01 Apr 1992
TL;DR: An algorithm constructs a certain finite automaton that represents a canonical solution to a given set of type constraints and works equally well for recursive types; this solves an open problem stated by O'Keefe and Wand.
Abstract: Partial types for the lambda-calculus were introduced by Thatte in 1988 as a means of typing objects that are not typable with simple types, such as heterogeneous lists and persistent data In that paper he showed that type inference for partial types was semidecidable. Decidability remained open until quite recently, when O'Keefe and Wand gave an exponential time algorithm for type inference. In this paper we give an O(n^3) algorithm. Our algorithm constructs a certain finite automaton that represents a canonical solution to a given set of type constraints. Moreover, the construction works equally well for recursive types; this solves an open problem stated by O'Keefe and Wand.

13 citations


Journal ArticleDOI
01 Feb 1992
TL;DR: It is demonstrated that the polyvariant transformation makes even more terms acceptable, even some without higher-order polymorphic types, which can improve the partial evaluators that base a polyVariant specialization on only monovariant binding time analysis.
Abstract: We present a polyvariant closure, safety, and binding time analysis for the untyped lambda calculus. The innovation is to analyze each abstraction afresh at all syntactic application points. This is achieved by a semantics-preserving program transformation followed by a novel monovariant analysis, expressed using type constraints. The constraints are solved in cubic time by a single fixed-point computation. Safety analysis is aimed at determining if a term will cause an error during evaluation. We have recently proved that the monovariant safety analysis accepts strictly more terms than simple type inference. This paper demonstrates that the polyvariant transformation makes even more terms acceptable, even some without higher-order polymorphic types. Furthermore, polyvariant binding time analysis can improve the partial evaluators that base a polyvariant specialization on only monovariant binding time analysis.

6 citations


Journal ArticleDOI
01 Mar 1992
TL;DR: This paper proves that safety analysis is sound, relative to both a strict and a lazy operational semantics, and superior to type inference, in the sense that it accepts strictly more safe lambda terms.
Abstract: Safety analysis is an algorithm for determining if a term in the untyped lambda calculus with constants is safe , i.e., if it does not cause an error during evaluation. This ambition is also shared by algorithms for type inference. Safety analysis and type inference are based on rather different perspectives, however. Safety analysis is based on closure analysis, whereas type inference attempts to assign a type to all subterms. In this paper we prove that safety analysis is sound , relative to both a strict and a lazy operational semantics, and superior to type inference, in the sense that it accepts strictly more safe lambda terms. The latter result may indicate the relative potentials of static program analyses based on respectively closure analysis and type inference.

5 citations



Journal ArticleDOI
01 Apr 1992
TL;DR: It is proved that Bondorf's analysis is better than Gomard's on the basis of abstract interpretation and type inference on the untyped lambda calculus.
Abstract: Binding time analysis is important in partial evaluators. Its task is to determine which parts of a program can be specialized if some of the expected input is known. Two approaches to do this are abstract interpretation and type inference. We compare two specific such analyses to see which one determines most program parts to be eliminable. The first is the abstract interpretation approach of Bondorf, and the second is the type inference approach o£ Gomard. Both apply to the untyped lambda calculus. We prove that Bondorf's analysis is better than Gomard's.

3 citations


Journal ArticleDOI
01 Jul 1992
TL;DR: It is proved that safety analysis accepts strictly more safe lambda terms than does type inference for Thatte's partial types.
Abstract: Safety analysis is an algorithm for determining if a terin in an untyped lambda calculus with constants is safe , i.e., if it does not cause an error during evaluation. We prove that safety analysis accepts strictly more safe lambda terms than does type inference for Thatte's partial types.

3 citations


Journal ArticleDOI
01 Jul 1992
TL;DR: An O(n^2) algorithm is given based on a simplification of the definition of the subtype relation, which allows the problem to be reduced to the emptiness problem for a certain finite automaton with quadratically many states.
Abstract: Subtyping in the presence of recursive types for the lambda-calculus was studied by Amadio and Cardelli in 1991 They showed that the problem of deciding whether one recursive type is a subtype of another is decidable in exponential time In this paper we give an O(n^2) algorithm Our algorithm is based on a simplification of the definition of the subtype relation, which allows us to reduce the problem to the emptiness problem for a certain finite automaton with quadratically many states It is known that equality of recursive types and the covariant Bohm order can be decided efficiently by means of finite automata Our results extend the automata-theoretic approach to handle orderings based on contravariance

Journal ArticleDOI
02 Jan 1992
TL;DR: This paper studies interpretations, which are homomorphic, monotonic functions from types to sets of values, and shows that they form a partial order with a minimal and a maximal element.
Abstract: We consider a type system where types are labeled, regular trees. Equipped with a type ordering, it forms the basis for a polymorphic, imperative programming language. This paper studies interpretations , which are homomorphic, monotonic functions from types to sets of values. We show that they form a partial order with a minimal and a maximal element, and various characterizations of other interpretations are provided. We also briefly consider a unification of types and values.