Abstract
Ownership type qualifiers clarify aliasing invariants that cannot be directly expressed in mainstream programming languages. Adding qualifiers to code, however, often involves significant overhead and difficult interaction.
We propose an analysis to infer qualifiers in the code based on developer refinements that express strict encapsulation, logical containment and architectural tiers. Refinements include: <pre>makeOwnedBy</pre>, to make an object strictly encapsulated by another; <pre>makePartOf</pre>, to make an object logically contained in another; <pre>makePeer</pre>, to make two objects peers; <pre>makeParam</pre>, to make an object more accessible than the above choices; or <pre>makeShared</pre>, to allow an object to be globally aliased. If the code as-written matches the requested refinements, the analysis generates qualifiers that type-check; otherwise, it reports that the refinements do not match the code, so developers must investigate unexpected aliasing, change their understanding of the code and pick different refinements, or change the code and re-run the analysis.
We implement the analysis and confirm that refinements generate precise qualifiers that express strict encapsulation, logical containment and architectural tiers.
- Marwan Abi-Antoun and Jonathan Aldrich. 2009. Static Extraction and Conformance Analysis of Hierarchical Runtime Architectural Structure using Annotations. In Object-Oriented Programming, Systems, Languages & Applications (OOPSLA). Google Scholar
Digital Library
- Jonathan Aldrich and Craig Chambers. 2004. Ownership Domains: Separating Aliasing Policy from Mechanism. In European Conference on Object-Oriented Programming (ECOOP).Google Scholar
Cross Ref
- Jonathan Aldrich, Valentin Kostadinov, and Craig Chambers. 2002. Alias Annotations for Program Understanding. In Object-Oriented Programming, Systems, Languages & Applications (OOPSLA). Google Scholar
Digital Library
- David Clarke, John Potter, and James Noble. 1998. Ownership Types for Flexible Alias Protection. In Object-Oriented Programming, Systems, Languages & Applications (OOPSLA). Google Scholar
Digital Library
- Werner Dietl, Stephanie Dietzel, Michael Ernst, Kivanç Muslu, and Todd Schiller. 2011. Building and using pluggable type-checkers. In International Conference on Software Engineering (ICSE). Google Scholar
Digital Library
- Werner Dietl, Michael Ernst, and Peter Müller. 2011. Tunable Static Inference for Generic Universe Types. In European Conference on ObjectOriented Programming (ECOOP). Google Scholar
Digital Library
- Constantine Dymnikov, David J Pearce, and Alex Potanin. 2013. OwnKit: Inferring Modularly Checkable Ownership Annotations for Java. In Australian Software Engineering Conference (ASWEC). Google Scholar
Digital Library
- Wei Huang, Werner Dietl, Ana Milanova, and Michael Ernst. 2012. Inference and Checking of Object Ownership. In European Conference on Object-Oriented Programming (ECOOP). Google Scholar
Digital Library
- Wei Huang and Ana Milanova. 2011. Towards effective inference and checking of ownership types. In International Workshop on Aliasing, Confinement and Ownership in Object-Oriented Programming (IWACO).Google Scholar
- Ebrahim Khalaj. 2017. Automated Refinement of Hierarchical Object Graphs. Ph.D. Dissertation. Wayne State University. http://www.cs. wayne.edu/~mabianto/students/17_khalaj_phd_thesis.pdf .Google Scholar
- Ebrahim Khalaj and Marwan Abi-Antoun. 2018. Online appendix: OOGRE. http://www.cs.wayne.edu/~mabianto/oogre/ .Google Scholar
- Fred Long, Dhruv Mohindra, Robert C. Seacord, Dean F. Sutherland, and David Svoboda. 2011. The CERT Oracle Secure Coding Standard for Java. Addison-Wesley. Google Scholar
Digital Library
- Ana Milanova and Jan Vitek. 2011. Static Dominance Inference. In International Conference on Objects, Models, Components, Patterns (TOOLS). Google Scholar
Digital Library
- Jan Schäfer and Arnd Poetzsch-Heffter. 2007. A Parameterized Type System for Simple Loose Ownership Domains. Journal of Object Technology 6, 5 (2007).Google Scholar
- University of Maryland. 2007. FindBugs: Find Bugs in Java Programs. http://findbugs.sourceforge.net .Google Scholar
- Mohsen Vakilian, Amarin Phaosawasdi, Michael D. Ernst, and Ralph E. Johnson. 2015. Cascade: a universal programmer-assisted type qualifier inference tool. In International Conference on Software Engineering (ICSE). Google Scholar
Digital Library
- Radu Vanciu and Marwan Abi-Antoun. 2013. Object Graphs with Ownership Domains: an Empirical Study. Springer LNCS 7850 (2013), 109–155. Google Scholar
Digital Library
- Dietl Werner and Peter Müller. 2007. Runtime Universe Type Inference. In International Workshop on Aliasing, Confinement and Ownership in Object-Oriented Programming (IWACO).Google Scholar
- Haitao Steve Zhu and Yu David Liu. 2013. Heap Decomposition Inference with Linear Programming. In European Conference on ObjectOriented Programming (ECOOP). Google Scholar
Digital Library
Index Terms
Inferring ownership domains from refinements
Recommendations
Inferring ownership domains from refinements
GPCE 2018: Proceedings of the 17th ACM SIGPLAN International Conference on Generative Programming: Concepts and ExperiencesOwnership type qualifiers clarify aliasing invariants that cannot be directly expressed in mainstream programming languages. Adding qualifiers to code, however, often involves significant overhead and difficult interaction.
We propose an analysis to ...
Inferring precise polymorphic type dependencies in logic programs
PPDP '08: Proceedings of the 10th international ACM SIGPLAN conference on Principles and practice of declarative programmingWe present a new analysis that infers polymorphic type dependencies in logic programs. The analysis infers more precise information than previous type dependency inference analyses. The improvement in precision is achieved by making use of set union as ...
MLF for everyone (users, implementers, and designers)
ML '07: Proceedings of the 2007 workshop on Workshop on MLMLF is an alternative to ML that permits second-order polymorphism as in System F but retains (partial) type inference a la ML. Type annotations are requested only on parameters of functions that are used polymorphically. Type abstractions and type ...







Comments