Results 11  20
of
44
Typability and Type Checking in the SecondOrder lambdaCalculus Are Equivalent and Undecidable
, 1993
"... We consider the problems of typability and type checking in the Girard/Reynolds secondorder polymorphic typedcalculus, for which we use the short name "System F" and which we use in the "Curry style" where types are assigned to pureterms. These problems have been considered and proven to be d ..."
Abstract

Cited by 12 (1 self)
 Add to MetaCart
We consider the problems of typability and type checking in the Girard/Reynolds secondorder polymorphic typedcalculus, for which we use the short name "System F" and which we use in the "Curry style" where types are assigned to pureterms. These problems have been considered and proven to be decidable or undecidable for various restrictions and extensions of System F and other related systems, and lowerbound complexity results for System F have been achieved, but they have remained "embarrassing open problems" 3 for System F itself. We first prove that type checking in System F is undecidable by a reduction from semiunification. We then prove typability in System F is undecidable by a reduction from type checking. Since the reverse reduction is already known, this implies the two problems are equivalent. The second reduction uses a novel method of constructingterms such that in all type derivations, specific bound variables must always be assigned a specific type. Using this technique, we can require that specif subterms must be typable using a specific, fixed type assignment in order for the entire term to be typable at all. Any desired type assignment maybe simulated. We develop this method, which we call \constants for free", for both the K and I calculi.
Unification and Polymorphism in Region Inference
 In Proof, Language, and Interaction: Essays in Honour of Robin Milner
, 1996
"... Region Inference is a technique for inferring lifetimes of values in strict, higherorder programming languages such as Standard ML. The purpose of this paper is to show how ideas from Milner's polymorphic type discipline can serve as a basis for region inference, even in the presence of a limited f ..."
Abstract

Cited by 10 (2 self)
 Add to MetaCart
Region Inference is a technique for inferring lifetimes of values in strict, higherorder programming languages such as Standard ML. The purpose of this paper is to show how ideas from Milner's polymorphic type discipline can serve as a basis for region inference, even in the presence of a limited form of polymorphic recursion.
Dimension Inference under Polymorphic Recursion
 In Proc. 7th Conf. Functional Programming Languages and Computer Architecture
, 1995
"... Numeric types can be given polymorphic dimension parameters, in order to avoid dimension errors and unit errors. The most general dimensions can be inferred automatically. It has been observed that polymorphic recursion is more important for the dimensions than for the proper types. We show that, un ..."
Abstract

Cited by 9 (1 self)
 Add to MetaCart
Numeric types can be given polymorphic dimension parameters, in order to avoid dimension errors and unit errors. The most general dimensions can be inferred automatically. It has been observed that polymorphic recursion is more important for the dimensions than for the proper types. We show that, under polymorphic recursion, type inference amounts to syntactic semiunification of proper types, followed by equational semiunification of dimensions. Syntactic semiunification is unfortunately undecidable, although there are procedures that work well in practice, and proper types given by the programmer can be checked. However, the dimensions form a vector space (provided that their exponents are rational numbers). We give a polynomialtime algorithm that decides if a semiunification problem in a vector space can be solved and, if so, returns a most general semiunifier. 1 Introduction We will combine three good things as far as possible: dimension types, polymorphic recursion, and aut...
Uniform Representation of Recursively Enumerable Sets with Simultaneous Rigid EUnification
, 1996
"... Recently it was proved that the problem of simultaneous rigid Eunification (SREU) is undecidable. Here we perform an indepth investigation of this matter and obtain that one can use SREU to uniformly represent any recursively enumerable set. From the exact form of this representation follows that ..."
Abstract

Cited by 9 (2 self)
 Add to MetaCart
Recently it was proved that the problem of simultaneous rigid Eunification (SREU) is undecidable. Here we perform an indepth investigation of this matter and obtain that one can use SREU to uniformly represent any recursively enumerable set. From the exact form of this representation follows that SREU is undecidable already for 6 rigid equations with ground left hand sides and 2 variables. There is a close correspondence between solvability of SREU problems and provability of the corresponding formulas in intuitionistic first order logic with equality. Due to this correspondence we obtain a new (uniform) representation of the recursively enumerable sets in intuitionistic first order logic with equality with one binary function symbol and a countable set of constants. From this result follows the undecidability of the 99fragment of intuitionistic logic with equality. This is an improvement of a recent result regarding the undecidability of the 9 fragment in general. Contents 1 ...
Type Checking Meta Programs
 In Workshop on Logical Frameworks and MetaLanguages
