Results 11 -
17 of
17
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 ...
Rank 2 types for term graph rewriting
- In TIP’02, volume 75 of ENTCS
, 2003
"... We define a notion of type assignment with polymorphic intersection types of rank 2 for a term graph rewriting language that expresses sharing and cycles. We show that type assignment is decidable through defining, using the extended notion of unification from [5], a notion of principal pair which g ..."
Abstract
-
Cited by 2 (1 self)
- Add to MetaCart
We define a notion of type assignment with polymorphic intersection types of rank 2 for a term graph rewriting language that expresses sharing and cycles. We show that type assignment is decidable through defining, using the extended notion of unification from [5], a notion of principal pair which generalizes ML’s principal type property.
On Typability for Rank-2 Intersection Types with Polymorphic Recursion ∗
"... We show that typability for a natural form of polymorphic recursive typing for rank-2 intersection types is undecidable. Our proof involves characterizing typability as a context free language (CFL) graph problem, which may be of independent interest, and reduction from the boundedness problem for T ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
We show that typability for a natural form of polymorphic recursive typing for rank-2 intersection types is undecidable. Our proof involves characterizing typability as a context free language (CFL) graph problem, which may be of independent interest, and reduction from the boundedness problem for Turing machines. We also show a property of the type system which, in conjunction with the undecidability result, disproves a misconception about the Milner-Mycroft type system. We also show undecidability of a related program analysis problem. 1
On the relation between rank 2 intersection types and simple types
- In Joint Conference on Declarative Programming (AGP’2002
, 2002
"... Abstract. The Rank 2 Intersection Type System is the intersection type system with more impact in the area of functional programming languages. This system includes the powerful type system of the functional language ML keeping the decidability of type inference. The Simple Type System is the basis ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
Abstract. The Rank 2 Intersection Type System is the intersection type system with more impact in the area of functional programming languages. This system includes the powerful type system of the functional language ML keeping the decidability of type inference. The Simple Type System is the basis of every type system for programming languages. In this paper we prove that it is possible to transform any term typable by a Simple type in the Rank 2 Intersection Type System into a new term typable in the Simple Type System with the same type. We define that transformation independently of any type information. Then we prove the correctness of the presented transformation, in the sense that it preserves types of terms typable by Simple Types. 1
unknown title
"... The quest for type inference with first-classpolymorphic types Programming languages considerably benefit from static type-checking. In practice however, types may sometimes trammel programmers, for two opposite reasons. On the one hand, type anno-tations may quickly become a burden to write; while ..."
Abstract
- Add to MetaCart
The quest for type inference with first-classpolymorphic types Programming languages considerably benefit from static type-checking. In practice however, types may sometimes trammel programmers, for two opposite reasons. On the one hand, type anno-tations may quickly become a burden to write; while they usefully serve as documentation for toplevel functions, they also obfuscatethe code when every local function must be decorated. On the other hand, since types are only approximations, any type system willreject programs that are perfectly well-behaved and that could be accepted by another more expressive one; hence, sharp program-mers may be irritated in such situations.
AT DIFFERENT RANKS
, 1999
"... We consider a polymorphic type system (System F) with recursive types for the lambda calculus with constants. We use Leivant’s notion of rank to delimit the boundaries for decidable and undecidable type inference in our system. More precisely, we show that type inference in our system is undecidable ..."
Abstract
- Add to MetaCart
We consider a polymorphic type system (System F) with recursive types for the lambda calculus with constants. We use Leivant’s notion of rank to delimit the boundaries for decidable and undecidable type inference in our system. More precisely, we show that type inference in our system is undecidable at rank k ≥ 3. Similar results are known to hold for System F without recursive types. Our undecidability result is obtained by a reduction from a particular adaptation of the semi-unification problem (so-called “regular semi-unification”) whose undecidability is, interestingly, obtained by methods totally different from those used in the case of standard (or finite) semi-unification. Type inference for a rank-1 restriction of our system is known to be decidable. A simple modification to the way unification is performed (so-called “regular unification”) is all that is required. We also conjecture that type inference at rank-2 is decidable and equivalent to finding regular solutions for instances of a particular form of semi-unification known as “acyclic semi-unification”.
Theoretical Foundations for Practical ‘Totally Functional Programming’
, 2007
"... Interpretation is an implicit part of today’s programming; it has great power but is overused and has
significant costs. For example, interpreters are typically significantly hard to understand and hard
to reason about. The methodology of “Totally Functional Programming” (TFP) is a reasoned
attempt ..."
Abstract
- Add to MetaCart
Interpretation is an implicit part of today’s programming; it has great power but is overused and has
significant costs. For example, interpreters are typically significantly hard to understand and hard
to reason about. The methodology of “Totally Functional Programming” (TFP) is a reasoned
attempt to redress the problem of interpretation. It incorporates an awareness of the undesirability
of interpretation with observations that definitions and a certain style of programming appear to
offer alternatives to it. Application of TFP is expected to lead to a number of significant outcomes,
theoretical as well as practical. Primary among these are novel programming languages to lessen or
eliminate the use of interpretation in programming, leading to better-quality software. However,
TFP contains a number of lacunae in its current formulation, which hinder development of these
outcomes. Among others, formal semantics and type-systems for TFP languages are yet to be
discovered, the means to reduce interpretation in programs is to be determined, and a detailed
explication is needed of interpretation, definition, and the differences between the two. Most
important of all however is the need to develop a complete understanding of the nature of
interpretation. In this work, suitable type-systems for TFP languages are identified, and guidance
given regarding the construction of appropriate formal semantics. Techniques, based around the
‘fold’ operator, are identified and developed for modifying programs so as to reduce the amount of
interpretation they contain. Interpretation as a means of language-extension is also investigated.
v
Finally, the nature of interpretation is considered. Numerous hypotheses relating to it considered in
detail. Combining the results of those analyses with discoveries from elsewhere in this work leads
to the proposal that interpretation is not, in fact, symbol-based computation, but is in fact something
more fundamental: computation that varies with input. We discuss in detail various implications of
this characterisation, including its practical application. An often more-useful property, ‘inherent
interpretiveness’, is also motivated and discussed in depth. Overall, our inquiries act to give
conceptual and theoretical foundations for practical TFP.

