Modular Verification of OO Programs with Interfaces

  • Qiu Zongyan
  • Hong Ali
  • Liu Yijing
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7635)


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.


Inference Rule Information Hiding Interface Type Method Invocation Separation Logic 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Barnett, M., Fähndrich, M., Leino, K.R.M., Müller, P., Schulte, W., Venter, H.: Specification and verification: the spec# experience. Communications of the ACM 54(6), 81–91 (2011)CrossRefGoogle Scholar
  2. 2.
    Barnett, M., Leino, K.R.M., Schulte, W.: The Spec# Programming System: An Overview. In: Barthe, G., Burdy, L., Huisman, M., Lanet, J.-L., Muntean, T. (eds.) CASSIS 2004. LNCS, vol. 3362, pp. 49–69. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  3. 3.
    Cheon, Y., Leavens, G., Sitaraman, M., Edwards, S.: Model variables: cleanly supporting abstraction in design by contract. Software: Practice and Experience 35(6), 583–599 (2005)CrossRefGoogle Scholar
  4. 4.
    Chin, W.-N., David, C., Nguyen, H.H., Qin, S.: Enhancing modular OO verification with separation logic. In: POPL 2008, pp. 87–99. ACM, New York (2008)CrossRefGoogle Scholar
  5. 5.
    Distefano, D., Parkinson, M.J.: jstar: Towards practical verification for java. ACM SIGPLAN Notices 43(10), 213–226 (2008)CrossRefGoogle Scholar
  6. 6.
    Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns, Elements of Reusable Object-Oriented Software. Addlison Wesley (1994)Google Scholar
  7. 7.
    Leavens, G.T.: JML’s Rich, Inherited Specifications for Behavioral Subtypes. In: Liu, Z., He, J. (eds.) ICFEM 2006. LNCS, vol. 4260, pp. 2–34. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  8. 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
  9. 9.
    Leavens, G.T., Baker, A.L., Ruby, C.: Preliminary design of JML: A behavioral interface specification language for Java. SIGSOFT Software Engineering Notes 31(3), 1–38 (2006)CrossRefGoogle Scholar
  10. 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. 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
  12. 12.
    Leino, K.R.M.: Data groups: specifying the modification of extended state. SIGPLAN Notices 33, 144–153 (1998)CrossRefGoogle Scholar
  13. 13.
    Liskov, B., Wing, J.M.: A behavioral notion of subtyping. ACM Transactions on Programing Languages and Systems 16(6), 1811–1841 (1994)CrossRefGoogle Scholar
  14. 14.
    Müller, P.: Modular Specification and Verification of Object-Oriented Programs. LNCS, vol. 2262. Springer, Heidelberg (2002)zbMATHCrossRefGoogle Scholar
  15. 15.
    Parkinson, M.J., Bierman, G.M.: Separation logic, abstraction and inheritance. In: POPL 2008, pp. 75–86. ACM, New York (2008)CrossRefGoogle Scholar
  16. 16.
    Poetzsch-Heffter, A.: Specification and verification of object-oriented programs. Technische Universität München (1997)Google Scholar
  17. 17.
    Smans, J., Jacobs, B., Piessens, F.: Implicit Dynamic Frames: Combining Dynamic Frames and Separation Logic. In: Drossopoulou, S. (ed.) ECOOP 2009. LNCS, vol. 5653, pp. 148–172. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  18. 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. 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. 20.
    Zongyan, Q., Ali, H., Yijing, L.: Modular verification of OO programs with interface types. Technical report, School of Math., Peking Univ. (2012),

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Qiu Zongyan
    • 1
    • 2
  • Hong Ali
    • 1
  • Liu Yijing
    • 1
  1. 1.LMAM and Department of Informatics, School of Math.Peking UniversityChina
  2. 2.State Key Laboratory of Computer ScienceISCASChina

Personalised recommendations