• Documents
  • Authors
  • Tables
  • Other Seers ▼
    RefSeer AckSeer CollabSeer SeerSeer
  • Log in
  • Sign up
  • MetaCart

CiteSeerX logo

Advanced Search Include Citations
Advanced Search Include Citations | Disambiguate

Polymorphic Type Inference and Semi-Unification (1989)

by Fritz Henglein
Add To MetaCart

Tools

Sorted by:
Results 1 - 10 of 14
Next 10 →

Type Inference with Polymorphic Recursion

by Fritz Henglein - ACM Transactions on Programming Languages and Systems , 1991
"... The Damas-Milner Calculus is the typed -calculus underlying the type system for ML and several other strongly typed polymorphic functional languages such as Miranda 1 and Haskell. Mycroft has extended its problematic monomorphic typing rule for recursive definitions with a polymorphic typing ru ..."
Abstract - Cited by 129 (0 self) - Add to MetaCart
The Damas-Milner Calculus is the typed -calculus underlying the type system for ML and several other strongly typed polymorphic functional languages such as Miranda 1 and Haskell. Mycroft has extended its problematic monomorphic typing rule for recursive definitions with a polymorphic typing rule. He proved the resulting type system, which we call the Milner-Mycroft Calculus, sound with respect to Milner's semantics, and showed that it preserves the principal typing property of the Damas-Milner Calculus. The extension is of practical significance in typed logic programming languages and, more generally, in any language with (mutually) recursive definitions. In this paper we show that the type inference problem for the Milner-Mycroft Calculus is log-space equivalent to semi-unification, the problem of solving subsumption inequations between first-order terms. This result has been proved independently by Kfoury, Tiuryn, and Urzyczyn. In connection with the recently establish...

Efficient Type Inference for Higher-Order Binding-Time Analysis

by Fritz Henglein - In Functional Programming and Computer Architecture , 1991
"... Binding-time analysis determines when variables and expressions in a program can be bound to their values, distinguishing between early (compile-time) and late (run-time) binding. Binding-time information can be used by compilers to produce more efficient target programs by partially evaluating prog ..."
Abstract - Cited by 86 (1 self) - Add to MetaCart
Binding-time analysis determines when variables and expressions in a program can be bound to their values, distinguishing between early (compile-time) and late (run-time) binding. Binding-time information can be used by compilers to produce more efficient target programs by partially evaluating programs at compile-time. Binding-time analysis has been formulated in abstract interpretation contexts and more recently in a type-theoretic setting. In a type-theoretic setting binding-time analysis is a type inference problem: the problem of inferring a completion of a λ-term e with binding-time annotations such that e satisfies the typing rules. Nielson and Nielson and Schmidt have shown that every simply typed λ-term has a unique completion ê that minimizes late binding in TML, a monomorphic type system with explicit binding-time annotations, and they present exponential time algorithms for computing such minimal completions. 1 Gomard proves the same results for a variant of his two-level λ-calculus without a so-called “lifting ” rule. He presents another algorithm for inferring completions in this somewhat restricted type system and states that it can be implemented in time O(n 3). He conjectures that the completions computed are minimal.

A direct algorithm for type inference in the rank-2 fragment of the second-order λ-calculus

by A. J. Kfoury, J. B. Wells , 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.

Sound, Complete and Scalable Path-Sensitive Analysis ∗

