skip to main content
10.1145/1868281.1868289acmotherconferencesArticle/Chapter ViewAbstractPublication PagesldtaConference Proceedingsconference-collections
research-article

Specifying generic Java programs: two case studies

Published: 28 March 2010 Publication History

Abstract

This work investigates the question of modular specification of generic Java classes and methods. We propose extensions to the Krakatoa Modeling Language, a part of the Why platform for proving that a Java or C program is a correct implementation of some specification. The new constructs we propose for the specification of generic Java programs are presented through two significant examples: the specification of the generic method for sorting arrays which comes from the java.util.Arrays class in the Java API, and the specification of the java.util.HashMap class defining a generic hash map and its use for memoization. The key features are the introduction of parametricity both for types and for theories and an instantiation relation between theories. We discuss soundness conditions and their verification.

References

[1]
}}P. Baudin, J.-C. Filliâtre, C. Marché, B. Monate, Y. Moy, and V. Prevosto. ACSL: ANSI/ISO C Specification Language, version 1.4, 2009. http://frama-c.cea.fr/acsl.html.
[2]
}}L. Burdy, Y. Cheon, D. Cok, M. Ernst, J. Kiniry, G. Leavens, K. Leino, and E. Poll. An Overview of JML Tools and Applications. In FMICS 03, volume 80 of ENTCS, pages 73--89. Elsevier, 2003.
[3]
}}J. Chrzaszcz. Implementing modules in the Coq system. In TPHOLs'03, volume 2758 of Lecture Notes in Computer Science, pages 270--286. Springer, 2003.
[4]
}}D. R. Cok. Adapting JML to generic types and Java 1.6. In SAVCBS '08, pages 27--34, 2008.
[5]
}}J.-C. Filliâtre and N. Magaud. Certification of sorting algorithms in the Coq system. In Theorem Proving in Higher Order Logics: Emerging Trends, 1999.
[6]
}}J.-C. Filliâtre and C. Marché. The Why/Krakatoa/Caduceus platform for deductive program verification. In CAV'07, volume 4590 of Lecture Notes in Computer Science, pages 173--177. Springer, July 2007.
[7]
}}J. Kanig and J.-C. Filliâtre. Who: A Verifier for Effectful Higher-order Programs. In ACM SIGPLAN Workshop on ML, Aug. 2009.
[8]
}}G. T. Leavens and Y. Cheon. Design by Contract with JML. Available from http://www.jmlspecs.org, 2006.
[9]
}}C. Marché. Towards modular algebraic specifications for pointer programs: a case study. In Rewriting, Computation and Proof, volume 4600 of Lecture Notes in Computer Science, pages 235--258. Springer, 2007.
[10]
}}C. Marché. The Krakatoa tool for deductive verification of Java programs. Winter School on Object-Oriented Verification, Viinistu, Estonia, Jan. 2009. http://krakatoa.lri.fr/ws/.
[11]
}}J. Mitchell, S. Meldal, and N. Madhav. An extension of standard ML modules with subtyping and inheritance. In POPL '91, pages 270--278. ACM, 1991.
[12]
}}S. M. Shaner, G. T. Leavens, and D. A. Naumann. Modular verification of higher-order methods with mandatory calls specified by model programs. In Proceedings of OOPSLA'07, pages 351--368. ACM, 2007.
[13]
}}K. Stenzel, H. Grandy, and W. Reif. Verification of Java programs with generics. In AMAST'08, number 5140 in Lecture Notes in Computer Science, pages 315--329. Springer, 2008.
[14]
}}A. Tafat, S. Boulmé, and C. Marché. A refinement approach for correct-by-construction object-oriented programs. Technical Report RR-7310, INRIA, 2010.
[15]
}}A. Tafat, S. Boulmé, and C. Marché. A refinement methodology for object-oriented programs. In Formal Verification of Object-Oriented Software, Papers Presented at the International Conference, Paris, France, June 2010.
[16]
}}The Coq Development Team. The Coq Proof Assistant Reference Manual - Version V8.1, July 2006. http://coq.inria.fr.
[17]
}}M. Ulbrich. Software verification for Java 5. Diplomarbeit, Fakultät für Informatik, Universität Karlsruhe, 2007.

Cited By

View all
  • (2023)Joining Forces! Reusing Contracts for Deductive Verifiers Through Automatic TranslationiFM 202310.1007/978-3-031-47705-8_9(153-171)Online publication date: 6-Nov-2023
  • (2021)SWFC-ARTJournal of Systems and Software10.1016/j.jss.2021.111008180:COnline publication date: 1-Oct-2021

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
LDTA '10: Proceedings of the Tenth Workshop on Language Descriptions, Tools and Applications
March 2010
93 pages
ISBN:9781450300636
DOI:10.1145/1868281
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

  • University of Minnesota Software Engineering Center

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 28 March 2010

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. deductive verification
  2. formal specification language
  3. genericity

Qualifiers

  • Research-article

Conference

LDTA '10
Sponsor:

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

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

Other Metrics

Citations

Cited By

View all
  • (2023)Joining Forces! Reusing Contracts for Deductive Verifiers Through Automatic TranslationiFM 202310.1007/978-3-031-47705-8_9(153-171)Online publication date: 6-Nov-2023
  • (2021)SWFC-ARTJournal of Systems and Software10.1016/j.jss.2021.111008180:COnline publication date: 1-Oct-2021

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media