Modular Verification of OO Programs with Interfaces
Interface types in OO languages support polymorphism, abstraction and information hiding by separating interfaces from their implementations. The separation enhances modularity of programs, however, it causes also challenges to the formal verification. Here we present a study on interface types, and develop a specification and verification theory based on our former veriJ framework. We support multi-specifications for classes inherited from interfaces and the superclass, and keep the verification modularly without re-touching the verified code. The concepts developed in veriJ, namely the abstract specification and specification predicate, play important roles in this extension, and thus are proved widely useful and very natural in the formal proofs of OO programs.
KeywordsInference Rule Information Hiding Interface Type Method Invocation Separation Logic
Unable to display preview. Download preview PDF.
- 6.Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns, Elements of Reusable Object-Oriented Software. Addlison Wesley (1994)Google Scholar
- 8.Leavens, G.T., Naumann, D.A.: Behavioral subtyping is equivalent to modular reasoning for object-oriented programs. Technical Report 06-36, Department of Computer Science, Iowa State University, Ames, Iowa, 50011 (2006)Google Scholar
- 10.Leavens, G.T., Müller, P.: Information hiding and visibility in interface specifications. In: 29th International Conference on Software Engineering, ICSE 2007, pp. 385–395 (2007)Google Scholar
- 11.Leino, K.R.M.: Toward reliable modular programs. PhD thesis, California Institute of Technology, Pasadena, CA, USA, UMI Order No. GAX95-26835 (1995)Google Scholar
- 16.Poetzsch-Heffter, A.: Specification and verification of object-oriented programs. Technische Universität München (1997)Google Scholar
- 18.Yijing, L., Ali, H., Zongyan, Q.: Inheritance and modularity in specification and verification of OO programs. In: TASE 2011, pp. 19–26. IEEE Computer Society (2011)Google Scholar
- 19.Yijing, L., Zongyan, Q.: A Separation Logic for OO Programs. In: Barbosa, L.S., Lumpe, M. (eds.) FACS 2010. LNCS, vol. 6921, pp. 88–105. Springer, Heidelberg (2010)Google Scholar
- 20.Zongyan, Q., Ali, H., Yijing, L.: Modular verification of OO programs with interface types. Technical report, School of Math., Peking Univ. (2012), http://www.mathinst.pku.edu.cn/download.php?classid=22