, 1999
"... We report on preliminary experiments with inferring types for meta programs: programs that manipulate programs. For this purpose we provide a twolevel type system in a fragment of a higherorder system of dependent types. The system is formulated with automatic type inference in mind. In particular ..."
Abstract

Cited by 7 (0 self)
 Add to MetaCart
We report on preliminary experiments with inferring types for meta programs: programs that manipulate programs. For this purpose we provide a twolevel type system in a fragment of a higherorder system of dependent types. The system is formulated with automatic type inference in mind. In particular, we give a type system for dependent types and a constraint generation procedure which generates semiunification constraints from untyped terms that have a solution if and only if the terms have a type annotation in the type system. More interestingly, typability is preserved under reflection, i.e. when object level programs are reflected to the metalevel. 1 Introduction We would like to have a way to infer that the operations meta programs perform on their objects preserve typability of the objects. Here, we develop type rules and constraint solving techniques for inferring types of such programs. On the surface this may seem as an innocent exercise in extending for instance the Hindley...
Fast leftlinear semiunification
 In Proc. Int’l. Conf. on Computing and Information
, 1990
"... Semiunification is a generalization of both unification and matching with applications in proof theory, term rewriting systems, polymorphic type inference, and natural language processing. It is the problem of solving a set of term inequalities M1 ≤ N1,..., Mk ≤ Nk, where ≤ is interpreted as the su ..."
Abstract

Cited by 6 (2 self)
 Add to MetaCart
Semiunification is a generalization of both unification and matching with applications in proof theory, term rewriting systems, polymorphic type inference, and natural language processing. It is the problem of solving a set of term inequalities M1 ≤ N1,..., Mk ≤ Nk, where ≤ is interpreted as the subsumption preordering on (firstorder) terms. Whereas the general problem has recently been shown to be undecidable, several special cases are decidable. Kfoury, Tiuryn, and Urzyczyn proved that leftlinear semiunification (LLSU) is decidable by giving an exponential time decision procedure. We improve their result as follows. 1. We present a generic polynomialtime algorithm L1 for LLSU, which shows that LLSU is in P. 2. We show that L1 can be implemented in time O(n 3) by using a fast dynamic transitive closure algorithm. 3. We prove that LLSU is Pcomplete under logspace reductions, thus giving evidence that there are no fast (NCclass) parallel algorithms for LLSU.
Quantifier Elimination and Parametric Polymorphism in Programming Languages
 J. Functional Programming
, 1992
"... We present a simple and easy to understand explanation of ML type inference and parametric polymorphism within the framework of type monomorphism, as in the first order typed lambda calculus. We prove the equivalence of this system with the standard interpretation using type polymorphism, and extend ..."
Abstract

Cited by 4 (2 self)
 Add to MetaCart
We present a simple and easy to understand explanation of ML type inference and parametric polymorphism within the framework of type monomorphism, as in the first order typed lambda calculus. We prove the equivalence of this system with the standard interpretation using type polymorphism, and extend the equivalence to include polymorphic fixpoints. The monomorphic interpretation gives a purely combinatorial understanding of the type inference problem, and is a classic instance of quantifier elimination, as well as an example of Gentzenstyle cut elimination in the framework of the CurryHoward propositionsastypes analogy. Supported by NSF Grant CCR9017125, and grants from Texas Instruments and from the Tyson Foundation. 1 Introduction In his influential paper, "A theory of type polymorphism in programming," Robin Milner proposed an extension to the first order typed calculus which has become known as the core of the ML programming language [Mil78, HMT90]. The extension augment...
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 : : : : : :...
Fast Algorithms for Uniform SemiUnification
, 1999
"... We present a fast algorithm for uniform semiunification based on adapting the Huet unification closure method for standard unification. It solves the following decision problem in O(n 2 ff(n) 2 ), where n is the size of the two terms, and ff is the functional inverse of Ackermann 's function: ..."
Abstract

Cited by 3 (1 self)
 Add to MetaCart
We present a fast algorithm for uniform semiunification based on adapting the Huet unification closure method for standard unification. It solves the following decision problem in O(n 2 ff(n) 2 ), where n is the size of the two terms, and ff is the functional inverse of Ackermann 's function: Given two terms s and t, do there exist two substitutions oe and ae such that ae(oe(s)) = oe(t)? In the affirmative case, a solution oe can be constructed within the same time bound. However, if a principal solution (analogous to an mgu) is required, some modifications to the algorithm must be made, and the upper bound increases to O(n 2 log 2 (nff(n)) ff(n) 2 ). 1 Introduction Semiunification is a combination of matching and unification on firstorder terms that has applications in term rewriting, type checking for programming languages, proof theory, and computational linguistics; although it can be defined simply (see following section), it has proved remarkably difficult to analyz...