Inferring ownership domains from refinements
- 7 April 2020
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in ACM SIGPLAN Notices
- Vol. 53 (9), 53-65
- https://doi.org/10.1145/3393934.3278128
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: makeOwnedBy, to make an object strictly encapsulated by another; makePartOf, to make an object logically contained in another; makePeer, to make two objects peers; makeParam, to make an object more accessible than the above choices; or makeShared, 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.Keywords
Funding Information
- National Security Agency (H98230-14-C-0140)
This publication has 8 references indexed in Scilit:
- OwnKit: Inferring Modularly Checkable Ownership Annotations for JavaPublished by Institute of Electrical and Electronics Engineers (IEEE) ,2013
- Heap Decomposition Inference with Linear ProgrammingLecture Notes in Computer Science, 2013
- Inference and Checking of Object OwnershipLecture Notes in Computer Science, 2012
- Building and using pluggable type-checkersPublished by Association for Computing Machinery (ACM) ,2011
- Static extraction and conformance analysis of hierarchical runtime architectural structure using annotationsPublished by Association for Computing Machinery (ACM) ,2009
- Ownership Domains: Separating Aliasing Policy from MechanismLecture Notes in Computer Science, 2004
- Alias annotations for program understandingPublished by Association for Computing Machinery (ACM) ,2002
- Ownership types for flexible alias protectionPublished by Association for Computing Machinery (ACM) ,1998