| M. Hoang, J. Mitchell, and R. Viswanathan. Standard ML-NJ weak polymorphism and imperative constructs. In Proc. IEEE Symposium on Logic in Computer Science, pages 15-25, 1993. |
....introduces imperative type variables for references, marked by a , which must be instantiated to ground types whenever a side e ect may occur, i.e. after any function application or reference cell creation. This was extended in Standard ML of New Jersey to allow for deeper curried functions [6, 5]. You can see in the comparison table that imp map may take two arguments before requiring ground instantiation. This subsumes the Tofte discipline: you just have to replace by . While above typings do allow some degree of polymorphism, one may remark that references in imp map are purely ....
M. Hoang, J. Mitchell, and R. Viswanathan. Standard ML-NJ weak polymorphism and imperative constructs. In Proc. IEEE Symposium on Logic in Computer Science, pages 15-25, 1993.
....(like the implementation of CML [14] which also uses unsafe features of SML NJ) We have developed an informal argument for the correctness of the implementation of our module; a fully formal argument is one of our current interests. Notice that the signature involves weak type variables (cf. [8, 19]) If SML were modified to have value only polymorphism, the signature of this module would be identical but without the weaknesses on the type variables. The weaknesses never cause a problem in translating programs in our language to SML, since our language has value only polymorphic let. ....
My Hoang, John C. Mitchell, and Ramesh Viswanathan. Standard ML-NJ weak polymorphism and imperative constructs. In Proceedings, Eighth Annual IEEE Symposium on Logic in Computer Science, pages 15--25, 1993.
....Many call by value languages include imperative features like references, exceptions, and continuations that facilitate concise and efficient programs. Several solutions to integrating imperative features with HindleyMilner polymorphism in call by value languages have been devised [1] 3] 4] [8], 9] 11] 17] 18] 19] These solutions range in complexity from Tofte s relatively simple method that Standard ML adopted to Talpin s sophisticated system that infers types, regions, and effects. All of these solutions assign types to all purely functional expressions that are typable by ....
....and some may not. Exactly which type variables can be generalized is undecidable. A sound solution to typing reference cells must avoid generalizing type variables that appear in the types of shared reference cells. 2.1. Conservative solutions The solutions devised to date [1] 3] 4] [8], 9] 11] 17] 18] 19] are conservative extensions of the Hindley Milner type system. That is, they assign types to all HM typable expressions. Conservative solutions require determining whether and to what degree a let expression s binding uses imperative features. Hence these solutions ....
[Article contains additional citation context not shown here]
Hoang, M., J. Mitchell, and R. Viswanathan. "Standard ML-NJ weak polymorphism and imperative constructs," In Proceedings of the Eighth Annual Symposium on Logic in Computer Science (June 1993) 15--25.
....in SML NJ. Our encoding is clearly of the same flavor as the untyped encoding of shift and reset [22] into Scheme with callcc, but it is not easy to relate them in a precise way, since the languages that they encode are also different. Notice that the signature involves weak type variables (cf. [10, 26]) If SML were modified to have value only polymorphism, the signature of this module would be identical but without the weaknesses on the type variables. The weaknesses never cause a problem in translating programs in our language to SML, since our language has value only polymorphic let. ....
My Hoang, John C. Mitchell, and Ramesh Viswanathan. Standard ML-NJ weak polymorphism and imperative constructs. In Proceedings, Eighth Annual IEEE Symposium on Logic in Computer Science, pages 15--25, 1993.
....our type system did not include polymorphic let expressions, the preceding changes would suffice to type Box Scheme. But as many authors have noted, naively combining Hindley Milner polymorphism and assignment leads to an unsound type system [62] Many solutions to this problem have been proposed [6, 14, 22, 29, 35, 38, 57, 60, 61, 62]. We adapt our own solution [62] which is the simplest of all. This solution restricts polymorphism to syntactic values. That is, we replace Pure Scheme s static type inference rule for let expressions (Figure 3.3) with the following two inference rules. 62 A e : 1 A (box e) box 1 ) ....
Hoang, M., Mitchell, J., and Viswanathan, R. Standard ML-NJ weak polymorphism and imperative constructs. In Proceedings of the Eighth Annual Symposium on Logic in Computer Science (June 1993), pp. 15--25.
....the problem of combining polymorphic type inference and computational effects (including mutable references) have been conducted in recent years. The interested reader is referred to the work of Gifford, Jouvelot and Talpin [6, 9] Leroy and Weiss [7] Wright [12] Hoang, Mitchell, and Viswanathan [5], and Greiner [4] for further details and references. The author is grateful to Matthias Felleisen, Andrew Wright, and John Greiner for their comments and suggestions. ....
My Hoang, John Mitchell, and Ramesh Viswanathan. Standard ML-NJ weak polymorphism and imperative constructs. In Eighth Symposium on Logic in Computer Science, 1993.
....is the large body of To appear in Science of Computer Programming, vol. 32, nos. 2 3, 1998. This material is based upon work supported by the National Science Foundation under Grants No. CCR 9414421 and CCR 9400592. Preprint submitted to Elsevier Preprint 31 March 1997 work surrounding ML [4,21,14,5,11,24,22,19]. However, none of these e orts addresses the polymorphic typing of a language that combines variables, arrays and pointers ( rst class references) which are key ingredients of traditional imperative languages. As a result, they cannot be directly applied to get MLstyle polymorphic extensions of ....
....the data types, making pointers rst class values. 2.2 Achieving Type Soundness in Polymorphic C Much e ort has been spent trying to develop sound polymorphic type systems for imperative extensions of core ML. Especially well studied is the problem of typing Standard ML s rst class references [21,14,5,11,24]. The problem is easier in a language with variables but no references, such as Edinburgh LCF ML, but subtle problems still arise [4] The key problem is that a variable can escape its scope via a lambda abstraction as in letvar stk : in v: stk : v : stk (This evaluates to a push ....
My Hoang, John Mitchell, and Ramesh Viswanathan. Standard ML/NJ weak polymorphism and imperative constructs. In Proceedings of the 8th IEEE Symposium on Logic in Computer Science, pages 15-25, New York, 1993. IEEE.
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