by Isil Dillig, Thomas Dillig, Alex Aiken
"... We present a new, precise technique for fully path- and contextsensitive program analysis. Our technique exploits two observations: First, using quantified, recursive formulas, path- and contextsensitive conditions for many program properties can be expressed exactly. To compute a closed form soluti ..."
Abstract - Cited by 9 (1 self) - Add to MetaCart
We present a new, precise technique for fully path- and contextsensitive program analysis. Our technique exploits two observations: First, using quantified, recursive formulas, path- and contextsensitive conditions for many program properties can be expressed exactly. To compute a closed form solution to such recursive constraints, we differentiate between observable and unobservable variables, the latter of which are existentially quantified in our approach. Using the insight that unobservable variables can be eliminated outside a certain scope, our technique computes satisfiabilityand validity-preserving closed-form solutions to the original recursive constraints. We prove the solution is as precise as the original system for answering may and must queries as well as being small in practice, allowing our technique to scale to the entire Linux kernel, a program with over 6 million lines of code. D.2.4 [Software Engineer-

Polymorphic Type Checking by Interpretation of Code

by Stefan Kahrs , 1992
"... The type system of most modern functional programming languages is based on Milner's polymorphism. A compiler or interpreter usually checks (or infers) the types of functions and other values by directly inspecting the source code of a program. Here, another approach is taken: The program is firs ..."
Abstract - Cited by 1 (0 self) - Add to MetaCart
The type system of most modern functional programming languages is based on Milner's polymorphism. A compiler or interpreter usually checks (or infers) the types of functions and other values by directly inspecting the source code of a program. Here, another approach is taken: The program is first translated into code for a stack machine and then a non-standard interpreter applied to this code checks (or infers) the type of the corresponding values. This can be seen as an abstract interpretation of the object code of the program. 1 Introduction In the early days of Functional Programming in the 1960's, functional programming languages did not have any proper concept of type; they (Lisp, ISWIM [10]) were typeless. Classical, monomorphic type-systems are restrictive in the sense that they only support the solution of concrete problems, but not problem schemes. But it is characteristic for the style of Functional Programming to solve problems in an abstract way, and thus a monomor...

Weak Subsumption Constraints for Type Diagnosis: An Incremental Algorithm (Extended Abstract)

by Martin Müller, Joachim Niehren - In Joint COMPULOGNET /ELSNET/EAGLES Workshop on Computational Logic for Natural Language Processing , 1995
"... ) Martin Muller Joachim Niehren y German Research Center for Artificial Intelligence (DFKI) Stuhlsatzenhausweg 3, 66123 Saarbrucken, Germany fmmueller,niehreng@dfki.uni-sb.de March 15, 1995 Abstract We introduce constraints necessary for type checking a higher-order concurrent constraint lan ..."
Abstract - Cited by 1 (1 self) - Add to MetaCart
) Martin Muller Joachim Niehren y German Research Center for Artificial Intelligence (DFKI) Stuhlsatzenhausweg 3, 66123 Saarbrucken, Germany fmmueller,niehreng@dfki.uni-sb.de March 15, 1995 Abstract We introduce constraints necessary for type checking a higher-order concurrent constraint language, and solve them with an incremental algorithm. Our constraint system extends rational unification by constraints x`y saying that "x has at least the structure of y", modelled by a weak instance relation between trees. This notion of instance has been carefully chosen to be weaker than the usual one which renders semi-unification undecidable. Semi-unification has more than once served to link unification problems arising from type inference and those considered in computational linguistics. Just as polymorphic recursion corresponds to subsumption through the semi-unification problem, our type constraint problem corresponds to weak subsumption of feature graphs in linguistics. The decida...

Documentation for polyrec_sml: An Extension SML With Typechecking For Polymorphic Recursion

by Martin Emms , 1995
"... this documentation. The fault for remaining errors remains with the author. The implementation described here was created with the support of DFG project `Semiunifikation' Le 788/1-2. ..."
Abstract - Cited by 1 (1 self) - Add to MetaCart
this documentation. The fault for remaining errors remains with the author. The implementation described here was created with the support of DFG project `Semiunifikation' Le 788/1-2.

The R-Acyclic Semiunification Problem

by Brad Lushman, Gordon V. Cormack , 2006
"... We recast Kfoury and Wells ’ formulation of the acyclic semiunification problem (ASUP) in graphtheoretic terms and prove equivalence between the two formulations. We then relax and simplify the graph-theoretic formulation; we call the resulting problem the R-acyclic semiunification problem (R-ASUP), ..."
Abstract - Cited by 1 (1 self) - Add to MetaCart
We recast Kfoury and Wells ’ formulation of the acyclic semiunification problem (ASUP) in graphtheoretic terms and prove equivalence between the two formulations. We then relax and simplify the graph-theoretic formulation; we call the resulting problem the R-acyclic semiunification problem (R-ASUP), which we show to be a strict superset of ASUP. We prove that the ASUP solution procedure terminates and produces most general solutions for R-ASUP (and hence for ASUP) in the same sense as Robinson’s unification algorithm. We thus extend the class of semiunification instances known to be decidable. 1

Reasoning About the Unknown in Static Analysis

by Isil Dillig, Thomas Dillig, Alex Aiken
"... Static program analysis techniques cannot know certain values, such as the value of user input or network state, at analysis time. While such unknown values need to be treated as non-deterministic choices made by the program’s execution environment, it is still possible to glean very useful informat ..."
Abstract - Cited by 1 (1 self) - Add to MetaCart
Static program analysis techniques cannot know certain values, such as the value of user input or network state, at analysis time. While such unknown values need to be treated as non-deterministic choices made by the program’s execution environment, it is still possible to glean very useful information about how such statically unknown values may or must influence computation. We give a method for integrating such non-deterministic choices with an expressive static analysis. Interestingly, we cannot solve the resulting recursive constraints directly, but we give an exact method for answering all may and must queries. We show experimentally that the resulting solved forms are concise in practice, enabling us to apply the technique to very large programs, including an entire operating system. 1.

A General Theory of Semi-Unification

by Said Jahama, A.J. Kfoury , 1993
"... Various restrictions on the terms allowed for substitution give rise to different cases of semi-unification. Semi-unification on finite and regular terms has already been considered in the literature. We introduce a general case of semi-unification where substitutions are allowed on non-regular term ..."
Abstract - Add to MetaCart
Various restrictions on the terms allowed for substitution give rise to different cases of semi-unification. Semi-unification on finite and regular terms has already been considered in the literature. We introduce a general case of semi-unification where substitutions are allowed on non-regular terms, and we prove the equivalence of this general case to a well-known undecidable data base dependency problem , thus establishing the undecidability of general semi-unification. We present a unified way of looking at the various problems of semi-unification. We give some properties that are common to all the cases of semi-unification. We also the principality property and the solution set for those problems. We prove that semi-unification on general terms has the principality property. Finally, we present a recursive inseparability result between semi-unification on regular terms and semi-unification on general terms. Partly supported by NSF grant CCR-9113196. Address: Department of Compu...
The National Science Foundation
  • About CiteSeerX
  • Submit Documents
  • Privacy Policy
  • Help
  • Data
  • Source
  • Contact Us

Developed at and hosted by The College of Information Sciences and Technology

© 2007-2010 The Pennsylvania State University