Results 11 - 20
of
39
The Compilation of Prolog and its Execution with MALI
, 1993
"... We present a compiled implementation of Prolog that uses the abstract memory MALI for representing the execution state. Prolog is a logic programming language allowing a more general clause form than Standard Prolog 's (namely hereditary Harrop formulas instead of Horn formulas) and using simply ty ..."
Abstract
-
Cited by 11 (8 self)
- Add to MetaCart
We present a compiled implementation of Prolog that uses the abstract memory MALI for representing the execution state. Prolog is a logic programming language allowing a more general clause form than Standard Prolog 's (namely hereditary Harrop formulas instead of Horn formulas) and using simply typed -terms as a term domain instead of first order terms. The augmented clause form causes the program (a set of clauses) and the signature (a set of constants) to be changeable in a very disciplined way. The new term domain has a semi-decidable and infinitary unification theory, and it introduces the need for a fi-reduction operation at run-time. MALI is an abstract memory that is suitable for storing the search-state of depth-first search processes. Its main feature is its efficient memory management. We have used an original Prolog-to-C translation along which predicates are transformed into functions operating on continuations for handling failure and success in unifications, and change...
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, higher-order 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, higher-order 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 semi-unification of proper types, followed by equational semi-unification of dimensions. Syntactic semi-unification 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 polynomial-time algorithm that decides if a semi-unification problem in a vector space can be solved and, if so, returns a most general semi-unifier. 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 E-Unification
, 1996
"... Recently it was proved that the problem of simultaneous rigid E-unification (SREU) is undecidable. Here we perform an in-depth 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 E-unification (SREU) is undecidable. Here we perform an in-depth 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 99-fragment of intuitionistic logic with equality. This is an improvement of a recent result regarding the undecidability of the 9 -fragment in general. Contents 1 ...
Typability and Type Checking in the Second-Order lambda-Calculus Are Equivalent and Undecidable
, 1993
"... We consider the problems of typability and type checking in the Girard/Reynolds second-order polymorphic typed-calculus, for which we use the short name "System F" and which we use in the "Curry style" where types are assigned to pure-terms. These problems have been considered and proven to be d ..."
Abstract
-
Cited by 9 (1 self)
- Add to MetaCart
We consider the problems of typability and type checking in the Girard/Reynolds second-order polymorphic typed-calculus, for which we use the short name "System F" and which we use in the "Curry style" where types are assigned to pure-terms. 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 lower-bound 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 semi-unification. 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 constructing-terms 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.
Type Checking Meta Programs
- In Workshop on Logical Frameworks and Meta-Languages
, 1999
"... We report on preliminary experiments with inferring types for meta programs: programs that manipulate programs. For this purpose we provide a two-level type system in a fragment of a higher-order 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 two-level type system in a fragment of a higher-order 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 semi-unification 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 meta-level. 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 Algorithms for Uniform Semi-Unification
, 1999
"... We present a fast algorithm for uniform semi-unification 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 4 (1 self)
- Add to MetaCart
We present a fast algorithm for uniform semi-unification 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 first-order 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...
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 Curry-Howard propositions-as-types analogy. Supported by NSF Grant CCR-9017125, 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 : : : : : :...
Type Inference for Recursive Definitions
- In Proc. 14th Ann. IEEE Symp. Logic in Comput. Sci
, 2000
"... We consider type systems that combine universal types, recursive types, and object types. We study type inference in these systems under a rank restriction, following Leivant's notion of rank. To motivate our work, we present several examples showing how our systems can be used to type programs enco ..."
Abstract
-
Cited by 2 (1 self)
- Add to MetaCart
We consider type systems that combine universal types, recursive types, and object types. We study type inference in these systems under a rank restriction, following Leivant's notion of rank. To motivate our work, we present several examples showing how our systems can be used to type programs encountered in practice. We show that type inference in the rank-k system is decidable for k # 2 and undecidable for k # 3. (Similar results based on different techniques are known to hold for System F, without recursive types and object types.) Our undecidability result is obtained by a reduction from a particular adaptation (which we call "regular") of the semi-unification problem and whose undecidability is, interestingly, obtained by methods totally different from those used in the case of standard (or finite) semi-unification. Keywords: type systems, type inference, lambda calculus, unification, software specification. 1 Introduction 1.1 Background and Motivation Type inference, the ...

