|
ABSTRACT
A <i>proxy</i> object is a surrogate or placeholder that controls access to another target object. Proxies can be used to support distributed programming, lazy or parallel evaluation, access control, and other simple forms of behavioral reflection. However, <i>wrapper proxies</i> (like <i>futures</i> or <i>suspensions</i> for yet-to-be-computed results) can require significant code changes to be used in statically-typed languages, while proxies more generally can inadvertently violate assumptions of transparency, resulting in subtle bugs. To solve these problems, we have designed and implemented a simple framework for proxy programming that employs a static analysis based on qualifier inference, but with additional novelties. Code for using wrapper proxies is automatically introduced via a classfile-to-classfile transformation, and potential violations of transparency are signaled to the programmer. We have formalized our analysis and proven it sound. Our framework has a variety of applications, including support for asynchronous method calls returning futures. Experimental results demonstrate the benefits of our framework: programmers are relieved of managing and/or checking proxy usage, analysis times are reasonably fast, overheads introduced by added dynamic checks are negligible, and performance improvements can be significant. For example, changing two lines in a simple RMI-based peer-to-peer application and then using our framework resulted in a large performance gain.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
|
| |
2
|
Lars Ole Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen, May 1994. (DIKU report 94/19).
|
 |
3
|
|
| |
4
|
|
| |
5
|
Gavin M. Bierman, Matthew J. Parkinson, and Andrew M. Pitts. An imperative core calculus for Java and Java with effects. Technical Report 563, University of Cambridge Computer Laboratory, April 2003.
|
 |
6
|
Gilad Bracha , Martin Odersky , David Stoutamire , Philip Wadler, Making the future safe for the past: adding genericity to the Java programming language, Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.183-200, October 18-22, 1998, Vancouver, British Columbia, Canada
|
| |
7
|
Michael James Compton. SCOOP: An investigation of concurrency in Eiffel. Master's thesis, Department of Computer Science, The Australian National University, December 2000.
|
 |
8
|
Xianghua Deng , Matthew B. Dwyer , John Hatcliff , Masaaki Mizuno, Invariant-based specification, synthesis, and verification of synchronization in concurrent programs, Proceedings of the 24th International Conference on Software Engineering, May 19-25, 2002, Orlando, Florida
[doi> 10.1145/581339.581394]
|
| |
9
|
Dynamic proxy classes. http://java.sun.com/j2se/1.5.0/docs/guide/reflection/proxy.html. JDK 1.5 documentation.
|
 |
10
|
Maryam Emami , Rakesh Ghiya , Laurie J. Hendren, Context-sensitive interprocedural points-to analysis in the presence of function pointers, Proceedings of the ACM SIGPLAN 1994 conference on Programming language design and implementation, p.242-256, June 20-24, 1994, Orlando, Florida, United States
|
 |
11
|
Éric Tanter , Jacques Noyé , Denis Caromel , Pierre Cointe, Partial behavioral reflection: spatial and temporal selection of reification, Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications, October 26-30, 2003, Anaheim, California, USA
|
| |
12
|
Executor examples. http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/etc/notes/tim-execu%tor-examples.html?rev=1.5.
|
 |
13
|
Manuel Fähndrich , K. Rustan M. Leino, Declaring and checking non-null types in an object-oriented language, Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications, October 26-30, 2003, Anaheim, California, USA
|
 |
14
|
|
 |
15
|
Jeffrey S. Foster , Manuel Fähndrich , Alexander Aiken, A theory of type qualifiers, Proceedings of the ACM SIGPLAN 1999 conference on Programming language design and implementation, p.192-203, May 01-04, 1999, Atlanta, Georgia, United States
|
 |
16
|
|
 |
17
|
Matteo Frigo , Charles E. Leiserson , Keith H. Randall, The implementation of the Cilk-5 multithreaded language, Proceedings of the ACM SIGPLAN 1998 conference on Programming language design and implementation, p.212-223, June 17-19, 1998, Montreal, Quebec, Canada
|
| |
18
|
|
 |
19
|
Tim Harris , Keir Fraser, Language support for lightweight transactions, Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications, October 26-30, 2003, Anaheim, California, USA
|
| |
20
|
Claude Hussenet. Personal Communication. Describes the use of JSR 166 futures for an enterprise application.
|
 |
21
|
|
| |
22
|
Io: A small programming language. http://www.iolanguage.com/.
|
 |
23
|
|
| |
24
|
JSR 166: Concurrency utilities. http://www.jcp.org/en/jsr/detail?id=166.
|
| |
25
|
Gregor Kiczales , Erik Hilsdale , Jim Hugunin , Mik Kersten , Jeffrey Palm , William G. Griswold, An Overview of AspectJ, Proceedings of the 15th European Conference on Object-Oriented Programming, p.327-353, June 18-22, 2001
|
| |
26
|
|
| |
27
|
Ondrej Lhoták and Laurie Hendren. Scaling Java points-to analysis using SPARK. In Proceedings of the International Conference on Compiler Construction (CC), volume 2622 of Lecture Notes in Computer Science, pages 153--169, Warsaw, Poland, 2003.
|
 |
28
|
|
| |
29
|
|
| |
30
|
Mandala. http://sourceforge.net/projects/mandala/.
|
 |
31
|
Dragos A. Manolescu, Workflow enactment with continuation and future objects, Proceedings of the 17th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, November 04-08, 2002, Seattle, Washington, USA
|
| |
32
|
|
 |
33
|
Greg Morrisett , Matthias Felleisen , Robert Harper, Abstract models of memory management, Proceedings of the seventh international conference on Functional programming languages and computer architecture, p.66-77, June 26-28, 1995, La Jolla, California, United States
[doi> 10.1145/224164.224182]
|
| |
34
|
Polyvios Pratikakis, Jaime Spacco, and Michael Hicks. Transparent proxies for Java futures. Technical Report CS-TR-4574, Department of Computer Science, University of Maryland, College Park, March 2004.
|
| |
35
|
Rajeev R. Raje, Joseph I. William, and Michael Boyles. An asynchronous remote method invocation (ARMI ) mechanism for Java. In Proceedings of the ACM Workshop on Java for Science and Engineering Computation, Las Vegas, Nevada, 1997.
|
| |
36
|
|
| |
37
|
Umesh Shankar, Kunal Talwar, Jeffrey S. Foster, and David Wagner. Detecting format string vulnerabilities with type qualifiers. In Proceedings of the 10th Usenix Security Symposium, Washington, D.C., August 2001.
|
| |
38
|
Aleksander Slominski, Madhusudhan Govindaraju, Dennis Gannon, and Randall Bramley. Design of an XML based interoperable RMI system: SoapRMI C++/Java 1.1. In Proceedings of the International Conference on Parallel and Distributed Processing Techniques and Applications, pages 1661--1667, Las Vegas, Nevada, June 2001.
|
| |
39
|
|
| |
40
|
Raja Vallée-Rai, Laurie Hendren, Vijay Sundaresan, Patrick Lam, Etienne Gagnon, and Phong Co. Soot--a Java optimization framework. In Proceedings of the IBM Centers for Advanced Studies Conference (CASCON), pages 125--135, 1999.
|
| |
41
|
Adam Welc, Suresh Jagannathan, and Antony L. Hosking. Transactional monitors for concurrent objects. In Proceedings of the European Conference on Object-Oriented Programming (ECOOP), Oslo, Norway, 2004.
|
|