skip to main content
10.1145/1181195.1181201acmconferencesArticle/Chapter ViewAbstractPublication PagesfseConference Proceedingsconference-collections
Article

Early detection of JML specification errors using ESC/Java2

Published:10 November 2006Publication History

ABSTRACT

The earlier errors are found, the less costly they are to fix. This also holds true of errors in specifications. While research into Static Program Verification (SPV) in general, and Extended Static Checking (ESC) in particular, has made great strides in recent years, there is little support for detecting errors in specifications beyond ordinary type checking. This paper reports on recent enhancements that we have made to ESC/Java2, enabling it to report errors in JML specifications due to (method or Java operator) precondition violations and this, at a level of diagnostics that is on par with its ability to report such errors in program code. The enhancements also now make it possible for ESC/Java2 to report errors in specifications for which no corresponding source is available. Applying this new feature to, e.g., the JML specifications of classes in java.*, reveals over 50 errors, including inconsistencies. We describe the adjustment to the assertion semantics necessary to make this possible, and we provide an account of the (rather small) design changes needed to realize the enhancements.

References

  1. J. Barnes, High Integrity Software: The Spark Approach to Safety and Security. Addison-Wesley, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. L. Burdy, A. Requet, and J.-L. Lanet, "Java Applet Correctness: A Developer-Oriented Approach". Proceedings of the International Symposium of Formal Methods Europe, vol. 2805 of LNCS. Springer, 2003.Google ScholarGoogle Scholar
  3. P. Chalin, "Logical Foundations of Program Assertions: What do Practitioners Want?" Proceedings of the Third International Conference on Software Engineering and Formal Methods (SEFM'05), Koblenz, Germany, September 5--9. IEEE Computer Society Press, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. P. Chalin, "Reassessing JML's Logical Foundation". Proceedings of the 7th Workshop on Formal Techniques for Java-like Programs (FTfJP'05), Glasgow, Scotland, July, 2005.Google ScholarGoogle Scholar
  5. P. Chalin, "De-risking the Verifying Compiler Project: Recovering Soundness", Dependable Software Research Group, Department of Computer Science and Software Engineering, Concordia University, ENCS-CSE-TR 2005--009, 2006.Google ScholarGoogle Scholar
  6. P. Chalin, J. Kiniry, G. T. Leavens, and E. Poll, "Beyond Assertions: Advanced Specification and Verification with JML and ESC/Java2". Fourth International Symposium on Formal Methods for Components and Objects (FMCO'05), 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. D. R. Cok and J. R. Kiniry, "ESC/Java2: Uniting ESC/Java and JML". In G. Barthe, L. Burdy, M. Huisman, J.-L. Lanet, and T. Muntean editors, Proceedings of the International Workshop on the Construction and Analysis of Safe, Secure, and Interoperable Smart Devices (CASSIS'04), Marseille, France, March 10--14, vol. 3362 of LNCS, pp. 108--128. Springer, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. R. DeLine and K. R. M. Leino, "BoogiePL: A Typed Procedural Language for Checking Object-Oriented Programs", Microsoft Research, Technical Report, 2005.Google ScholarGoogle Scholar
  9. D. L. Detlefs, G. Nelson, and J. B. Saxe, "A Theorem Prover For Program Checking", Compaq SRC, Research Report 159, 2002.Google ScholarGoogle Scholar
  10. R. B. Findler and M. Felleisen, "Contract Soundness for Object-Oriented Languages". 16th ACM SIGPLAN Conference on Object Oriented Programming, Systems, Languages, and Applications (OOPSLA '01), Tampa Bay, FL, USA, October 14--18. ACM Press, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. C. Flanagan, K. R. M. Leino, M. Lillibridge, G. Nelson, J. B. Saxe, and R. Stata, "Extended static checking for Java". Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'02), June, vol. 37(5), pp. 234--245. ACM Press, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. D. Gries and F. B. Schneider, "Avoiding the Undefined by Underspecification", in Computer Science Today: Recent Trends and Developments, vol. 1000, J. v. Leeuwen, Ed.: Springer-Verlag, 1995, pp. 366--373.Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. J. Grundy, "Predicative programming--A survey". International Conference Formal Methods in Programming and Their Applications, Novosibirsk, Russia, June 28 - July 2. Springer, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. C. A. R. Hoare and J. He, Unifying Theories of Programming. Prentice Hall, 1998.Google ScholarGoogle Scholar
  15. C. B. Jones, Systematic Software Development using VDM, 2nd ed. PHI, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. C. B. Jones and C. A. Middelburg, "A Typed Logic of Partial Functions Reconstructed Classically", Acta Informatica, 31(5):399--430, 1994.Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. J. R. Kiniry, P. Chalin, and C. Hurlin, "Integrating Static Checking and Interactive Verification: Supporting Multiple Theories and Provers in Verification". Proceedings of the International Conference on Verified Software: Theories, Tools, Experiments (VSTTE), Zürich, Switzerland, October 10--13, 2005.Google ScholarGoogle Scholar
  18. B. Konikowska, "Two Over Three: A Two-Valued Logic for Software Specification and Validation Over a Three-Valued Predicate Calculus", Journal of Applied Non-Classical Logics, 3:39--71, 1993.Google ScholarGoogle ScholarCross RefCross Ref
  19. B. Konikowska, A. Tarlecki, and A. Blikle, "A Three-valued Logic for Software Specification and Validation". Second VDM Europe Symposium. VDM - The Way Ahead (VDM'88), Dublin, Ireland, September. Springer, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. P. G. Larsen and N. Plat, "Introduction to Overture". First Overture Workshop, Newcastle upon Tyne, UK, July, 18, 2005.Google ScholarGoogle Scholar
  21. G. T. Leavens, "JML's Rich, Inherited Specifications for Behavioral Subtypes", Department of Computer Science, Iowa State University, Ames, Iowa. USA, TR #06--22, 2006.Google ScholarGoogle Scholar
  22. G. T. Leavens and Y. Cheon, "Design by Contract with JML", www.jmlspecs.org, 2006.Google ScholarGoogle Scholar
  23. G. T. Leavens, Y. Cheon, C. Clifton, C. Ruby, and D. R. Cok, "How the design of JML accommodates both runtime assertion checking and formal verification", Science of Computer Programming, 55(1--3):185--208, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. G. T. Leavens, E. Poll, C. Clifton, Y. Cheon, C. Ruby, D. Cok, P. Müller, J. Kiniry, and P. Chalin, "JML Reference Manual", http://www.jmlspecs.org, 2006.Google ScholarGoogle Scholar
  25. K. R. M. Leino, "Ecstatic: An object-oriented programming language with an axiomatic semantics". Fourth International Workshop on Foundations of Object-Oriented Languages, January, 1997.Google ScholarGoogle Scholar
  26. K. R. M. Leino, J. B. Saxe, and R. Stata, "Checking Java programs via guarded commands", COMPAQ SRC, Palo Alto, CA, SRC Technical Note 1999--002. 21 May 1999, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. C. Marché, C. Paulin-Mohring, and X. Urbain, "The Krakatoa tool for certification of Java/JavaCard programs annotated in JML", Journal of Logic and Algebraic Programming, 58(1--2):89--106, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  28. B. Meyer, "Applying Design by Contract", Computer, 25(10):40--51, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. B. Meyer, Object-Oriented Software Construction, 2nd ed. Prentice-Hall, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. J. M. Morris, "Non-deterministic expressions and predicate transformers", Information Processing Letters, 61(5):241--246, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. M. Shaw and D. Garlan, Software Architecture: Perspectives on an Emerging Discipline. Prentice-Hall, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. J. M. Spivey, The Z Notation: A Reference Manual. Prentice-Hall, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. SRI International, "The PVS Specification and Verification System", http://pvs.csl.sri.com.Google ScholarGoogle Scholar
  34. J. van den Berg and B. Jacobs, "The LOOP compiler for Java and JML". In T. Margaria and W. Yi editors, Proceedings of the Tools and Algorithms for the Construction and Analysis of Software (TACAS), vol. 2031 of LNCS, pp. 299--312. Springer, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Early detection of JML specification errors using ESC/Java2

              Recommendations

              Comments

              Login options

              Check if you have access through your login credentials or your institution to get full access on this article.

              Sign in
              • Published in

                cover image ACM Conferences
                SAVCBS '06: Proceedings of the 2006 conference on Specification and verification of component-based systems
                November 2006
                87 pages
                ISBN:159593586X
                DOI:10.1145/1181195

                Copyright © 2006 ACM

                Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

                Publisher

                Association for Computing Machinery

                New York, NY, United States

                Publication History

                • Published: 10 November 2006

                Permissions

                Request permissions about this article.

                Request Permissions

                Check for updates

                Qualifiers

                • Article

                Acceptance Rates

                SAVCBS '06 Paper Acceptance Rate14of14submissions,100%Overall Acceptance Rate37of46submissions,80%

              PDF Format

              View or Download as a PDF file.

              PDF

              eReader

              View online with eReader.

              eReader