Abstract
This paper presents a case study in formal specification of smart card programs, using ESC/Java. It discusses an electronic purse application, provided by Gemplus, that we have annotated with functional specifications (i.e. pre- and postconditions, modifies clauses and class invariants), that are as detailed as possible. The specification is based on the informal documentation of the application. Using ESC/Java, the implementation has been checked w.r.t. the specification. This revealed several errors or possibilities for improvement in the source code (e.g. removing unnecessary tests).
Our paper shows that a relatively lightweight use of formal specification techniques can already have a serious impact on the quality of a program and its documentation. Furthermore, we also present some ideas on how ESC/Java could be further improved, both w.r.t. specification and verification.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
E. Bretagne, A. El Marouani, P. Girard, and J.-L. Lanet. Pacap purse and loyalty specification. Technical Report V 0.4, Gemplus, 2000.
C. Breunesse, B. Jacobs, and J. van den Berg. Specifying and Verifying a Decimal Representation in Java for Smart Cards. In Algebraic Methodology And Software Technology (AMAST’ 02), LNCS. Springer, 2002. To appear.
N. Cataño and M. Huisman. Annotated files Electronic Purse case study, 2001. http://www-sop.inria.fr/lemme/verificard/electronicpurse.
N. Cataño and M. Huisman. A static checker for JML’s assignable clause, 2002. Manuscript.
Differences between Esc/Java and JML, 2000. Comes with JML distribution, in file esc-jml-diffs.txt.
Extended static checking for Java. http://research.compaq.com/SRC/esc/.
ESC/Java specifications for the JavaCard API. http://www.cs.kun.nl/~erikpoll/publications/jc211specs.html.
Gemplus. Applet benchmark kit. http://www.gemplus.com/smart/rd/publications/case-study/.
M. Huisman, B. Jacobs, and J. van den Berg. A Case Study in Class Library Verification: Java’s Vector Class. Software Tools for Technology Transfer, 3/3:332–352, 2001.
The JASS project. http://semantik.informatik.uni-oldenburg.de/~jass/.
G.T. Leavens, A.L. Baker, and C. Ruby. Preliminary Design of JML: a Behavioral Interface Specification Language for Java. Technical Report 98-06, Iowa State University, Department of Computer Science, 2000.
K.R.M. Leino, G. Nelson, and J.B. Saxe. ESC/Java user’s manual. Technical Report SRC 2000-002, Compaq System Research Center, 2000.
The LOOP project. http://www.cs.kun.nl/~bart/LOOP/.
H. Meijer and E. Poll. Towards a Full Formal Specification of the Java Card API. In I. Attali and T. Jensen, editors, Smart Card Programming and Security (E-smart 2001), number 2140 in LNCS, pages 165–178. Springer, 2001.
B. Meyer. Object-Oriented Software Construction. Prentice Hall, 2nd rev. edition, 1997.
J. Meyer and A. Poetzsch-Heffter. An architecture of interactive program provers. In S. Graf and M. Schwartzbach, editors, Tools and Algorithms for the Construction and Analysis of Systems (TACAS 2000), number 1785 in LNCS, pages 63–77. Springer, 2000.
Sun Microsystems, Inc. Java Card 2.1. Platform Application Programming Interface (API) Specification. http://java.sun.com/products/javacard/htmldoc/.
Sun Microsystems, Inc. JavaCard Technology. http://java.sun.com/products/javacard/.
K. Trentelman and M. Huisman. Extending JML Specifications with Temporal Logic. In Algebraic Methodology And Software Technology (AMAST’ 02), LNCS. Springer, 2002. To appear.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2002 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Cataño, N., Huisman, M. (2002). Formal Specification and Static Checking of Gemplus’ Electronic Purse Using ESC/Java. In: Eriksson, LH., Lindsay, P.A. (eds) FME 2002:Formal Methods—Getting IT Right. FME 2002. Lecture Notes in Computer Science, vol 2391. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45614-7_16
Download citation
DOI: https://doi.org/10.1007/3-540-45614-7_16
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-43928-8
Online ISBN: 978-3-540-45614-8
eBook Packages: Springer Book Archive