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 2006 Publication 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.
[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.
[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.
[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.
[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.
[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.
[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.
[8]
R. DeLine and K. R. M. Leino, "BoogiePL: A Typed Procedural Language for Checking Object-Oriented Programs", Microsoft Research, Technical Report, 2005.
[9]
D. L. Detlefs, G. Nelson, and J. B. Saxe, "A Theorem Prover For Program Checking", Compaq SRC, Research Report 159, 2002.
[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.
[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.
[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.
[13]
J. Grundy, "Predicative programming--A survey". International Conference Formal Methods in Programming and Their Applications, Novosibirsk, Russia, June 28 - July 2. Springer, 1993.
[14]
C. A. R. Hoare and J. He, Unifying Theories of Programming. Prentice Hall, 1998.
[15]
C. B. Jones, Systematic Software Development using VDM, 2nd ed. PHI, 1990.
[16]
C. B. Jones and C. A. Middelburg, "A Typed Logic of Partial Functions Reconstructed Classically", Acta Informatica, 31(5):399--430, 1994.
[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.
[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.
[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.
[20]
P. G. Larsen and N. Plat, "Introduction to Overture". First Overture Workshop, Newcastle upon Tyne, UK, July, 18, 2005.
[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.
[22]
G. T. Leavens and Y. Cheon, "Design by Contract with JML", www.jmlspecs.org, 2006.
[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.
[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.
[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.
[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.
[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.
[28]
B. Meyer, "Applying Design by Contract", Computer, 25(10):40--51, 1992.
[29]
B. Meyer, Object-Oriented Software Construction, 2nd ed. Prentice-Hall, 1997.
[30]
J. M. Morris, "Non-deterministic expressions and predicate transformers", Information Processing Letters, 61(5):241--246, 1997.
[31]
M. Shaw and D. Garlan, Software Architecture: Perspectives on an Emerging Discipline. Prentice-Hall, 1996.
[32]
J. M. Spivey, The Z Notation: A Reference Manual. Prentice-Hall, 1989.
[33]
SRI International, "The PVS Specification and Verification System", http://pvs.csl.sri.com.
[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.

Cited By

View all
  • (2018)Reusing a JML Specification Dedicated to Verification for Testing, and Vice-VersaJournal of Automated Reasoning10.1007/s10817-009-9132-y45:4(415-435)Online publication date: 28-Dec-2018
  • (2011)Improvement of a Visualization Technique for the Passage Rate of Unit Testing and Static Checking and Its EvaluationProceedings of the 2011 Joint Conference of the 21st International Workshop on Software Measurement and the 6th International Conference on Software Process and Product Measurement10.1109/IWSM-MENSURA.2011.27(279-284)Online publication date: 3-Nov-2011
  • (2011)A Visualization Technique for the Passage Rates of Unit Testing and Static Checking with Caller-Callee RelationshipsProceedings of the 2011 IEEE Ninth International Symposium on Parallel and Distributed Processing with Applications Workshops10.1109/ISPAW.2011.54(336-341)Online publication date: 26-May-2011
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

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
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 10 November 2006

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. JML
  2. extended static checking
  3. java modeling language
  4. precondition errors
  5. specification debugging

Qualifiers

  • Article

Conference

SIGSOFT06/FSE-14
Sponsor:

Acceptance Rates

SAVCBS '06 Paper Acceptance Rate 14 of 14 submissions, 100%;
Overall Acceptance Rate 37 of 46 submissions, 80%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)1
  • Downloads (Last 6 weeks)0
Reflects downloads up to 14 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2018)Reusing a JML Specification Dedicated to Verification for Testing, and Vice-VersaJournal of Automated Reasoning10.1007/s10817-009-9132-y45:4(415-435)Online publication date: 28-Dec-2018
  • (2011)Improvement of a Visualization Technique for the Passage Rate of Unit Testing and Static Checking and Its EvaluationProceedings of the 2011 Joint Conference of the 21st International Workshop on Software Measurement and the 6th International Conference on Software Process and Product Measurement10.1109/IWSM-MENSURA.2011.27(279-284)Online publication date: 3-Nov-2011
  • (2011)A Visualization Technique for the Passage Rates of Unit Testing and Static Checking with Caller-Callee RelationshipsProceedings of the 2011 IEEE Ninth International Symposium on Parallel and Distributed Processing with Applications Workshops10.1109/ISPAW.2011.54(336-341)Online publication date: 26-May-2011
  • (2007)Status report on JSR-305Companion to the 22nd ACM SIGPLAN conference on Object-oriented programming systems and applications companion10.1145/1297846.1297894(799-800)Online publication date: 20-Oct-2007
  • (2007)Reachability analysis for annotated codeProceedings of the 2007 conference on Specification and verification of component-based systems: 6th Joint Meeting of the European Conference on Software Engineering and the ACM SIGSOFT Symposium on the Foundations of Software Engineering10.1145/1292316.1292319(23-30)Online publication date: 3-Sep-2007
  • (2007)A Sound Assertion Semantics for the Dependable Systems Evolution Verifying CompilerProceedings of the 29th international conference on Software Engineering10.1109/ICSE.2007.9(23-33)Online publication date: 24-May-2007

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media