A statically safe alternative to virtual types - Semantic Scholar
Recommend Documents
Nov 26, 1997 - Williams College [email protected] ...... CCHOM89] Peter Canning, William Cook, Walter Hill, Walter Oltho , and John C. Mitchell, F-.
presents full statical type checking for virtual types, while not relying on any .... The body may be overridden in subclasses, but the signature (formal parame-.
Omeprazole, lansoprazole, pantoprazole, rapeprazol and esomeprazole are classified in the same group. Despite the similarity of biochemical structures.
[12] Robert Cartwright and Guy L. Steele Jr. Compatible genericity with run-time types for the Java ... Also in Carl A. Gunter and John C. Mitchell, editors ...
1] William E. Aitken and John H. Reppy. Abstract value constructors. ... its Applications, pages 1{11. 1992. 2] John Boyland, Charles Farnum, and Susan L. Gra-.
Dec 1, 2005 - when traits are added to programming languages. In Section 4 ...... Fortress traits are used as the primary (and only) way of composing objects.
number of possible overruling orders to 6. Some examples of conflict resolution with beliefs are as follows. A conflict between a belief and an intention means ...
same security policy may create security anomalies. A class may be perfectly safe in one context, and open a security hole when inherited in another context.
gramming, Pittsburgh, PA, USA, October 4-6, 2002, pages 157â166. ACM Press,. October 2002. 5. Richard Bird and Lambert Meertens. Nested datatypes.
The Dynamic Language Runtime (DLR) is an API which runs on top of the Com- ..... wish that our core calculus supports all the essential object-oriented features ...
that includes open code (that is, possibly containing free variables) complicates ... fun p z. x y = (y := 1.0). (* conventional program *). | p (s n) x y = (p n x y; y := x * !y); ...... online at http://www.cse.ogi.edu/PacSoft/projects/metaml/index
the-sky' visual display. The latter displays a tunnel describing the approach path over a synthetic display of the view ahead. This was demonstrated to result in.
Key words: Volterra series, artificial neural network, rainfall-runoff model. 1. INTRODUCTION. Models describing the geophysical processes contributing to the ...
According to the Joint United Nations Program of. HIV/AIDS (UNAIDS) ..... form of acupuncture, chiropractic, homeopathy, and herbalist, spiritual and nutritional ... California, Los Angeles and Nobuo Yamaguchi Kanazawa Medical. University ...
... University of Birmingham, and. Freelance Medical Writer .... preventivedentistry.co.uk/articles/articles_detail.php?id=580. (accessed 12 July 2013). Etter J-F ...
Jun 25, 2018 - ... National University of Malaysia Medical Centre, Jalan Yaacob Latif, ... of fluconazole in tandem with cabergoline for the control of recurrent.
May 26, 1993 - Removal of bile duct stones during endoscopic ... bile duct stones (diameter 3-30 mm) at ERCP, ... preservation technique that significantly.
Nov 22, 2016 - irreversible electroporation, and decreased the total specific energy required to obtain a given extraction yield. PEF treatment did not cause.
Numerous databases and online bioinformatic tools are available for the detection and ..... expression (CAGE) [73] and massively parallel signature sequencing (MPSS) [74]. These methods are high- throughput and can offer precise, 'digital' gene expre
Nov 29, 2013 - transcription factor genes Pax4, Neurod1, Nkx2.2; the beta cell membrane protein gene Abcc8 as well as Cpe and Pcsk2. Mouse ASH cells ...
m E 911 that is omitted in 911, then there is an 91^ 911 that also omits p(x, m). Before proving Theorem 2.1, we shall have to avail ourselves of some pre-.
ployees whose salary is greater than their manager's salary. Collection execute( javax.jdo.PersistenceManager pm). { javax.jdo.Query payCheck =.
1996; Kutlu and Moss 1998; GemStone Systems 1999]. In this paper .... loader and a modified compiler, the latter allowing them to use a custom class file format.
be rather unnatural and will possibly transform the carpal-tunnel syndrome problem into the neck region [1]. Furthermore, due to the Midas Touch Problem [1] it ...
A statically safe alternative to virtual types - Semantic Scholar
Nov 26, 1997 - Parametric types and virtual types have recently been proposed as .... version of virtual types, the call labeled above signals a run-time error.
A statically safe alternative to virtual types Kim B. Bruce Williams College
Parametric types and virtual types have recently been proposed as extensions to Java to support genericity. In this paper we examine both in order to investigate the strengths and weaknesses of each. We suggest a variant of virtual types which has similar expressiveness, but supports safe static type checking. This results in a language in which both parametric types and virtual types are well-integrated, and which is statically type-safe. Keywords: Language design, virtual types, parametric polymorphism, static type checking
The rst step to a good answer is a good question. This note raises (and suggests an answer to) the question: Can the best features of parametric types and virtual types be integrated? Parametric types and virtual types have both been proposed as extensions to Java, and address roughly similar issues. Parametric types have been proposed by Myers, Bank, and Liskov [MBL97], Agesen, Freund, and Mitchell [AFM97], by Bruce [Bru97], and by Odersky and Wadler as part of Pizza [OW97]. Virtual types have been proposed by Thorup [Tho97]. Parametric types and virtual types have complementary strengths. Parametric types are especially useful for collection types, such as lists or sets. (Users of C++ templates and collection classes will know many examples [KM96].) Virtual types are especially useful for families of types, such as the Subject/Observer family. (Users of design patterns will know many examples [GRJV94].) The rst step to a good question is a good example. This note presents two paradigmatic examples. The rst, zip, demonstrates the strengths of parametric types. The second, lists with lengths, demonstrates the strengths of virtual types; we illustrate the important case of mutual recursion by extending this example to alternating lists. In each case, the program structure made easy by one approach can be mimicked by the other, but with diculty. In an attempt to bring together the strengths of each of these techniques, we present a variant of the virtual types notation that is statically type-safe. The new notation generalizes the MyType notation of Bruce and others to apply to mutually recursive types. This notation can be considered as a variant of the proposal for handling inheritance in the presence of mutual recursion put forward by Palsberg and Schwartzbach [PS94]. The ideas reported here gestated in the deliberations of a mailing list organized by Ole Agesen to discuss extensions of Java that support generic types. Gilad Bracha, Corky Cartwright, Guy Steele, and Kresten Thorup made particularly signi cant contributions.
Kim Bruce's research was partially supported by NSF grant CCR-9424123.
1
The rest of the paper is organized as follows. Section 1 presents examples which are easy to express with parametric types, but are hard to express with virtual types. Section 2 presents an example that is easy to express with virtual types, but hard to express with parametric types. To highlight comparisons we write each example using both notations. In section 3 we propose a notation which is similar to virtual types, but which can be statically type checked. Section 4 shows how this can be combined with parametric types in a smooth way. Section 5 summarizes our results. Appendices provide another example of the new notation and provide more details on particular features of the language.
1 Strengths of parametric types Here is something that is easy to do with parametric types, but hard to do with virtual types. The example is given in Pizza, with type parameters written between angle brackets . public class Pair { public Fst fst; public Snd snd; } public class List { ... public List zip(List ys) {...} }