skip to main content
article

Inferring ownership domains from refinements

Published:07 April 2020Publication History
Skip Abstract Section

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.

References

  1. 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 &amp; Applications (OOPSLA). Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Jonathan Aldrich and Craig Chambers. 2004. Ownership Domains: Separating Aliasing Policy from Mechanism. In European Conference on Object-Oriented Programming (ECOOP).Google ScholarGoogle ScholarCross RefCross Ref
  3. Jonathan Aldrich, Valentin Kostadinov, and Craig Chambers. 2002. Alias Annotations for Program Understanding. In Object-Oriented Programming, Systems, Languages &amp; Applications (OOPSLA). Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. David Clarke, John Potter, and James Noble. 1998. Ownership Types for Flexible Alias Protection. In Object-Oriented Programming, Systems, Languages &amp; Applications (OOPSLA). Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  6. Werner Dietl, Michael Ernst, and Peter Müller. 2011. Tunable Static Inference for Generic Universe Types. In European Conference on ObjectOriented Programming (ECOOP). Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Constantine Dymnikov, David J Pearce, and Alex Potanin. 2013. OwnKit: Inferring Modularly Checkable Ownership Annotations for Java. In Australian Software Engineering Conference (ASWEC). Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle Scholar
  10. 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 ScholarGoogle Scholar
  11. Ebrahim Khalaj and Marwan Abi-Antoun. 2018. Online appendix: OOGRE. http://www.cs.wayne.edu/~mabianto/oogre/ .Google ScholarGoogle Scholar
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. Ana Milanova and Jan Vitek. 2011. Static Dominance Inference. In International Conference on Objects, Models, Components, Patterns (TOOLS). Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 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 ScholarGoogle Scholar
  15. University of Maryland. 2007. FindBugs: Find Bugs in Java Programs. http://findbugs.sourceforge.net .Google ScholarGoogle Scholar
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  17. Radu Vanciu and Marwan Abi-Antoun. 2013. Object Graphs with Ownership Domains: an Empirical Study. Springer LNCS 7850 (2013), 109–155. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. 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 ScholarGoogle Scholar
  19. Haitao Steve Zhu and Yu David Liu. 2013. Heap Decomposition Inference with Linear Programming. In European Conference on ObjectOriented Programming (ECOOP). Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Inferring ownership domains from refinements

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Published in

        cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 53, Issue 9
        GPCE '18
        September 2018
        214 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/3393934
        Issue’s Table of Contents
        • cover image ACM Conferences
          GPCE 2018: Proceedings of the 17th ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences
          November 2018
          214 pages
          ISBN:9781450360456
          DOI:10.1145/3278122

        Copyright © 2018 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 7 April 2020

        Check for updates

        Qualifiers

        • article
      • Article Metrics

        • Downloads (Last 12 months)5
        • Downloads (Last 6 weeks)1

        Other Metrics

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!