| J. C. Mitchell, Coercion and type inference. In Proceedings 11'th ACM Symposium on Principles of Programming Languages, January 1984. |
....inheritance hierarchy, and in languages that support type conversion, the relation in the partial order is the conversion relation, such as int double, which means that an integer can be converted to a double. This latter relation is sometimes considered as subtyping between primitive data types [12]. In the Ptolemy II data type system, the type hierarchy if further constrained to be a lattice, and type constraints are formulated and solved over the lattice [15] We form a polymorphic type system at the system level through an approach similar to subtyping. Using the alternating simulation ....
J. C. Mitchell, "Coercion and Type Inference," 11th Annual ACM Symposium on Principles of Programming Languages, 175-185, 1984.
....[MOTW95] which relates linear logic to the call by need calculus of Ariola et al. We modify the Hindley Milner type system [Hin69, DM82] by attaching uses to types. Type judgements include a constraint set relating uses, similar to the constraint sets relating subtypes in the work of Mitchell [Mit84, Mit91]. As with the Hindley Milner system, there is an algorithm that determines a principal type for an expression. Annotating types with usage information also provides a convenient mechanism for communicating usage information across module boundaries, since typed languages such as Haskell already ....
....and polymorphism Before discussing what it means for a type to be principal for a given term, we first need to define when a type is an instance of another type. Our definition of instantiation is closely related to Mitchell s definition of instantiation for a type system with simple subtypes [Mit84, Mit91]. 5.1 Instantiation A substitution is a pair of finite maps. One component maps type variables to types, while the other maps use variables to uses. Whenever a type variable is replaced by a type, the new type must have the same usage: for each (a i i 7 i ) 2 S we require that S( i ) j i ....
J. C. Mitchell, Coercion and type inference (summary). In Proceedings 11'th ACM Symposium on Principles of Programming Languages, January 1984.
....type constructor can have any sort of arguments, so long as the constructor used is unique across all overload instances and no type parameter appears multiple times within its arguments. A different approach to type inference in the presence of implicit conversions is described by Mitchell [27]. This work is targeted at the different but related problem of general type inference in ML like languages. It is fundamentally different from the algorithm presented here, however, because it assumes that the set of coercions defines a subtyping relationship that extends to type constructors ....
John C. Mitchell. Coercion and type inference. In Proceedings of the 11th ACM SIGACT-SIGPLAN symposium on Principles of programming languages, pages 175--185, 1984.
....A with DV (A with [ FV (E with ) x2Dom(E) FV (E(x) with ) The typing rules are given in gure 1. They are very similar to the rules for ML, except for the additional handling of constraints, reminiscent of the treatment of subtyping hypotheses in type inference systems with subtypes [12, 6]. The rules de ne the proposition term a has type A under assumptions E and constraints , written E a : A with . The typing environment E is a partial mapping from term variables to type schemas. We write E[x A] for the environment identical to E, except that x is mapped to A. We assume the ....
J. C. Mitchell. Coercion and type inference. In 11th symposium Principles of Programming Languages, pages 175-185. ACM Press, 1984.
....constraints on the existence of fixed points. As mentioned in Section 2.2.2, not all generators are valid specifications of a fixed point. A generator fails to have a fixed point if its references to itself do not match its result type. The typing constraints are defined in terms of subtyping [6, 19]. 30 A generator is consistent if it has a fixed point. The relationship between # and # determines whether a generator is consistent. If # is a subtype of #, then any value of type # can be used as a value in #, and any generator that can be given the type # is consistent. Generator ....
J. C. Mitchell. Coercion and type inference (summary). In Proc. of the ACM Symp. on Principles of Programming Languages. ACM, 1984.
....analysis, such as detection of uncaught exceptions [3] data [4] or information [5] ow analyzes. In all cases, subtyping consists of a partial order on types and a subsumption rule that allows every expression which has type t to be used with any greater type t , as proposed by Mitchell [6] and Cardelli [7] The subtyping order may re ect a variety of concepts: inclusion of mathematical domains, class hierarchy in object oriented languages, information levels or principals in security analyzes, for instance. As a consequence, the de nition of the subtyping order itself varies. In ....
....annotations in programs which may become tedious in the presence of subtyping since such annotations would generally be verbose. Second, a variety of program analyzes may be described as type inference processes. The rst algorithm for type inference with atomic subtyping was proposed by Mitchell [6, 11] and improved for handling structural subtyping by Fuh and Mishra [12, 13] However, quoting Hoang and Mitchell [10] it has seen little if any practical use , mostly because it is inecient and the output, even for relatively simple input expressions, appears excessively long and cumbersome to ....
Mitchell, J.C.: Coercion and type inference. In: Proceedings of the 11th ACM Symposium on Principles of Programming Languages, Salt Lake City, ACM Press (1984) 175-185
....analysis, such as detection of uncaught exceptions [3] data [4] or information [5] ow analyzes. In all cases, subtyping consists of a partial order on types and a subsumption rule that allows every expression which has type t to be used with any greater type t , as proposed by Mitchell [6] and Cardelli [7] The subtyping order may re ect a variety of concepts: inclusion of mathematical domains, class hierarchy in object oriented languages, information levels or principals in security analyzes, for instance. As a consequence, the de nition of the subtyping order itself varies. In ....
....annotations in programs which may become tedious in the presence of subtyping since such annotations would generally be verbose. Second, a variety of program analyzes may be described as type inference processes. The rst algorithm for type inference with atomic subtyping was proposed by Mitchell [6, 11] and improved for handling structural subtyping by Fuh and Mishra [12, 13] However, quoting Hoang and Mitchell [10] it has seen little if any practical use , mostly because it is inecient and the output, even for relatively simple input expressions, appears excessively long and cumbersome to ....
Mitchell, J.C.: Coercion and type inference. In: 11th Symposium on Principles of Programming Languages. (1984) 175-185
....nonsensical expressions are regarded as well typed. For example, in Wadler Blott s system the expression true true is well typed, even though does not work on booleans. Kaes system has similar difficulties. Subtyping (without overloading) has been investigated by (among many others) Mitchell [11], Stansifer [15] Fuh and Mishra [4, 5] and Curtis [2] Mitchell, Stansifer, and Fuh and Mishra consider type inference with subtyping, but their Throughout this paper, we write functions in curried form. languages do not include a let expression; we will see that the presence of let makes it ....
John C. Mitchell. Coercion and type inference (summary). In Eleventh ACM Symposium on Principles of Programming Languages, pages 175--185, 1984.
....with respect to tractability of the satisfiability problem. 1.1 Background Our interest in the poset satisfiability problem is motivated by the area of type reconstruction problems for the case of simply typed lambda calculus with subtyping. The reader is referred to J. Mitchell s paper [Mitchell84] for introduction to that area as well as the basic reduction of the original problem of type reconstruction to the problem of poset satisfiability. O Keefe and Wand [OKeefeWand89] treat a similar reduction. The NP hardness result of section 2 of this paper has been used by Mitchell and Lincoln ....
John C. Mitchell. Coercion and Type Inference (summary). In Conf. Rec. 11th ACM Symposium on Principles of Programming Languages, pages 175--185, 1984.
....scenario, it seems that we need some mechanism to declare explicitly the subtyping relations between the names of abstract types in order to get the sort of subtyping behavior that we desire. Some relevant work, which we believe can be extended to support subtyping between abstract type names, is [Mit84] which develops a type system and algorithm for inferring most general types for pure lambda terms in the context of subtype declarations. In [Mit84] the system of subtyping relations between simple types is referred to as atomic subtyping, and can be thought of as a more general form of ....
....of subtyping behavior that we desire. Some relevant work, which we believe can be extended to support subtyping between abstract type names, is [Mit84] which develops a type system and algorithm for inferring most general types for pure lambda terms in the context of subtype declarations. In [Mit84] the system of subtyping relations between simple types is referred to as atomic subtyping, and can be thought of as a more general form of bounded quantification [CW85] There has been quite a bit of work done recently on developing systems with subtyping of records. The seminal work on ....
[Article contains additional citation context not shown here]
J.C. Mitchell. Coercion and type inference (summary). In Proc. 11-th ACM Syrup. on Principles of Programming Languages, pages 175-185, January 1984.
....of such that s t s t if and only if s s and t t . The type rules are those of simply typed calculus with typed constants together with the subsumption rule. The type inference problem is to decide if a given term is typable. This problem was introduced by Mitchell in 1984 [19] who showed that type inference is computable in NEXPTIME in the size of the program. If ( Sigma; is a disjoint union of lattices, then type inference is computable in polynomial time [23] Moreover, if ( Sigma; is itree likej, then type inference is computable in polynomial time [6] In ....
John Mitchell. Coercion and type inference. In Eleventh Symposium on Principles of Programming Languages, pages 175185, 1984.
.... and extended to types such that two base types are ordered only if they are identical, and for arrow types: Gamma t s if and only if s s; u u; v v and t t so argument types are ordered contravariantly. This is inspired by the work on structural subtyping by Mitchell [12] and others. We denote by t the least upper bound operation on the trust lattice. In Section 5 we discuss several extensions of the type system to cope with recursion, polymorphism and more general lattices. 3.1 Rules A type assumption A is a partial function which takes a program identifier to ....
....the flow of confidential information out of a trusted computer system, dually to our analysis that aims at preventing untrustworthy information from entering into a secure facility. Also, the above analyses all deal with procedural, imperative languages without higher order functions. In [12] Mitchell developed the structural subtyping idea and our type system borrows some of these ideas to handle automatic coercion from trusted data to untrusted data. Our type system extends the basic Curry types with annotations in the same spirit as Talpin and Jouvelot s effect systems [17] ....
John Mitchell. Coercion and type inference. In Eleventh Symposium on Principles of Programming Languages, pages 175--185, 1984.
....previous examples only demonstrate type indexed values which have only one type index, the embedding projection based approach can be readily applied to implementing values indexed by more than one type indices. Here let us take the example of writing an ML function that performs subtype coercion [22]. Given a from type, a to type, a list of subtype coercions at base types, and a value of the from type, this function coerces the value to the to type and return it. Following the general pattern, we first write a function univ coerce, which performs the coercions on tagged values. The function ....
John C. Mitchell. Coercion and type inference. In Ken Kennedy, editor, Proceedings of the Eleventh Annual ACM Symposium on Principles of Programming Languages, pages 175--185, Salt Lake City, Utah, January 1984.
....merge of both CHR programs gives rise to a new typed constraint system which enjoys nice semantical properties. This is illustrated with examples of typed uni cation and TCLP programs. 1 Introduction The notion of subtyping is a fundamental concept introduced by Cardelli [5] and by Mitchell [10] in the context of functional languages, as another form of polymorphism complementing parametric polymorphism. The power of subtyping rests on the subsumption rule, that expresses the substitutivity of any expression of type wherever an expression of type 0 is expected, provided that is a ....
....done by uni cation. With subtyping, type inference is equivalent to solving a system of inequalities between type expressions. Several algorithms for solving subtyping inequalities have been proposed in the litterature. They can be classi ed along several axes: the domain of types: nite types [10, 9, 7], recursive types [4, 15, 11] or in nite types [14] the structure of types: lattices [4, 13, 11] quasi lattices [12] posets with suprema [6] partial orders [7] the subtyping relation: structural extension of a subtyping relation on basic types, subtyping relation between di erent type ....
J. Mitchell. Coercion and type inference. In Proceedings of the 11th Annual ACM Symposium on Principles of Programming Languages POPL'84, pages 175-185, 1984.
....test for colored points is expected, a complete set of comparison operations for arbitrary points de nitely meets the goal. 2. 5 Partial type inference As is well known, polymorphic subtyping systems need types quali ed by subtype constraints in order to preserve a notion of principal types [Mit84, FM90, Hen96]. This is easily demonstrated by the following archetypical polymorphic function: twice f x = f (f x) In Haskell, twice has the principal type (a a) a a from which every other valid type for twice (e.g. Point Point) Point Point) can be obtained as a substitution instance. ....
J. Mitchell. Coercion and type inference. In ACM Principles of Programming Languages, 1984.
.... is proposed in [41, 22, 23] Undecidability of bounded polymorphism is shown in [84] Abstract data types are employed in [86, 85] their relation to classes is discussed earlier in [31] Large languages are presented in [13, 11] Slide 86 Type inference for simple subtyping is developed in [69, 102, 59, 74, 105, 55, 104]. Slide 88 94 Class inference is developed in [101, 45, 79, 76, 4] Slide 96 ML modules are described in [67, 106] Slide 97 Approaches to genericity are discussed in [63, 49, 61, 73, 83] Annotated Bibliography 104 Slide 98 Multi methods are presented in [53, 72, 24, 25] Slide 99 The Self ....
John C. Mitchell. Coercion and type inference. In Proc. POPL'84, Eleventh Annual SIGPLAN--SIGACT Symposium on Principles of Programming Languages, pages 175--185, 1984.
.... Tiuryn and Urzyczyn have shown that type inference for a type system which combines inclusion polymorphism and parametric polymorphism is undecidable for second order types [TU96] On the other hand, type inference for inclusion polymorphism combined with nullary type constructors is decidable: [Mit84, Mit91] presents an algorithm called MATCH, which solves type inequations in the case that only inequations between nullary type constructors are allowed. Fuh and Mishra [FM90] introduce a similar algorithm to solve the same problem. The logic programming language Protos L [Bei95a] is based on this type ....
....are either nullary or unary. Unary type constructors occur naturally when dealing with container types, e.g. types that are interpreted as sets, lists, or bags. It is convenient to be able to cast, for example, lists to sets. This cannot be done with the type system proposed by Mitchell [Mit84], but is possible with the type system introduced in this paper. Previously, it has been know that type inference is decidable for a system that restricts inclusion polymorphism to nullary type constructors [FM90, Mit84, Mit91] On the negative side, Tiuryn and Urzyczyn [TU96] have shown that the ....
[Article contains additional citation context not shown here]
John C. Mitchell. Coercion and type inference. In 11th Annual ACM Symposium on Principles of Programming Languages, pages 175--185, 1984.
....test for colored points is expected, a complete set of comparison operations for arbitrary points definitely meets the goal. 2. 5 Partial type inference As is well known, polymorphic subtyping systems need types qualified by subtype constraints in order to preserve a notion of principal types [Mit84, FM90, Hen96] This is easily demonstrated by the following archetypical polymorphic function: twice f x = f (f x) In Haskell, twice has the principal type (a a) a a from which every other valid type for twice (e.g. Point Point) Point Point) can be obtained as a ....
....: # and # #P # # # #, then #, # # = P e : # succeeds, fv(#) #, and # #P # # # . Detailed proofs of this and other results stated in this section can be found in the author s dissertation [Nor99] 28 7 Related work Algorithms for polymorphic subtype inference are described in [Mit84, FM90, FM89, Mit91, Kae92, Smi94, AW93, EST95, FA96, Hen96, Pot96, TS96, Reh97, MW97, Seq98, Pot98, MOW99, Pot00] Strategies for simplification of the inferred constraint sets are discussed in [FM89, AW93, EST95, Reh97, MW97, Pot98, Pot00] in particular. The choice to settle for a deliberately ....
J. Mitchell. Coercion and type inference. In ACM Principles of Programming Languages, 1984.
....of the relationship between this approach and those of [Rem89, CM90] are given in [HP90] 1.3 Example: subtyping Languages with subtyping can be described using predicates of the form oe oe 0 , representing the assertion that oe is a subtype of oe 0 . Many such systems, including those of [Mit84, FM89], allow the use of implicit coercions from one type to another. The extensions required to support this are discussed in Section 7.4. 3 2 Polymorphic calculus with qualified types 2.1 Basic definitions In this section, we work with a variant of the polymorphic calculus that includes ....
....Figure 1 are only suitable for reasoning about systems with explicit coercions. For example, if Int Real , then we can use an addition function: add : 8a:a Real ) a a Real to add two integers together, obtaining a real number as the result. More sophisticated systems, such as those in [Mit84, FM89], cannot be described without adding a form of the rule of subsumption: P j A M : 0 P 0 P j A M : Each use of this rule corresponds to an implicit coercion; the addition of two integers to obtain a real result can be described without explicit overloading using a function: add ....
John C. Mitchell. Coercion and type inference (summary). Proceedings of the 11th annual ACM symposium on Principles of Programming Languages, 1984.
.... len( a ; b ; c ) The lambda expression may be typed 8ff : ff list int. This allows the length function len to be applied to both integer and character lists in the body of the let expression. The usual way to deal with the subtyping rule [SUB] is to infer sets of inclusion constraints [Mit84, FM90, AW93]. Since the inclusion order on types is reflexive and transitive, it is sufficient with exactly one application of the [SUB] rule between the other rules. This makes it possible to split the type checking inference process into two separate tasks. In the first part the expression is traversed. For ....
John C. Mitchell. Coercion and type inference (summary). In Conference Record of the Eleventh Annual ACM Symposium on Principles of Programming Languages (POPL'84), pages 175--185, 1984.
.... related proposal, combining user declared subtyping with an extensible form of abstype declarations, appears in Jategaonkar and Mitchell s ML language [JM88, Jat89] Their typechecking algorithm combines features of Mitchell s subtype inference for lambda calculus with primitive subtyping [Mit84] with the abstype names playing the role of primitive types) with Wand s row variable polymorphism [Wan87] Mutually recursive datatypes without subtyping have been treated many several times in the literature, using surprisingly different definitional styles [MTH90, LO94, HS96, HS98, Van96, ....
John C. Mitchell. Coercion and type inference (summary). In Proc. 11th ACM Symp. on Principles of Programming Languages, pages 175--185, January 1984.
....to memory cells containing elements of type set(t 0 ) Pointer dereferencing is then the operational analogue to invoking the conversion rule for a value of type t to get a value of type set(t 0 ) We refine the simple type inference system for SQ2 to a subtype inference system (c.f. Mit84, FM88] by adding propositional formulas of the form 0 and the rule schemes presented in Appendix C. The rules specify that type containments are reflexive, transitive and closed with respect to type constructors set( and ( The rule (COERCE) connects the type containments to SQ2 ....
J. Mitchell. Coercion and type inference. In Proc. 11th ACM Symp. on Principles of Programming Languages (POPL), 1984.
....A subtype relation is required to relate base types only to base types and to satisfy some order theoretic conditions. The former restriction is a consequence of the intended application to simply typed terms, the latter a generalization of different particular choices found in the literature [14, 22]. The precise definitions are given in Section 2. After introducing fi and j reduction on our typed terms, we find that their combination creates a confluence problem (Section 3) This problem is overcome with the introduction of a typed equality of the form s = t : which is closely related to ....
....of generality since terms will only be considered modulo ff conversion defined below. The set of all free variables in a syntactic object O is denoted by FV(O) Given a relation on types, a term t has type (with respect to ) if t : can be derived by the following well known rules (see e.g. [14]) a 2 A a : intro) 2 x 2 V oe ; u : x:u : oe (abs) u : oe ; v : oe (u v) app) u : oe; oe u : coerce) If we want to emphasize that t : holds with respect to some particular relation we write t : A term t is (well )typed if t : for some type ; t is ill typed if ....
[Article contains additional citation context not shown here]
J. C. Mitchell. Coercion and type inference. In Proc. 11th ACM Symp. Principles of Programming Languages, pages 175--185, 1984.
....more such results for restrictions of 0 CFA have later been presented by Heintze [26] One of Heintze s results was not completely correct; see the paper by Palsberg [48] for a correct version of that result. The Amadio Cardelli type system, in turn, is equivalent to a form of constrained types [42, 43, 5, 21, 20], as shown by Palsberg and Smith [51] In this paper we address the above question for a family of polyvariant ow analyses. Let us next examine three of the main approaches to polyvariant ow analysis. The best known approach may be that of using call strings, that is, nite approximations of the ....
John Mitchell. Coercion and type inference. In Eleventh Symposium on Principles of Programming Languages, pages 175-185, 1984.
....the other hand, if log and n have (most general) types real real and int, respectively, then the application (log n) is deemed illegal as well. Yet, because integers are mathematically a subset of reals, one may actually wish for this term to be accepted. To overcome this limitation, Mitchell [Mit84] suggests enriching these type systems with subtyping. This involves introducing a partial order on types, together with a new typing Address: INRIA Rocquencourt, BP 105, 78153 Le Chesnay Cedex, France. This paper is to appear in Information Computation. 1 rule, stating that if 0 ....
....Systems equipped with subtyping have a combination of type instantiation and subtyping as their notion of type compatibility. As a result, the type inference problem no longer reduces to solving a set of equations. Instead, it requires solving a set of inequalities, usually called constraints [Mit84, Pal95]. This process is theoretically straightforward, but costly, because the ecient uni cation algorithms developed to solve equations [JK90] can no longer be used. Why, then, should we wish to perform type inference Would it not be sucient to require the programmer to supply type annotations, and ....
[Article contains additional citation context not shown here]
John C. Mitchell. Coercion and type inference. In 11th Annual ACM Symposium on Principles of Programming Languages, pages 175-185, January 1984.
....of type operations including limited union and intersection types, a type complement, and a notion of conditional type. Versions of constrained types which either disallow recursive constraints [Smi94, Kae92, BM96] or use a notion of subtyping which relates types with the same structure only [Mit84, Mit91, MR85, FM88] have also been studied but are of less interest for our approach to typing classes and objects (discussed in Section 6 below) which requires recursion and record subtyping. 1 One consequence of such a type representation is the possibility for over constraining a type, for ....
John C. Mitchell. Coercion and type inference (summary). In Conference Record of the Eleventh Annual ACM Symposium on Principles of Programming Languages, 1984.
....: V n g FV (E with Gamma) x2Dom(E) FV (E(x) with Gamma) The typing rules are given in figure 1. They are very similar to the rules for ML, except for the additional handling of constraints, reminiscent of the treatment of subtyping hypotheses in type inference systems with subtypes [12, 6]. The rules define the proposition term a has type A under assumptions E and constraints Gamma , written E a : A with Gamma. The typing environment E is a partial mapping from term variables to type schemas. We write E[x A] for the environment identical to E, except that x is mapped to A. ....
John C. Mitchell. Coercion and type inference. In Principles of Programming Languages 1984, pages 175--185. ACM Press, 1984.
....a fundamental concept in the theory of typed programming languages. Its basic principles are typically studied in extensions of the simply typed lambda calculus. Following this line of research, the present paper studies a problem in the standard system of structural subtyping defined by Mitchell [15, 16] and subsequently studied extensively by many others (see references below. In structural subtyping a poset P of base types is lifted to an order (subtype) relation on structured types. This is done via a subtype logic P which defines derivable judgements of the form C P 0 , where C is a ....
J. Mitchell. Coercion and type inference (summary). In Proc. 11th ACM Symp. on Principles of Programming Languages (POPL), pages 175--185, 1984.
....since inferred type constraints are hard to read even in the absence of objects. The remainder of this section is dedicated to the comparison with three other proposals for adding objects to ML. They all use implicit subtyping, which is, however, restricted to atomic structural subtyping [22, 13]. As a result, they all have the same difficulty with parameterized classes, making it impossible to relate objects created from classes with a different number of parameters, even when the objects have the same interface. For instance, objects of a class string are of incompatible type with ....
John C. Mitchell. Coercion and type inference. In Eleventh Annual Symposium on Principles Of Programming Languages, 1984.
....implementations. 1 Introduction Subtyping is considered as a key feature of object oriented languages because it adds another important flavor of polymorphism to the parametric polymorphism of functional languages. The power of subtyping rests on the subsumption rule introduced by Mitchell [Mit84] e : t t u e : u (1) This rule expresses the substitutivity of any expression of type t wherever an expression of type u is expected, provided that t is a subtype of u. It allows, for example, an heterogeneous list to be typed provided all its elements have subtypes of a given type. In this ....
....of inequalities, as far as typability is concerned. Many type systems with subtyping have been studied in the literature since the work of Mitchell. Amongst other characteristics, they can be classified according to the structure over which the systems of inequalities are to be solved. Mitchell [Mit84] followed by Fuh and Mishra [FM88,FM89] proposed simple (finite) types as in traditional ML. In this structure, the example above cannot be solved, because of the self application (xx) Amadio and Cardelli [AC93] then put forward recursive types. They are required in the context of ....
[Article contains additional citation context not shown here]
J. Mitchell. Coercion and type inference (summary). In Conference Record of the Eleventh Annual ACM Symposium on Principles of Programming Languages, pages 175--185. ACM, ACM, January 1984.
....the algorithm cannot be complete; however, we provide a completeness result w. r. t. the Hindley Milner type system as a form of characterizing lower bound. 1 Introduction The combination of subtyping with polymorphic type inference has been under intensive study for more than a decade [Mit84, FM90, FM89, Mit91, Kae92, Smi94, AW93, EST95, Hen96, Reh97, MW97] From the outset, this line of research has focused on complete inference algorithms, and the related notion of principal types. This direction is not hard to justify considering the evident merits of polymorphic languages like ML ....
....We will also provide some evidence why the algorithm is likely to work very well in practice. A second contribution of the paper is presumably the subtype relation itself, which is based on name inequivalence, in contrast to the structural ditto that dominate the standard literature [CW85, Mit84] By structural we mean the common practice of defining special subtyping rules for functions, records, and variants, etc, assuming a given partial order over a set of nullary base types. We will instead assume that type constants can be of any arity, and extend the partial order on base types to ....
[Article contains additional citation context not shown here]
J. Mitchell. Coercion and type inference. In ACM Principles of Programming Languages, 1984.
....with bounded quantification. Under this system, we give it the type (using the notation of [EST95] we put the bounds after the type) val colorOf : a color ( a : point) and give the selector PT move the type a real a ( a : point) The type system resembles the systems of [Mit84, Mit91] constraints must be between variables and object types only. The type rules for the core of the language can be found in the Appendix. 3 Classes Abadi and Cardelli show how classes can be encoded as stylized objects, consisting of a new operation and pre methods [AC95] In OML, we can use ....
John C. Mitchell. Coercion and type inference (summary). In Conference Record of the 11th Annual ACM Symposium on Principles of Programming Languages, pages 175--185, January 1984.
....to a type system with subtyping, such that an expression of a trusted type can automatically be coerced to an untrusted type. The ordering between base types as determined by their trustworthiness is extended to higher types using the usual contra co variant structural subtyping idea of Mitchell (Mitchell, 1984), Fuh and Mishra (Fuh Mishra, 1990) Cardelli (Cardelli, 1984) and others. The trust type system differs from many other type systems in that given a bare value (e.g. 7) it is not possible to see by just examining the value whether it is trustworthy or not. This is where our three extensions to ....
....identical; for annotated types we have: t u s v if and only if u v and t s; and for bare arrow types we define: oe 0 oe 0 if and only if 0 and oe oe 0 ; so argument types are ordered contravariantly. This is inspired by the work on structural subtyping by Mitchell (Mitchell, 1984), Fuh and Mishra (Fuh Mishra, 1990) Cardelli (Cardelli, 1984) and others. As in the denotational semantics we denote by t the least upper bound operation on the trust lattice according to the ordering. In Section 5 we discuss several extensions of the type system to cope with recursion, ....
[Article contains additional citation context not shown here]
Mitchell, John. (1984). Coercion and type inference. Pages 175--185 of: Eleventh symposium on principles of programming languages.
....term with a run time type error cannot be reduced under the reduction rules, both properties imply that welltyped programs do not cause run time type errors. The third technical result relates the typechecking rules to a type inference algorithm. The algorithm, a modification of the one found in [Mit84] itself relies on a modification of the standard unification algorithm: one finds most general unifiers subject to a set of atomic subtyping constraints. The algorithm finds a principal type (or most general type) for an expression. The second technical result is the place where OML and OML ....
....the algorithm for OML , but not conversely. We have made a fundamental tradeoff in the design of OML to simplify the type system: the algorithm for OML deduces types with bounded quantification, whereas the algorithm for OML uses simple subtyping. In fact, a rather old example due to Mitchell [Mit84] shows that type inference in OML cannot produce a principal type. Consider the function fn p = case (p, PT x p) of (x, x This expression has type 8 ff OE pt:ff ff in OML , and so has both the type pt pt (which is what OML assigns to it) and the type cpt cpt. Since these types are ....
[Article contains additional citation context not shown here]
Mitchell, J. C. Coercion and type inference (summary). In Conference Record of the 11th Annual ACM Symposium on Principles of Programming Languages, January 1984, pp. 175-- 185.
....for Sigma 2 , and we leave to the reader to construct an appropriate structure. The result is the first type inference algorithm for this system. 6 Related work Huet [16] gave the first unification algorithm for recursive types; see also the papers by Cardone and Coppo [7, 8] Mitchell [23, 24] gave the first inference algorithm for atomic subtyping, without recursive types. With no further assumptions about the partial order, this problem is PSPACE complete [35, 15, 12] and if the partial order is a disjoint union of lattices or trees, then type inference is in polynomial time [35, ....
John Mitchell. Coercion and type inference. In Conference Record of the Eleventh Annual ACM Symposium on Principles of Programming Languages, pages 175--185, 1984.
....only the features we are interested in so as to understand them independently of their possible interactions with other language features. This is not to say that other features are irrelevant or of less interest. In fact, operator overloading [52,118] implicit and explicit type coercions [103,78,27], abstract and dependent types [82,69,34] recursive types [110,70,77] and especially inclusion polymorphism [10,11,112,50,98,121,122] a type theoretic view of the behavior of object oriented programming languages, are significant in the typing disciplines of modern strongly typed programming ....
J. Mitchell. Coercion and type inference. In Proc. 11th ACM Symp. on Principles of Programming Languages (POPL), 1984.
....in [20] It is a syntax directed algorithm, similar to Milner s algorithm W , and it relies on the results about unification proved in the present paper. A different approach to region inference is to use constraints. Constraints have been used in previous work on ML type inference[5] subtyping [12, 4] and effect systems[19, 18, 14, 13] We are currently exploring using constraints for region inference. The relative merits of the two approaches to region inference (syntax directed region inference versus constraint generation and constraint solving) are not clear at the time of writing. In both ....
J. Mitchell. Coercion and type inference. In Proc. 11th ACM Symp. on Principles of Programming Languages (POPL), 1984.
.... type t can be used to represent collections of values of type s [1] t Dual s Values of types t and s represent the elements of dual lattices [9] s t s is a subtype of t ; in practice, this usually means that values of type s can be treated as values of type t by applying a suitable coercion [16, 17, 4, 3, 19]. r has l : t r is a record type containing an field labelled l of type t [6] r lacks l r is a record type, not including a field labelled l [6] r1#r2 The record types r1 and r2 do not have any fields in common [5] Figure 1: Examples of individual predicates and their informal interpretation ....
.... ) c Int) b Int : Now, as is often the case, improvement exposes new opportunities for simplification, and we can further refine the type of g to: 8b:8c: b c) c Int) b Int : Note that improvement can be considered as a generalization of the use of Mitchell s MATCH algorithm [16, 17]. 4.3 Improving type classes In this section, we will show how improvement can be used to support the use of type classes, concentrating in particular on the proposals by Chen, Hudak and Odersky [1] for parametric type classes. Several researchers, including this author, have experimented with ....
[Article contains additional citation context not shown here]
J.C. Mitchell. Coercion and type inference (summary). In Conference record of the Eleventh Annual ACM Symposium on Principles of Programming Languages, Salt Lake City, Utah, January 1984.
....[MOTW95] which relates linear logic to the call by need calculus of Ariola et al. We modify the Hindley Milner type system [Hin69, DM82] by attaching uses to types. Type judgements include a constraint set relating uses, similar to the constraint sets relating subtypes in the work of Mitchell [Mit84, Mit91]. As with the Hindley Milner system, there is an algorithm that determines a principal type for an expression. Annotating types with usage information also provides a convenient mechanism for communicating usage information across module boundaries, since typed languages such as Haskell already ....
....and polymorphism Before discussing what it means for a type to be principal for a given term, we first need to define when a type is an instance of another type. Our definition of instantiation is closely related to Mitchell s definition of instantiation for a type system with simple subtypes [Mit84, Mit91]. 5.1 Instantiation A substitution is a pair of finite maps. One component maps type variables to types, while the other maps use variables to uses. Whenever a type variable is replaced by a type, the new type must have the same usage: for each (a i i 7 i ) 2 S we require that S( i ) j i ....
J. C. Mitchell, Coercion and type inference (summary). In Proceedings 11'th ACM Symposium on Principles of Programming Languages, January 1984.
.... the intermediate language of constraints as the front end of our analysis and the algorithm(s) 5 Similar considerations can be applied to other type inference problems to derive systematically reductions to solvability of type constraint systems; in particular, the reductions of Mitchell [Mit84] Wand [Wan87] Fuh and Mishra [FM88] Stansifer [Sta88] Henglein [Hen88b] can be derived in this fashion. for solving these constraints as its back end . We hope that, possibly after some suitable generalization, our constraints are both expressive enough to capture many interesting program ....
J. Mitchell. Coercion and type inference. In Proc. 11th ACM Symp. on Principles of Programming Languages (POPL), 1984.
....considerable interest recently both from a type inference standpoint and a program analysis standpoint consists in setting up systems of set inclusion constraints (set inequations) and solving them iteratively. This technique has been used to perform type inference for type systems with subtyping [25, 3, 14]. The same technique is also at the basis of several flow analyses for functional and object oriented languages [35, 36, 17, 1, 32, 19, 11] These analyses approximate the flow of control and data in the presence of first class functions and objects, and are very effective to optimize function ....
John C. Mitchell. Coercion and type inference. In 11th symposium Principles of Programming Languages, pages 175--185. ACM Press, 1984.
....and the related type system turned out to be the one of Amadio and Cardelli [4] with subtyping and recursive types. Three more such results for restrictions of 0 CFA have later been presented by Heintze [18] The Amadio Cardelli type system, in turn, is equivalent to a form of constrained types [28, 29, 3, 13, 12], as shown by Palsberg and Smith [35] In this paper we address the above question for a family of polyvariant flow analyses. 1.2 Our Result We present the first formal relationship between polyvariant analysis and standard notions of type. In the spirit of Nielson and Nielson [31] we study a ....
John Mitchell. Coercion and type inference. In Eleventh Symposium on Principles of Programming Languages, pages 175--185, 1984.
....inference with subtyping, we will consider ML an explicitly typed language, as explained in [MH88] However, based on past experience, we do not foresee any serious obstacles in extending ML style type inference to our language. The reader concerned with type inference and subtyping may consult [Mit84, Wan87, R em89, JM88] In Section 2, we give an informal introduction to the module language by describing two simple stack examples. Section 3 follows with a brief glossary of basic terminology. In Section 4, we briefly outline our use of subtyping. The main features of our form of modules are ....
....ML with subtypes Subtyping is a general extension to Standard ML which effects both the so called core language of basic expressions and declarations, as well as the module system. Since the subtyping ideas we use, outside of the module system, have been proposed in previous papers [CW85, Mit84, JM88] CM89] we will only give a brief summary of subtyping. More detailed discussion of subtyping for specifications and structures appears in Section 5. We use the notation A : B to indicate that A is a subtype of B. There are five ways that a type A may become a subtype of B, depending on ....
J.C. Mitchell. Coercion and type inference (summary). In Proc. 11-th ACM Symp. on Principles of Programming Languages, pages 175--185, January 1984.
No context found.
J. C. Mitchell, Coercion and type inference. In Proceedings 11'th ACM Symposium on Principles of Programming Languages, January 1984.
No context found.
J. Mitchell, "Coercion and type inference", Proc. POPL'84, p.175-185, 1984.
No context found.
Mitchell, J.C.: Coercion and type inference. In: 11th Principles of Programming Languages. (1984)
No context found.
John C. Mitchell. Coercion and type inference. In Proceedings of the 11th ACM Symposium on Principles of Programming Languages, pages 175--185, Salt Lake City, January 1984. ACM Press.
No context found.
J. Mitchell. Coercion and type inference. In Proceedings of the 11th Annual ACM Symposium on Principles of Programming Languages POPL'84, pages 175-185, 1984.
No context found.
Mitchell, John, Coercion and Type Inference, In Eleventh Annua/ACM Sympo- sium on Principles of Programming Languages, pp. 175-185, 1984.
No context found.
John C. Mitchell. Coercion and type inference. In Eleventh Annual Symposium on Principles Of Programming Languages, 1984.
First 50 documents Next 50
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC