| Martn Abadi, Luca Cardelli, Benjamin Pierce, and Gordon Plotkin. Dynamic typing in a statically typed language. ACM Transactions on Programming Languages and Systems, 13(2):237-268, April 1991. 31 |
....and metacircular interpretation are powerful features found in dynamically typed programming languages but have proven dicult to incorporate into statically typed languages such as Haskell or Standard ML. Past approaches have included adding a rst class Dynamic type and typecase expressions [1, 2, 19], de ning generic functions by translation from polytypic languages to existing languages [15, 13] and implementing staged computation with run time type checking [8, 23] or compile time computation [22] Recently, Cheney and Hinze [6] and Baars and Swierstra [4] found that many of these ....
Martn Abadi, Luca Cardelli, Benjamin Pierce, and Gordon Plotkin. Dynamic typing in a statically typed language. ACM Transactions on Programming Languages and Systems, 13(2):237-268, April 1991.
....of this work is the combination of dynamics with a polymorphic type discipline. This combination raises interesting issues that have not been addressed yet. The main published references on dynamics have only considered rst order types [1] or rst order types with subtyping [5, 7] Abadi et al. [2] mention some of the problems involved with polymorphism, but brie y and informally. They reference a draft paper by Mycroft [21] that is said to consider the extension of ML with dynamics; this article has never been published, and we could not get a copy of it. Recently, Abadi et al. have ....
....at that point to guarantee type safety. This check must ensure that the internal type of the dynamic does match the type expected by the context. This operation is called coercion of a dynamic. Coercion is traditionally presented as a special syntactic construct, such as the typecase construct in [2]. This construct binds the internal value of the dynamic to some variable. It also handles the case where the run time type check fails, and another coercion must be attempted, or an exception raised. In ML, these two mechanisms, binding and failure handling, are already provided by the ....
[Article contains additional citation context not shown here]
Martn Abadi, Luca Cardelli, Benjamin Pierce, and Gordon Plotkin. Dynamic typing in a statically-typed language. ACM Transactions on Programming Languages and Systems, 13(2):237-268, 1991.
....described above, into the ML language [19] The main novelty of this work is the combination of dynamics with a polymorphic type discipline. This combination raises interesting issues that have not been addressed yet. The main published references on dynamics have only considered rst order types [1], or rst order types with subtyping [5, 7] Abadi et al. 2] mention some of the problems involved with polymorphism, but brie y and informally. They reference a draft paper by Mycroft [21] that is said to consider the extension of ML with dynamics; this article has never been published, and we ....
....pragmatic: curried dynamic matching, in conjunction with polymorphic dynamics, can lead to ambiguities in the bindings of types to existentially quanti ed type variables. Consider: let f = function 9 : dynamic(x : let d = dynamic(x) in function dynamic(y : d in f(dynamic [ dynamic [1]) The rst type matching succeeds with bound to : list, but the second matching requires to be narrowed to int list. It is unclear whether the dynamic d created between the two matchings should have internal type : list or int list. This problem does not arise if we require the actual ....
Martn Abadi, Luca Cardelli, Benjamin Pierce, and Gordon Plotkin. Dynamic typing in a statically-typed language. In 16th symposium Principles of Programming Languages. ACM Press, 1989.
....Hinze and Peyton Jones [18] introduced derivable type classes, which can define type indexed values within classes but are limited to kind #. Clean s generics system [3] generalizes derivable type classes to allow generic type classes defined at arbitrary kinds rather than just #. Abadi et al. [2] first considered rigorously the problem of adding a Dynamic type and type pattern matching typecase to a monomorphic ML like language. Leroy and Mauny [21] studied the interaction of Dynamic with implicit polymorphism and implemented a restricted form of polymorphic type pattern matching with ....
Mart n Abadi, Luca Cardelli, Benjamin Pierce, and Gordon Plotkin. Dynamic typing in a statically typed language. ACM Transactions on Programming Languages and Systems, 13(2):237--268, April 1991.
....treat constructor abstractions as values and constructor applications as significant computation steps. Standard strategies in this sense are used in Quest [4] and LEAP [35] and are directly compatible with extensions that make significant uses of types at run time (for example, dynamic types [1, 4]) Since polymorphic expressions are kept distinct from their instances, the anomalies that arise in implicitly polymorphic languages in the presence of references [45] and control operators [18] do not occur. The ML like strategies are inspired by the operational semantics of ML [29] ....
Mart n Abadi, Luca Cardelli, Benjamin Pierce, and Gordon Plotkin. Dynamic typing in a statically-typed language. In Proceedings of the Sixteenth Annual ACM Symposium on Principles of Programming Languages, Austin. ACM, January 1989.
....software by allowing functions to automatically adapt to changes in the representation of data. Other classic examples of polytypic operations include debuggers, comparison functions and mapping functions. The theory behind describing such operations has been developed in a variety of frameworks [1, 2, 4, 8, 12, 14, 17, 18, 27, 28, 30, 31]. Nevertheless, no single existing framework encompasses all polytypic de nitions. These systems are limited by what polytypic operations they may express and by what types they may examine. These de ciencies are unfortunate because advanced languages depend crucially on these features. Only some ....
Martn Abadi, Luca Cardelli, Benjamin Pierce, and Gordon Plotkin. Dynamic typing in a statically-typed language. ACM Transactions on Programming Languages and Systems, 13(2):237-268, April 1991.
....If in implementing Match , Element must look into a tuple space (because it is an element) then Element would have to be a subtype of Locking Object and acquire the appropriate locks to proceed. Distinguishing types of objects for this purpose can be done even in a statically typed system [ACPP89] 68 4.5.4 Problems with Typing Select in Object violates substitutability. It is covariant in its arguments which cannot be permitted for public operations. A public operation is one which can be invoked from outside of the type. There are also private operations. A private operation can only ....
Mart ' in Abadi, Luca Cardelli, Benjamin Pierce, and Gordon Plotkin. Dynamic Typing in a Statically-Typed Language. In Principles of Programming Languages, pages 213-- 227, January 1989.
....the data, an exception is thrown. A value of type Protected behaves very much like a value in dynamic checked information flow systems, since it carries a run time label. A Protected has an obvious analogue in the type domain: a value dynamically associated with a type tag (e.g. the Dynamic type [ACPP91]) One key to making Protected convenient is to label the instance variable lb with fthisg. Without this labeling, Protected would need an additional explicit covariant label parameter to label lb with. 2.11 Limitations JFlow is not completely a superset of Java. Certain features have been ....
Mart n Abadi, Luca Cardelli, Benjamin C. Pierce, and Gordon D. Plotkin. Dynamic typing in a statically typed language. ACM Transactions on Programming Languages and Systems (TOPLAS), 13(2):237--268, April 1991. Also appeared as SRC Research Report 47.
....and representative approaches to narrowing, are relevant. Barklund and Millroth [BM87] discuss dealing with alien ( hairy ) data structures in Prolog; their techniques bear some similarity with our sealed envelopes. A sound treatment of dynamic typing in an extension of SML is described in [ACPP89] Our type union is very similar to their type dynamic; however, we also consider partially instantiated and lazily evaluated expressions. In contrast, their treatment includes a typecase expression permitting dynamic type testing within the source language. The work most vitally related to ours ....
Mart'in Abadi, Luca Cardelli, Benjamin C. Pierce, and Gordon D. Plotkin. Dynamic typing in a statically typed language. Technical Report 47, DEC Systems Research Center, June 10, 1989. 17
....the different type constructors we, of course, make use of the corresponding relational constructors defined in the previous section. Our construction follows along the lines of Pitts [22] Definition 69. For all , define [ Radm ae Radm by induction on as follows. 0] R = R 0 [[1]]R = R 1 [ ae] R = R [ 1 Theta 2 ] R = 1 ] R Theta [ 2 ] R [ 1 2 ] R = 1 ] R [ 2 ] R [ 1 2 ] R = 1 ] R [ 2 ] R Note that the operation [ is well defined by induction on and Lemma 68. Definition 70. Define Phi : Radm ae Radm ae by Phi(R) def ....
....: vn ) 2 [ ae ] R) g Lemma 71. Phi is well defined. Lemma 72. Radm op Theta Radm ) ordered componentwise is a complete lattice. Definition 73. For all , define [ 0 : Radm op ae Theta Radm ae ) Radm by induction on as follows. 0] 0 (R Gamma ; R ) R 0 [[1]] 0 (R Gamma ; R ) R 1 [ ae] 0 (R Gamma ; R ) R [ 1 Theta 2 ] 0 (R Gamma ; R ) 1 ] 0 (R Gamma ; R ) Theta [ 2 ] 0 (R Gamma ; R ) 1 2 ] 0 (R Gamma ; R ) 1 ] 0 (R Gamma ; R ) 2 ] 0 (R ....
[Article contains additional citation context not shown here]
Mart'in Abadi, Luca Cardelli, Benjamin Pierce, and Gordon Plotkin. Dynamic typing in a statically typed language. ACM Transactions on Programming Languages and Systems, 13(2):237--268, April 1991.
....of our rules might be feasible from the perspective of decidability of the matching problem. Mycroft s work and several efforts since combine type patterns with dynamic typing, including the work of Leroy and Mauny [LeMa91] and that of Abadi, Cardelli et al. on the type system for Modula 3 [Ab 91]. Dynamic typing differs from our approach in that it is based on a special form of object which packages types and values together. Type patterns are used to analyze the type portion of a dynamic object and may fail if no appropriate pattern is available; functions defined using type patterns in ....
Martín Abadi, Luca Cardelli, Benjamin Pierce and Gordon Plotkin. Dynamic Typing in a Statically Typed Language, ACM TOPLAS vol. 13, pp. 237-268, 1991.
....level. The introductory forms are the constructors of kind Omega Gamma there are no introductory forms at the term level in order to preserve the phase distinction [9, 22] At the term level typerec may be thought of as a generalization of the typecase operation associated with the type dynamic [1] that provides for the definition of a term by induction on the structure of a monotype. At the constructor level Typerec provides a similar ability to define a constructor by induction on the structure of a monotype. As will become clear below, it is crucial to provide type recursion at both the ....
Mart'in Abadi, Luca Cardelli, Benjamin Pierce, and Gordon Plotkin. Dynamic typing in a staticallytyped language. In Proceedings of the Sixteenth Annual ACM Symposium on Principles of Programming Languages, Austin. ACM, January 1989.
....treat constructor abstractions as values and constructor applications as significant computation steps. Standard strategies in this sense are used in Quest [4] and LEAP [35] and are directly compatible with extensions that make significant uses of types at run time (for example, dynamic types [1, 4]) Since polymorphic expressions are kept distinct from their instances, the anomalies that arise in implicitly polymorphic languages in the presence of references [45] and control operators [18] do not occur. The ML like strategies are inspired by the operational semantics of ML [29] ....
Mart'in Abadi, Luca Cardelli, Benjamin Pierce, and Gordon Plotkin. Dynamic typing in a statically-typed language. In Proceedings of the Sixteenth Annual ACM Symposium on Principles of Programming Languages, Austin. ACM, January 1989.
....manner we envisage each site maintaining a trader, a nite map from strings to values that supports registration and lookup of resources. Agents would typically obtain the trader name associated with a site at the same time as obtaining the site name. For traders to be type sound a type Dynamic [ACPP91] is required. This paper provides only a starting point much additional work is required on algorithms, semantics, and implementation. The choice of infrastructure algorithm(s) for a given application will depend strongly on many characteristics of the application and target network, ....
Martn Abadi, Luca Cardelli, Benjamin Pierce, and Gordon Plotkin. Dynamic typing in a statically typed language. ACM Transactions on Programming Languages and Systems,, 13(2):237-268, April 1991.
....operator x 1 2 def = f: x: f( a: unfold (x)xa) fold ( x: f( a: unfold (x)xa) with = 1 2 can be implemented as follows, with k = hhbits 1 2 ii. E( x 1 2 ) f: x: f( a: dxe k xa) b x: f( a: dxe k xa)c k 2.4. 4 Dynamic Typing Dynamic typing [2] is a mechanism for injecting values of di erent types into a single dynamic type dyn in a type safe manner. t : j indyn (t) j let indyn (x) t 1 in t 2 else t 3 : j dyn v : j indyn (v) indyn (t) n def = case [ t] n of [v] n 0 ) indyn (v) n 0 j V ....
Martn Abadi, Luca Cardelli, Benjamin C. Pierce, and Gordon D. Plotkin. Dynamic typing in a statically typed language. ACM Transactions on Programming Languages and Systems, 13(2):237-268, 1991.
....xed point operator x 1 2 def = f: x: f( a: unfold (x)xa) fold ( x: f( a: unfold (x)xa) with = 1 2 can be implemented as follows, with k = hhbits 1 2 ii. E( x 1 2 ) f: x: f( a: dxe k xa) b x: f( a: dxe k xa)c k 2.4. 4 Dynamic Typing Dynamic typing [2] is a mechanism for injecting values of di erent types into a single dynamic type dyn in a type safe manner. t : indyn (t) let indyn (x) t 1 in t 2 else t 3 : dyn v : indyn (v) indyn (t) n def = case [ t] n of [v] n 0 ) indyn (v) n 0 j ....
Martn Abadi, Luca Cardelli, Benjamin C. Pierce, and Gordon D. Plotkin. Dynamic typing in a statically typed language. ACM Transactions on Programming Languages and Systems, 13(2):237-268, 1991.
....manner we envisage each site maintaining a trader, a nite map from strings to values that supports registration and lookup of resources. Agents would typically obtain the trader name associated with a site at the same time as obtaining the site name. For traders to be type sound a type Dynamic [ACPP91] is required. 6.4 Future Work This paper provides only a starting point much additional work is required on algorithms, semantics, and implementation. The choice of infrastructure algorithm(s) for a given application will depend strongly on many characteristics of the application and target ....
Martn Abadi, Luca Cardelli, Benjamin Pierce, and Gordon Plotkin. Dynamic typing in a statically typed language. ACM Transactions on Programming Languages and Systems,, 13(2):237-268, April 1991.
....the presence of advanced static type systems. In this paper we investigate the integration of dynamic types into languages with explicit polymorphism (in the style of system F [10] implicit polymorphism (in the style of ML [16] abstract data types, and subtyping. Our study extends earlier work [1], but keeps the same general approach and the same basic language constructs: dynamic, for tagging a value with its type, and typecase, for comparing a type tag with a pattern and branching according to whether they match. The interaction of polymorphism and dynamic types gives rise to problems in ....
....to whether they match. The interaction of polymorphism and dynamic types gives rise to problems in binding type variables. We find that these problems can be more clearly addressed in languages with explicit polymorphism. Even then, we encounter some perplexing difficulties (as indicated in [1]) In particular, there is no unique way to match the type tag of a dynamic value with a typecase pattern. Our solution consists in constraining the syntax of typecase patterns, thus providing static guarantees of unique solutions. The examples we have examined so far suggest that our restriction ....
[Article contains additional citation context not shown here]
Mart'in Abadi, Luca Cardelli, Benjamin Pierce, and Gordon Plotkin. Dynamic typing in a statically-typed language. ACM Transactions on Programming Languages and Systems, 13(2):237--268, April 1991.
....as print, and the eval function. Hence, there are situations in programming where one would like to use dynamic types even in the presence of arbitrarily advanced type features. In this paper we investigate the interplay of dynamic typing with polymorphism. Our study extends earlier work (see [1]) in allowing polymorphism, but keeps the same basic language constructs (dynamic and typecase) and the same style. The interaction of polymorphismand dynamic types gives rise to problems in binding type variables. We find that these problems can be more clearly addressed in languages with ....
....typecase) and the same style. The interaction of polymorphismand dynamic types gives rise to problems in binding type variables. We find that these problems can be more clearly addressed in languages with explicit polymorphism. Even then, we encounter some perplexing difficulties (as indicated in [1]) In particular, there is no unique way to match the type tagging a dynamic value with a typecase pattern. Our solution consists in constraining the syntax of typecase patterns, providing static guarantees of unique solutions. The examples we have examined so far suggest that our restriction is ....
[Article contains additional citation context not shown here]
Mart'in Abadi, Luca Cardelli, Benjamin Pierce, and Gordon Plotkin. Dynamic typing in a statically-typed language. ACM Transactions on Programming Languages and Systems, 13(2):237-- 268, April 1991.
No context found.
Martn Abadi, Luca Cardelli, Benjamin Pierce, and Gordon Plotkin. Dynamic typing in a statically typed language. ACM Transactions on Programming Languages and Systems, 13(2):237-268, April 1991. 31
No context found.
Mart n Abadi, Luca Cardelli, Benjamin Pierce, and Gordon Plotkin. Dynamic typing in a statically typed language. ACM TOPLAS, 13(2):237--268, 1991.
No context found.
Mart n Abadi, Luca Cardelli, Benjamin Pierce, and Gordon Plotkin. Dynamic typing in a statically typed language. ACM TOPLAS, 13(2):237--268, 1991.
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