Results 1 - 10
of
13
A direct algorithm for type inference in the rank-2 fragment of the second-order λ-calculus
, 1993
"... We study the problem of type inference for a family of polymorphic type disciplines containing the power of Core-ML. This family comprises all levels of the stratification of the second-order lambda-calculus by "rank" of types. We show that typability is an undecidable problem at every rank k >= 3 o ..."
Abstract
-
Cited by 70 (14 self)
- Add to MetaCart
We study the problem of type inference for a family of polymorphic type disciplines containing the power of Core-ML. This family comprises all levels of the stratification of the second-order lambda-calculus by "rank" of types. We show that typability is an undecidable problem at every rank k >= 3 of this stratification. While it was already known that typability is decidable at rank 2, no direct and easy-to-implement algorithm was available. To design such an algorithm, we develop a new notion of reduction and show howto use it to reduce the problem of typability at rank 2 to the problem of acyclic semi-unification. A by-product of our analysis is the publication of a simple solution procedure for acyclic semi-unification.
Concrete Type Inference: Delivering Object-Oriented Applications
, 1995
"... Unlimited copying without fee is permitted provided that the copies are not made nor distributed for direct commercial advantage, and credit to the source is given. Otherwise, no part of this work covered by copyright hereon may be reproduced in any form or by any means graphic, electronic, or mecha ..."
Abstract
-
Cited by 49 (0 self)
- Add to MetaCart
Unlimited copying without fee is permitted provided that the copies are not made nor distributed for direct commercial advantage, and credit to the source is given. Otherwise, no part of this work covered by copyright hereon may be reproduced in any form or by any means graphic, electronic, or mechanical, including photocopying, recording, taping, or storage in an information retrieval system, without the prior written permission of the copyright owner. TRADEMARKS Sun, Sun Microsystems, and the Sun logo are trademarks or registered trademarks of Sun Microsystems, Inc. UNIX is a registered trademark in the United States and other countries, exclusively licensed through X/Open Company, Ltd. All SPARC trademarks, including the SCD Compliant Logo, are trademarks or registered trademarks of SPARC International, Inc. SPARCstation, SPARCserver, SPARCengine, SPARCworks, and SPARCompiler are licensed exclusively to Sun Microsystems, Inc. All other product names mentioned herein are the trademarks of their respective owners.
A Semantics for Static Type Inference
- Information and Computation
, 1993
"... Curry's system for F-deducibility is the basis for static type inference algorithms for programming languages such as ML. If a natural "preservation of types by conversion" rule is added to Curry's system, it becomes undecidable, but complete relative to a variety of model classes. We show compl ..."
Abstract
-
Cited by 9 (0 self)
- Add to MetaCart
Curry's system for F-deducibility is the basis for static type inference algorithms for programming languages such as ML. If a natural "preservation of types by conversion" rule is added to Curry's system, it becomes undecidable, but complete relative to a variety of model classes. We show completeness for Curry's system itself, relative to an extended notion of model that validates reduction but not conversion.
Typed static analysis: Application to groundness analysis of Prolog and lambda-Prolog
- Journal of Functional and Logic Programming
, 1999
"... We enrich the domain Pos used for the static analysis of Prolog programs by combining it with types. We adopt the prescriptive view on typing, and we assume that programs are well-typed in an already existing type system. Typed static analysis of Typed Prolog programs gives access to more refined pr ..."
Abstract
-
Cited by 6 (1 self)
- Add to MetaCart
We enrich the domain Pos used for the static analysis of Prolog programs by combining it with types. We adopt the prescriptive view on typing, and we assume that programs are well-typed in an already existing type system. Typed static analysis of Typed Prolog programs gives access to more refined properties than untyped analysis because types give information on the inductive structure of terms that untyped static analysis does not discover. The increased refinement is not in variables assigned to true (e.g., variable recognized as bound to ground terms), but rather in variables not assigned to true; theycan be assigned a more informative value than false. For instance, the proposed analysis can show that a variable is bound to a nil-terminated list whose elements are not necessarily ground. We contend that this kind of property is sometimes more useful than groundness. Because 1 of constructors of compound types, e.g., list, the typed abstract domain can be infinite, but we show that if the so-called head-condition is satisfied by the analyzed program, then only a finite part of the domain is used. 1
Polymorphic Type Analysis in Logic Programs by Abstract Interpretation
- Journal of Logic Programming
, 1998
"... INTERPRETATION LUNJIN LU LIX Ecole Polytechnique 91128 Palaiseau Cedex France Abstract In this paper, we first introduce a notion of polymorphic abstract interpretation that formalises a polymorphic analysis as a generalisation of possibly infinitely many monomorphic analyses in the sense that the ..."
Abstract
-
Cited by 6 (4 self)
- Add to MetaCart
INTERPRETATION LUNJIN LU LIX Ecole Polytechnique 91128 Palaiseau Cedex France Abstract In this paper, we first introduce a notion of polymorphic abstract interpretation that formalises a polymorphic analysis as a generalisation of possibly infinitely many monomorphic analyses in the sense that the results of the monomorphic analyses can be obtained as instances of that of the polymorphic analysis. We then present a polymorphic type analysis of logic programs in terms of an abstract domain for polymorphic descriptions of type information and two operators on the abstract domain, namely the least upper bound operator and the abstract unification operator. The abstract domain captures type information more precisely than other abstract domains for similar purposes. The abstract unification operator for the polymorphic type analysis is designed by lifting the abstract unification operator for a monomorphic type analysis in logic programs, which simplifies the proof of the safeness of the...
Type Analysis of Logic Programs in the Presence of Type Definitions
- In Proceedings of the 1995 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based program manipulation
, 1995
"... This paper presents an abstract domain and an abstract unification function for type analysis of logic programs with type definitions. Type information is inferred together with sharing and aliasing information. Aliasing information is used to improve the precision of type analysis. 1 Introduction ..."
Abstract
-
Cited by 5 (3 self)
- Add to MetaCart
This paper presents an abstract domain and an abstract unification function for type analysis of logic programs with type definitions. Type information is inferred together with sharing and aliasing information. Aliasing information is used to improve the precision of type analysis. 1 Introduction Prolog is a type-free language. The programmer does not have to specify the types of variables, functions and predicates. This may make it simple to write simple programs. However, it also makes it difficult to debug programs because type errors cannot be detected by Prolog systems. A type error will manifest itself in the form of a wrong result or a missing result rather than an indication of a type violation. There have been many efforts to augment Prolog with type systems in the forms of type checking systems [2, 11, 27] and type analysis systems. Type analysis systems infer types from the text of a program. Some type analysis systems infer a type for the program and the type is meant to ...
Polymorphic type inference for the relational algebra
- Journal of Computer and System Sciences
"... We give a polymorphic account of the relational algebra. We introduce a formalism of “type formulas ” specifically tuned for relational algebra expressions, and present an algorithm that computes the “principal ” type for a given expression. The principal type of an expression is a formula that spec ..."
Abstract
-
Cited by 4 (1 self)
- Add to MetaCart
We give a polymorphic account of the relational algebra. We introduce a formalism of “type formulas ” specifically tuned for relational algebra expressions, and present an algorithm that computes the “principal ” type for a given expression. The principal type of an expression is a formula that specifies, in a clear and concise manner, all assignments of types (sets of attributes) to relation names, under which a given relational algebra expression is well-typed, as well as the output type that expression will have under each of these assignments. Topics discussed include complexity and polymorphic expressive power. 1
Type Inference and Reconstruction for First Order Dependent Types
, 1995
"... x 1 Introduction 1 1.1 Dependent Types : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 1.2 Dependent Type Inference and Reconstruction : : : : : : : : : : : : : : : : 8 2 Primitive Recursive Functionals with Dependent Types 17 2.1 A Dependent Type System for T : : : : : : : : : ..."
Abstract
-
Cited by 3 (1 self)
- Add to MetaCart
x 1 Introduction 1 1.1 Dependent Types : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 1.2 Dependent Type Inference and Reconstruction : : : : : : : : : : : : : : : : 8 2 Primitive Recursive Functionals with Dependent Types 17 2.1 A Dependent Type System for T : : : : : : : : : : : : : : : : : : : : : : : 17 2.1.1 Terms : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 17 2.1.2 Types : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 19 2.1.3 Typing Rules : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 24 2.1.4 Strong Normalization of T Terms : : : : : : : : : : : : : : : : : : : 28 2.2 Dependent Typing Examples : : : : : : : : : : : : : : : : : : : : : : : : : : 29 2.3 A Term Model Semantics for T : : : : : : : : : : : : : : : : : : : : : : : : 34 3 Principal Types and Dependent Type Reconstruction 58 3.1 Type Subsumption and Unification : : : : : : : : : : : : : : : : : : : : : : : 58 3.2 Matching : : : : : :...
Incremental Polymorphic Type Checking With Update
, 1992
"... We describe a variant of Milner's ML type inference algorithm which can be used to perform incremental type checking of programs with partially unspecied functions (or predicates in Prolog). This supports modication (e.g. for correction) of procedures dened previously and provides for a convenient t ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
We describe a variant of Milner's ML type inference algorithm which can be used to perform incremental type checking of programs with partially unspecied functions (or predicates in Prolog). This supports modication (e.g. for correction) of procedures dened previously and provides for a convenient treatment of top-level mutual recursion including Prolog-style incremental clausal denition. The system allows us to: dene a function of, say, type ! , use it in suceeding functions and then modify its denition to a type instance, such as list( int) ! list( int), provided that, in the meantime, it has not been used by other functions at an incompatible instance. Undened procedures can be treated as having type (or ! corresponding to the function x:fail ). This is useful for the case of languages (like HOPE, Miranda, Haskell and Prolog) which require that all top-level procedures are dened mutually recursively | forward references can then be treated as if dened by x...
Type Reconstruction Algorithms: A Survey
, 2007
"... Most type reconstruction algorithms can be broadly classified into two distinct categories: unification and substitution based and constraint based. This report is a survey of some of the popular type reconstruction algorithms in the above two categories to promote better understanding of these algo ..."
Abstract
-
Cited by 2 (2 self)
- Add to MetaCart
Most type reconstruction algorithms can be broadly classified into two distinct categories: unification and substitution based and constraint based. This report is a survey of some of the popular type reconstruction algorithms in the above two categories to promote better understanding of these algorithms. We have implemented the above algorithms for a language based on pure lambda calculus extended extended with poylorphic let construct on some non-trivial examples. 1

