Client-aware checking and information hiding in interface specifications with JML/ajmlc
Authors:
Open Access
- 26 October 2013
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 11-12
Abstract
Information hiding controls which parts of a module are visible to different clients. This aids maintenance because hidden implementation details can be changed without affecting clients. The benefits of information hiding apply not only to code but also to other artifacts, such as specifications. In this demonstration we show how our client-aware checking (CAC) technique, which is implemented by our JML/ajmlc compiler and freely available online, use the privacy information in specifications to promote information hiding. We demonstrate the benefits of CAC over existing runtime assertion checkers (RACs) of contemporary interface specification languages. Client-aware checking allows runtime assertion checking and error reporting based solely on specifications visible to clients. This avoids exposing hidden implementation or specification details that cannot be understood by non-privileged clients. This demonstration will proceed by discussing the goals of the CAC technique by means of realistic examples. Attendees will mainly see JML specifications, including pre- and postconditions for methods. They will learn how to use the JML/ajmlc compiler, which also provides information hiding capabilities. In addition, they will learn how to use model fields to hide the actual field declarations in classes, and how model fields play an important role in achieving information hiding. We will conclude with pointers to ongoing work on design, implementation and runtime checking of Java programs with CAC-based JML/ajmlc.Keywords
This publication has 9 references indexed in Scilit:
- Optimizing generated aspect-oriented assertion checking code for JML using program transformations: An empirical studyScience of Computer Programming, 2013
- Embedded contract languages2010
- Implementing Java modeling language contracts with AspectJ2008
- Information Hiding and Visibility in Interface Specifications2007
- Preliminary design of JMLACM SIGSOFT Software Engineering Notes, 2006
- Weakest-precondition of unstructured programsACM SIGSOFT Software Engineering Notes, 2005
- The Spec# Programming System: An Overview2005
- Contract Soundness for object-oriented languages2001
- On the criteria to be used in decomposing systems into modulesCommunications of the ACM, 1972