首页|Inferring Ownership Domains from Refinements

Inferring Ownership Domains from Refinements

扫码查看
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.

ownership type systemstype inference

Ebrahim Khalaj、Marwan Abi-Antoun

展开 >

Department of Computer Science Wayne State University Detroit, MI, USA

2018

ACM SIGPLAN Notices

ACM SIGPLAN Notices

EIISTP
ISSN:0362-1340
年,卷(期):2018.53(9)
  • 19