Abstract
There are many proposals for language techniques to control aliasing and encapsulation in object oriented programs, typically based on notions of object ownership and pointer uniqueness. Most of these systems require extensive manual annotations, and thus there is little experience with these properties in large, existing Java code bases. To remedy this situation, we present Uno, a novel static analysis for automatically inferring ownership, uniqueness, and other aliasing and encapsulation properties in Java. Our analysis requires no annotations, and combines an intraprocedural points-to analysis with an interprocedural, demand-driven predicate resolution algorithm. We have applied Uno to a variety of Java applications and found that some aliasing properties, such as temporarily lending a reference to a method, are common, while others, in particular field and argument ownership, are relatively uncommon. As a result, we believe that Uno can be a valuable tool for discovering and understanding aliasing and encapsulation in Java programs.
- A. Aiken, J. S. Foster, J. Kodumal, and T. Terauchi. Checking and Inferring Local Non-Aliasing. In PLDI'03, pages 129--140, 2003. Google Scholar
Digital Library
- J. Aldrich, V. Kostadinov, and C. Chambers. Alias Annotations for Program Understanding. In OOPSLA'02, pages 311--330, 2002. Google Scholar
Digital Library
- P. S. Almeida. Balloon Types: Controlling Sharing of State in Data Types. In ECOOP'97, pages 32--59, 1997.Google Scholar
- K. Arnold, J. Gosling, and D. Holmes. The Java Programming Language. Addison-Wesley, 3rd edition, 2000. Google Scholar
Digital Library
- S. M. Blackburn, R. Garner, C. Hoffman, et al. The DaCapo benchmarks: Java benchmarking development and analysis. In OOPSLA'06, pages 169--190, 2006. Google Scholar
Digital Library
- C. Boyapati, B. Liskov, and L. Shrira. Ownership Types for Object Encapsulation. In POPL'03, pages 213--223, 2003. Google Scholar
Digital Library
- J. Boyland. Alias burying: Unique variables without destructive reads. Software-Practice and Experience, 31(6):533--553, May 2001. Google Scholar
Digital Library
- J. T. Boyland and W. Retert. Connecting effects and uniqueness with adoption. In POPL'05, pages 283--295, 2005. Google Scholar
Digital Library
- S. Cherem and R. Rugina. A Practical Escape and Effect Analysis for Building Lightweight Method Summaries. In CC'07, 2007. Google Scholar
Digital Library
- S. Cherem and R. Rugina. Uniqueness inference for compiletime object deallocation. In ISMM'07, 2007. To appear. Google Scholar
Digital Library
- D. G. Clarke and S. Drossopoulou. Ownership, Encapsulation and the Disjointness of Type and Effect. In OOPSLA'02, pages 292--310, 2002. Google Scholar
Digital Library
- D. G. Clarke, J. M. Potter, and J. Noble. Onwership Types for Flexible Alias Protection. In OOPSLA'98, pages 48--64, 1998. Google Scholar
Digital Library
- M. Das. Unification-based Pointer Analysis with Directional Assignments. In PLDI'00, pages 35--46, 2000. Google Scholar
Digital Library
- M. Emami, R. Ghiya, and L. J. Hendren. Context-Sensitive Interprocedural Points-to Analysis in the Presence of Function Pointers. In PLDI'94, pages 242--256, 1994. Google Scholar
Digital Library
- M. Fähndrich and R. DeLine. Adoption and Focus: Practical Linear Types for Imperative Programming. In PLDI'02, pages 13--24, 2002. Google Scholar
Digital Library
- C. Grothoff, J. Palsberg, and J. Vitek. Encapsulating Objects with Confined Types. In OOPSLA'01, pages 241--253, 2001. Google Scholar
Digital Library
- D. L. Heine and M. S. Lam. Static Detection of Leaks in Polymorphic Containers. In ICSE'06, pages 252--261, 2006. Google Scholar
Digital Library
- J. Hogg. Islands: Aliasing Protection In Object-Oriented Languages. In OOPSLA'91, pages 271--285, 1991. Google Scholar
Digital Library
- W. Landi and B. G. Ryder. A Safe Approximate Algorithm for Interprocedural Pointer Aliasing. In PLDI'92, pages 235--248, 1992. Google Scholar
Digital Library
- O. Lhoták and L. J. Hendren. Jedd: A BDD--based relational extension of Java. In PLDI'04, pages 158--169, 2004. Google Scholar
Digital Library
- D. Liang and M. J. Harrold. Efficient Computation of Parametrized Pointer Information for Interprocedural Analyses. In SAS'01, pages 279--298, 2001. Google Scholar
Digital Library
- Y. Liu and A. Milanova. Ownership and Immutability Inference for UML-based Object Access Control. In ICSE'07, pages 323--332, 2007. Google Scholar
Digital Library
- V. B. Livshits, J. Whaley, and M. S. Lam. Reflection Analysis for Java. In APLAS'05, pages 139--160, 2005. Google Scholar
Digital Library
- J. Noble, J. Vitek, and J. Potter. Flexible Alias Protection. In ECOOP'98, pages 158--185, 1998. Google Scholar
Digital Library
- A. Rountev and B. G. Ryder. Points-to and Side-Effect Analyses for Programs Built with Precompiled Libraries. In CC'01, pages 20--36, 2001. Google Scholar
Digital Library
- A. Salcianu and M. C. Rinard. Pointer and escape analysis for multithreaded programs. In PPOPP'01, pages 12--23, 2001. Google Scholar
Digital Library
- M. Sridharan and R. Bodik. Refinement-Based Context-Sensitive Points-To Analysis for Java. In PLDI'06, pages 387--400, 2006. Google Scholar
Digital Library
- D. N. Turner, P. Wadler, and C. Mossin. Once upon a type. In FPCA'95, pages 1--11, La Jolla, California, 1995. Google Scholar
Digital Library
- R. Vallée-Rai, P. Co, E. Gagnon, L. J. Hendren, P. Lam, and V. Sundaresan. Soot -a Java bytecode optimization framework. In CASCON'99, 1999. Google Scholar
Digital Library
- J. Vitek and B. Bokowski. Confined types in java. Software-Practice and Experience, 31(6):507--532, 2000. Google Scholar
Digital Library
- D. Walker and G. Morrisett. Alias Types for Recursive Data Structures. In TIC'00, 2000. Google Scholar
Digital Library
- J. Whaley and M. S. Lam. Cloning-Based Context-Sensitive Pointer Alias Analysis Using Binary Decision Diagrams. In PLDI'04, pages 131--144, 2004. Google Scholar
Digital Library
Index Terms
Inferring aliasing and encapsulation properties for java
Recommendations
Inferring aliasing and encapsulation properties for java
OOPSLA '07: Proceedings of the 22nd annual ACM SIGPLAN conference on Object-oriented programming systems, languages and applicationsThere are many proposals for language techniques to control aliasing and encapsulation in object oriented programs, typically based on notions of object ownership and pointer uniqueness. Most of these systems require extensive manual annotations, and ...
Disjointness domains for fine-grained aliasing
OOPSLA '15Aliasing is crucial for supporting useful implementation patterns, but it makes reasoning about programs difficult. To deal with this problem, numerous type-based aliasing control mechanisms have been proposed, expressing properties such as uniqueness. ...
Disjointness domains for fine-grained aliasing
OOPSLA 2015: Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and ApplicationsAliasing is crucial for supporting useful implementation patterns, but it makes reasoning about programs difficult. To deal with this problem, numerous type-based aliasing control mechanisms have been proposed, expressing properties such as uniqueness. ...







Comments