Skip to main content

Safety Property Driven Test Generation from JML Specifications

  • Conference paper
Formal Approaches to Software Testing and Runtime Verification (FATES 2006, RV 2006)

Abstract

This paper describes the automated generation of test sequences derived from a JML specification and a safety property written in an ad hoc language, named JTPL. The functional JML model is animated to build the test sequences w.r.t. the safety properties, which represent the test targets. From these properties, we derive strategies that are used to guide the symbolic animation. Moreover, additional JML annotations reinforce the oracle in order to guarantee that the safety properties are not violated during the execution of the test suite. Finally, we illustrate this approach on an industrial JavaCard case study.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Abrial, J.R.: The B Book. Cambridge University Press, Cambridge (1996)

    Book  MATH  Google Scholar 

  2. Ammann, P., Black, P.E., Majurski, W.: Using model checking to generate tests from specifications. In: ICFEM 1998, pp. 46–55. IEEE Comp. Soc. Press, Los Alamitos (1998)

    Google Scholar 

  3. Bouquet, F., Dadeau, F., Legeard, B.: Automated Boundary Test Generation from JML Specifications. In: Misra, J., Nipkow, T., Sekerinski, E. (eds.) FM 2006. LNCS, vol. 4085, pp. 428–443. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  4. Bouquet, F., Dadeau, F., Legeard, B., Utting, M.: Symbolic Animation of JML Specifications. In: Fitzgerald, J.S., Hayes, I.J., Tarlecki, A. (eds.) FM 2005. LNCS, vol. 3582, pp. 75–90. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  5. Boyapati, C., Khurshid, S., Marinov, D.: Korat: automated testing based on java predicates. In: ISSTA 2002, pp. 123–133. ACM Press, New York (2002)

    Chapter  Google Scholar 

  6. Breunesse, C.-B., Cataño, N., Huisman, M., Jacobs, B.: Formal methods for smart cards: an experience report. Sci. Comput. Program. 55(1-3), 53–80 (2005)

    Article  MATH  Google Scholar 

  7. Burdy, L., Requet, A., Lanet, J.L.: Java Applet Correctness: a Developer-Oriented Approach. In: Araki, K., Gnesi, S., Mandrioli, D. (eds.) FME 2003. LNCS, vol. 2805, pp. 422–439. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  8. Dwyer, M.B., Avrunin, G.S., Corbett, J.C.: Patterns in property specifications for finite-state verification. In: ICSE, pp. 411–420 (1999)

    Google Scholar 

  9. Giorgetti, A., Groslambert, J.: Jag: Jml annotation generation for verifying temporal properties. In: Baresi, L., Heckel, R. (eds.) FASE 2006. LNCS, vol. 3922, pp. 373–376. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  10. Holzmann, G.J.: The model checker SPIN. IEEE Trans. on Software Engineering 23(5), 279–295 (1997)

    Article  MathSciNet  Google Scholar 

  11. Leavens, G.T., Cheon, Y., Clifton, C., Ruby, C., Cok, D.R.: How the Design of JML Accomodates Both Runtime Assertion Checking and Formal Verification. In: de Boer, F.S., Bonsangue, M.M., Graf, S., de Roever, W.-P. (eds.) FMCO 2002. LNCS, vol. 2852, pp. 262–284. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  12. Leavens, G.T., Baker, A.L., Ruby, C.: JML: A notation for detailed design. In: Kilov, H., Rumpe, B., Simmonds, I. (eds.) Behavioral Specifications of Businesses and Systems, pp. 175–188. Kluwer Academic Publishers, Boston (1999)

    Google Scholar 

  13. Ledru, Y., du Bousquet, L., Maury, O., Bontron, P.: Filtering TOBIAS Combinatorial Test Suites. In: Wermelinger, M., Margaria-Steffen, T. (eds.) FASE 2004. LNCS, vol. 2984, pp. 281–294. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  14. Leino, K.R.M., Barnett, 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)

    Chapter  Google Scholar 

  15. Marlet, R., Mesnil, C.: Demoney: A demonstrative electronic purse - card specification. Technical report, Trusted Logic (2002)

    Google Scholar 

  16. Oriat, C.: Jartege: A tool for random generation of unit tests for java classes. In: Reussner, R., Mayer, J., Stafford, J.A., Overhage, S., Becker, S., Schroeder, P.J. (eds.) QoSA 2005 and SOQUA 2005. LNCS, vol. 3712, pp. 242–256. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  17. Sun microsystems. Java Card 2.1.1 Virtual Machine Specification (May 2000), http://java.sun.com/products/javacard/javacard21.html#specification

  18. Tan, L., Sokolsky, O., Lee, I.: Specification-based testing with linear temporal logic. In: IRI, pp. 493–498. IEEE Systems, Man, and Cybernetics Society (2004)

    Google Scholar 

  19. Trentelman, K., Huisman, M.: Extending JML Specifications with Temporal Logic. In: Kirchner, H., Ringeissen, C. (eds.) AMAST 2002. LNCS, vol. 2422, pp. 334–348. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Bouquet, F., Dadeau, F., Groslambert, J., Julliand, J. (2006). Safety Property Driven Test Generation from JML Specifications. In: Havelund, K., Núñez, M., Roşu, G., Wolff, B. (eds) Formal Approaches to Software Testing and Runtime Verification. FATES RV 2006 2006. Lecture Notes in Computer Science, vol 4262. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11940197_15

Download citation

  • DOI: https://doi.org/10.1007/11940197_15

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-49699-1

  • Online ISBN: 978-3-540-49703-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics