Affiliation:
1. Kansas State University, Manhattan, Kansas
2. Stevens Institute of Technology, Hoboken, New Jersey
Abstract
Representation independence formally characterizes the encapsulation provided by language constructs for data abstraction and justifies reasoning by simulation. Representation independence has been shown for a variety of languages and constructs but not for shared references to mutable state; indeed it fails in general for such languages. This article formulates representation independence for classes, in an imperative, object-oriented language with pointers, subclassing and dynamic dispatch, class oriented visibility control, recursive types and methods, and a simple form of module. An instance of a class is considered to implement an abstraction using private fields and so-called representation objects. Encapsulation of representation objects is expressed by a restriction, called confinement, on aliasing. Representation independence is proved for programs satisfying the confinement condition. A static analysis is given for confinement that accepts common designs such as the observer and factory patterns. The formalization takes into account not only the usual interface between a client and a class that provides an abstraction but also the interface (often called “protected”) between the class and its subclasses.
Publisher
Association for Computing Machinery (ACM)
Subject
Artificial Intelligence,Hardware and Architecture,Information Systems,Control and Systems Engineering,Software
Cited by
54 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Ownership-Based Owicki-Gries Reasoning;Proceedings of the 38th ACM/SIGAPP Symposium on Applied Computing;2023-03-27
2. A Relational Program Logic with Data Abstraction and Dynamic Framing;ACM Transactions on Programming Languages and Systems;2022-12-31
3. Necessity
specifications for robustness;Proceedings of the ACM on Programming Languages;2022-10-31
4. SyTeCi: automating contextual equivalence for higher-order programs with references;Proceedings of the ACM on Programming Languages;2020-01
5. Holistic Specifications for Robust Programs;Fundamental Approaches to Software Engineering;2020