ABSTRACT
One of the primary challenges in building and evolving large object-oriented systems is understanding aliasing between objects. Unexpected aliasing can lead to broken invariants, mistaken assumptions, security holes, and surprising side effects, all of which may lead to software defects and complicate software evolution.This paper presents AliasJava, a capability-based alias annotation system for Java that makes alias patterns explicit in the source code, enabling developers to reason more effectively about the interactions in a complex system. We describe our implementation, prove the soundness of the annotation system, and give an algorithm for automatically inferring alias annotations. Our experience suggests that the annotation system is practical, that annotation inference is efficient and yields appropriate annotations, and that the annotations can express important invariants of data structures and of software architectures.
References
- Jonathan Aldrich, Craig Chambers, and David Notkin. ArchJava: Connecting Software Architecture to Implementation. Proc. International Conference on Software Engineering, Orlando, Florida, May 2002.]] Google Scholar
Digital Library
- Jonathan Aldrich, Craig Chambers, and David Notkin. Architectural Reasoning with ArchJava. Proc. European Conference on Object-Oriented Programming, Milaga, Spain, June 2002.]] Google Scholar
Digital Library
- Jonathan Aldrich, Valentin Kostadinov, and Craig Chambers. Alias Annotations for Program Understanding. University of Washington technical report UW-CSE-02-11-01, November 2002.]]Google Scholar
- Paulo Sergio Almeida. Balloon Types: Controlling Sharing of State in Data Types, Proc. European Conference on Object-Oriented Programming, Jyvaskyla, Finland, June 1997.]]Google Scholar
- ArchJava web site. http://www.archjava.org/]]Google Scholar
- Boris Bokowski. Implementing "Object Ownership to Order." Proc. Intercontinental Workshop on Aliasing In Object-Oriented Systems, Lisbon, Portugal, June 1999.]] Google Scholar
Digital Library
- Anindya Banerjee and David A. Naumann. Representation Independence, Confinement, and Access Control. Proc. Principles of Programming Languages, Portland, Oregon, January 2002.]] Google Scholar
Digital Library
- John Boyland, James Noble, and William Retert. Capabilities for Sharing: A Generalization of Uniqueness and Read-Only. Proc. European Conference on Object-Oriented Programming, Budapest,]] Google Scholar
Digital Library
- John Boyland. Alias Burying: Unique Variables Without Destructive Reads. Software Practice & Experience, 6(31):533--553, May 2001.]] Google Scholar
Digital Library
- Chandrasekhar Boyapati and Martin Rinard. A Parameterized Type System for Race-Free Java Programs. Proc. Object-Oriented Programming Systems, Languages and Applications, Tampa, Florida, October 2001.]] Google Scholar
Digital Library
- Chandrasekhar Boyapati, Robert Lee, and Martin Rinard. Ownership Types for Safe Programming: Preventing Data Races and Deadlocks. Proc. Object-Oriented Programming Systems, Languages and Applications, Seattle, Washington, November 2002.]] Google Scholar
Digital Library
- Boris Bokowski and Andre Spiegel. Barat-A Front-End for Java. Freie Universitat Berlin Technical Report B-98-09, December 1998.]]Google Scholar
- Alexander Buckley. Ownership Types Restrict Aliasing. MEng. Computing Final Year Project Report, Imperial College of Science, Technology and Medicine, London, United Kingdom, June]]Google Scholar
- Boris Bokowski and Jan Vitek. Confined Types. Proc. Object-Oriented Programming Systems, Languages, and Applications, Denver, Colorado, November 1999.]] Google Scholar
Digital Library
- Edwin C. Chan, John T. Boyland, and William L. Scherlis. Promises: Limited Specifications for Analysis and Manipulation. Proc. International Conference on Software Engineering, Kyoto, Japan, April 1998.]] Google Scholar
Digital Library
- David Clarke and Sophia Drossopoulou. Ownership, Encapsulation, and the Disjointness of Type and Effect. Proc. Object-Oriented Programming Systems, Languages and Applications, Seattle, Washington, November 2002.]] Google Scholar
Digital Library
- David Clarke. Object Ownership & Containment. Ph.D. Thesis, University of New South Wales, Australia, July 2001.]] Google Scholar
Digital Library
- David G. Clarke, James Noble, and John M. Potter. Simple Ownership Types for Object Containment. Proc. European Conference on Object-Oriented Programming, Budapest, Hungary, June 2001.]] Google Scholar
Digital Library
- David G. Clarke, John M. Potter, and James Noble. Ownership Types for Flexible Alias Protection. Proc. Object-Oriented Programming Systems, Languages and Applications, Vancouver, Canada, October 1998.]] Google Scholar
Digital Library
- Karl Crary, David Walker, and Greg Morrisett. Typed Memory Management in a Calculus of Capabilities. Proc. Principles of Programming Languages, San Antonio, Texas, January 1999.]] Google Scholar
Digital Library
- Manuel Fehndrich and Robert DeLine. Adoption and Focus: Practical Linear Types for Imperative Programming. Proc. Programming Language Design and Implementation, Berlin, Germany, June 2002.]] Google Scholar
Digital Library
- Manuel Fehndrich, Jakob Rehof, and Manuvir Das. Scalable Context-Sensitive Flow Analysis using Instantiation Constraints. Proc. Programming Language Design and Implementation, Vancouver, Canada, June 2000.]] Google Scholar
Digital Library
- Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Reading, Massachusetts: Addison-Wesley, 1994.]] Google Scholar
Digital Library
- Dan Grossman, Greg Morrisett, Trevor Jim, Michael Hicks, Yanling Wang, and James Cheney. Region-Based Memory Mangagement in Cyclone. Proc. Programming Language Design and Implementation, Berlin, Germany, June 2002.]] Google Scholar
Digital Library
- Christian Grothoff, Jens Palsberg, and Jan Vitek. Encapsulating Objects with Confined Types. Proc. Object-Oriented Programming Languages, Systems, and Applications, Tampa, Florida, November 2001.]] Google Scholar
Digital Library
- David Garlan and Mary Shaw. An Introduction to Software Architecture. In Advances in Software Engineering and Knowledge Engineering, I (Ambriola V, Tortora G, Eds.) World Scientific Publishing Company, 1993.]]Google Scholar
- Fritz Henglein. Type Inference with Polymorphic Recursion. Trans. Programming Languages and Systems, 15(2):253--289, April 1993.]] Google Scholar
Digital Library
- John Hogg. Islands: Aliasing Protection in Object-Oriented Languages. Proc. Object-Oriented Programming: Systems, Languages and Applications, Phoenix, Arizona, October 1991.]] Google Scholar
Digital Library
- John Hogg, Doug Lea, Alan Wills, Dennis deChampeaux, and Richard Holt. The Geneva Convention on the Treatment of Object Aliasing. OOPS Messenger, 3(2), April 1992.]] Google Scholar
Digital Library
- Atsushi Igarashi, Benjamin Pierce, and Philip Wadler. Featherweight Java: A Minimal Core Calculus for Java and GJ. Proc. Object-Oriented Programming Systems, Languages, and Applications, Denver, Colorado, November 1999.]] Google Scholar
Digital Library
- Viktor Kuncak, Patrick Lam, and Martin Rinard. Role Analysis. Proc. Principles of Programming Languages, Portland, Oregon, January 2002.]] Google Scholar
Digital Library
- Assaf J. Kfoury, Jerzy Tiuryn, and Pawel Urzyczyn. The Undecidability of the Semi-Unification Problem. Information and Computation, 102(1):83--101, January 1993.]] Google Scholar
Digital Library
- K. Rustan M. Leino, Arnd Poetzsch-Heffter, and Yunhong Zhou. Using Data Groups to Specify and Check Side Effects. Proc. Programming Language Design and Implementation, Berlin, Germany, June 2002.]] Google Scholar
Digital Library
- Naftaly Minsky. Towards Alias-Free Pointers. Proc. of European Conference on Object Oriented Programming, Linz, Austria, July 1996.]] Google Scholar
Digital Library
- Andrew C. Myers. JFlow: Practical Most-Static Information Flow Control. Proc. Principles of Programming Languages, San Antonio, Texas, January 1999.]] Google Scholar
Digital Library
- Peter Muller and Arnd Poetzsch-Heffter. Universes: A Type System for Controlling Representation Exposure. In A. Poetzsch-Heffter and J. Meyer (Hrsg.): Programmiersprachen und Grundlagen der Programmierung, 10. Kolloquium, Informatik Berichte 263, 1999/2000.]]Google Scholar
- James Noble, Jan Vitek, and John Potter. Flexible alias protection. Proc. European Conference on Object-Oriented Programming, Brussels, Belgium, 1998.]] Google Scholar
Digital Library
- Robert O'Callahan. Generalized Aliasing as a Basis for Program Analysis Tools. Ph.D. Thesis, published as Carnegie Mellon technical report CMU-CS-01-124, November 2000.]] Google Scholar
Digital Library
- Robert O'Callahan and Daniel Jackson. Lackwit: A Program Understanding Tool Based on Type Inference. Proc. International Conference on Software Engineering, Boston, Massachusetts, May 1997.]] Google Scholar
Digital Library
- Mads Tofte and Jean-Pierre Talpin. Implementing the Call-by-Value ?-Calculus Using a Stack of Regions. Proc. Principles of Programming Languages, Portland, Oregon, January 1994.]] Google Scholar
Digital Library
- Philip Wadler. Linear Types Can Change the World! Programming Concepts and Methods, (M. Broy and C. Jones, eds.) North Holland, Amsterdam, April 1990.]]Google Scholar
- David Walker and Greg Morrisett. Alias Types for Recursive Data Structures. Proc. International Workshop on Types in Compilation, Montreal, Canada, September 2000.]] Google Scholar
Digital Library
Index Terms
Alias annotations for program understanding


Jonathan Aldrich


Comments