A statically safe alternative to virtual types - CiteSeerX
Recommend Documents
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.
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-.
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
ployees whose salary is greater than their manager's salary. Collection execute( javax.jdo.PersistenceManager pm). { javax.jdo.Query payCheck =.
ing advantage of several papers on typing for mobile processes, with or without ..... S3;S2. S4;T: The typing of a mobility action, in M or out M, checks if the ...
Devise â Center for Experimental Computer Science ... suggestion as to how virtual types should be inte- ...... Effectively making a virtual method call become.
... 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.
Omeprazole, lansoprazole, pantoprazole, rapeprazol and esomeprazole are classified in the same group. Despite the similarity of biochemical structures.
prospects of virtual or blended programmes, courses, seminars, exercises and even internships. 1. ..... Next to Skype an
plicit queries do not support static checking of types or syn- tax because queries ... jects while still supporting remote execution by a database server. Safe query ...
To date the existing literature on this promising practice is limited to the technical aspects and the .... Certainly digital television although slow on ... becoming an important component of e-marketing strategy â a tool that was not available to
Lee-Kelley, L., Gilbert, D. and Al-Shehabi, N. F.. Published ... Liz Lee-Kelley, David Gilbert and Nada F. Al-Shehabi. School of ... (Korper and Ellis, 2000). In the ...
Jan 12, 2016 - Because fluency is a transitional stage that allows the reader to utilize ..... Evidence of the value of reader's theater for developing fluency, particularly .... involved parents of first grade children reading and rereading short ..
May 16, 2009 - VIRTUAL ATM: A LOW COST SECURED ALTERNATIVE TO CONVENTIONAL MOBILE BANKING .... major reasons behind is security risks like theft of mobile ... the user connects to the bank server with a fund transfer.
Apr 15, 2016 - [5] Gelormini, D. and Bishop, B. (2013) Optimizing the Android Virtual Keyboard: A Study of User Experience. ... Alarm Supervisory System.
Virtual organizations have played critical roles in medical societies, .... As a result, transnational firms treat their assets, resources, and capabilities differently depending .... more globally competitive, more sensitive and responsive to nation
Consider the two following (sketched) class declarations: class MyButton extends ... in a single-inheritance language would force us to make ASTNode a descendant of ... allow developers to specify as parameter and/or result type of a method the .....
Sep 18, 1990 - selected using special criteria for shunt operation. .... to elective distal splenorenal shunt operation; about 30% of the sclerotherapy.
each generation, the present value of its Social Security "taxn contributions .... they require reduced payments to, or increased payments from, future generations. .... additional information to infer the extent of net private intergenerational.
come. -income earned before the conversion,alreadytaxed under the pre- nearly zero intergenerationalredistribu- conversionincome tax-from thosemade tion.
455. 13. Goldberg, Adele and Robson, D. Smalltalk-80: The Language and its Implementa- tion. ... Seiter, Linda; Palsberg, Jeans, and Lieberherr, Karl. Evolution ...
Timing Closure in presence of long global wire interconnects is one of the main .... SMGs and the ASAP firing rule are underlying the works of [4,1], even though .... Its Pipeline flush Time: From the instant when the SSIP consumes the last.
A statically safe alternative to virtual types - CiteSeerX
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) {...} }