Information Hiding and Visibility in Interface Specifications
Authors:
- 1 May 2007
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- No. 02705257,p. 385-395
Abstract
Information hiding controls which parts of a class are visible to non-privileged and privileged clients (e.g., subclasses). This affects detailed design specifications in two ways. First, specifications should not expose hidden class members. As noted in previous work, this is important because such hidden members are not meaningful to all clients. But it also allows changes to hidden implementation details without invalidating correctness proofs for client code, which is important for maintaining verified programs. Second, to enable sound modular reasoning, certain specifications must be visible to clients. We present rules for information hiding in specifications for Java-like languages, and demonstrate their application to the specification language JML. These rules restrict proof obligations to only mention visible class members, but retain soundness. This allows maintenance of implementations and their specifications without affecting client reasoning.Keywords
This publication has 16 references indexed in Scilit:
- Modular invariants for layered object structuresScience of Computer Programming, 2006
- Preliminary design of JMLACM SIGSOFT Software Engineering Notes, 2006
- Verification of Object-Oriented Programs with Invariants.The Journal of Object Technology, 2004
- Modular specification of frame properties in JMLConcurrency and Computation: Practice and Experience, 2003
- Data abstraction and information hidingACM Transactions on Programming Languages and Systems, 2002
- Safely creating correct subclasses without seeing superclass codeACM SIGPLAN Notices, 2000
- Data groups1998
- A behavioral notion of subtypingACM Transactions on Programming Languages and Systems, 1994
- Issues in the design and specification of class librariesACM SIGPLAN Notices, 1992
- On the Criteria to Be Used in Decomposing Systems into Modules1972