Skip to main content

Falling Back on Executable Specifications

  • Conference paper
Book cover ECOOP 2010 – Object-Oriented Programming (ECOOP 2010)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 6183))

Included in the following conference series:

Abstract

We describe a new approach to employing specifications for software reliability. Rather than only using specifications to validate implementations, we additionally employ specifications as a reliable alternative to those implementations. Our approach, which we call Plan B, performs dynamic contract checking of methods. However, instead of halting the program upon a contract violation, we employ a constraint solver to automatically execute the specification in order to allow the program to continue properly. This paper describes Plan B as well as its instantiation in an extension to Java with executable specifications that we call PBnJ (Plan B in Java). We present the design of PBnJ by example and describe its implementation, which leverages the Kodkod relational constraint solver. We also describe our experience using the language to enhance the reliability and functionality of several existing Java applications.

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 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.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. Barnett, M., Leino, K.R.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)

    Google Scholar 

  2. Demsky, B., Rinard, M.: Automatic detection and repair of errors in data structures. In: OOPSLA ’03: Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications, pp. 78–95. ACM, New York (2003)

    Chapter  Google Scholar 

  3. Demsky, B., Rinard, M.C.: Data structure repair using goal-directed reasoning. In: Roman, G.-C., Griswold, W.G., Nuseibeh, B. (eds.) ICSE, pp. 176–185. ACM, New York (2005)

    Google Scholar 

  4. Dennis, G., Chang, F.S.-H., Jackson, D.: Modular verification of code with sat. In: ISSTA ’06: Proceedings of the 2006 international symposium on Software testing and analysis, pp. 109–120. ACM, New York (2006)

    Chapter  Google Scholar 

  5. Dennis, G., Yessenov, K., Jackson, D.: Bounded verification of voting software. In: Shankar, N., Woodcock, J. (eds.) VSTTE 2008. LNCS, vol. 5295, pp. 130–145. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  6. Een, N., Sorensson, N.: MiniSat, http://minisat.se

  7. Elkarablieh, B., Garcia, I., Suen, Y.L., Khurshid, S.: Assertion-based repair of complex data structures. In: Stirewalt, R.E.K., Egyed, A. (eds.) ASE, pp. 64–73. ACM, New York (2007)

    Chapter  Google Scholar 

  8. Elkarablieh, B., Khurshid, S.: Juzi: a tool for repairing complex data structures. In: ICSE ’08: Proceedings of the 30th international conference on Software engineering, pp. 855–858. ACM, New York (2008)

    Chapter  Google Scholar 

  9. Elkarablieh, B., Khurshid, S., Vu, D., McKinley, K.S.: Starc: static analysis for efficient repair of complex data. In: OOPSLA ’07: Proceedings of the 22nd annual ACM SIGPLAN conference on Object-oriented programming systems and applications, pp. 387–404. ACM, New York (2007)

    Chapter  Google Scholar 

  10. Findler, R.B., Felleisen, M.: Contract soundness for object-oriented languages. In: OOPSLA ’01: Proceedings of the 16th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pp. 1–15. ACM, New York (2001)

    Chapter  Google Scholar 

  11. Flanagan, C., Leino, K.R.M., Lillibridge, M., Nelson, G., Saxe, J.B., Stata, R.: Extended static checking for java. In: PLDI ’02: Proceedings of the ACM SIGPLAN 2002 Conference on Programming language design and implementation, pp. 234–245. ACM, New York (2002)

    Chapter  Google Scholar 

  12. Freeman-Benson, B.N., Borning, A.: Integrating constraints with an object-oriented language. In: Lehrmann Madsen, O. (ed.) ECOOP 1992. LNCS, vol. 615, pp. 268–286. Springer, Heidelberg (1992)

    Chapter  Google Scholar 

  13. Gosling, J., Joy, B., Steele, G., Bracha, G.: Java(TM) Language Specification, 3rd edn. Addison-Wesley, Reading (2005)

    Google Scholar 

  14. Jackson, D.: Alloy: a lightweight object modelling notation. ACM Trans. Softw. Eng. Methodol. 11(2), 256–290 (2002)

    Article  Google Scholar 

  15. Jackson, D., Vaziri, M.: Finding bugs with a constraint solver. In: ISSTA ’00: Proceedings of the 2000 ACM SIGSOFT international symposium on Software testing and analysis, pp. 14–25. ACM, New York (2000)

    Google Scholar 

  16. JChessBoard, http://jchessboard.sourceforge.net

  17. Khurshid, S., Marinov, D.: Testera: Specification-based testing of java programs using sat. Autom. Softw. Eng. 11(4), 403–434 (2004)

    Article  Google Scholar 

  18. Khurshid, S., Marinov, D., Jackson, D.: An analyzable annotation language. In: OOPSLA ’02: Proceedings of the 17th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pp. 231–245. ACM, New York (2002)

    Chapter  Google Scholar 

  19. King, J.C.: Symbolic execution and program testing. Commun. ACM 19(7) (1976)

    Google Scholar 

  20. Krause, B., Wahls, T.: jmle: A tool for executing jml specifications via constraint programming. In: Brim, L., Haverkort, B.R., Leucker, M., van de Pol, J. (eds.) FMICS 2006 and PDMC 2006. LNCS, vol. 4346, pp. 293–296. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  21. Leavens, G.T., Baker, A.L., Ruby, C.: Preliminary design of jml: a behavioral interface specification language for java. SIGSOFT Softw. Eng. Notes 31(3), 1–38 (2006)

    Article  Google Scholar 

  22. Meyer, B.: Design by contract: Making object-oriented programs that work. In: TOOLS (25), p. 360. IEEE Computer Society, Los Alamitos (1997)

    Google Scholar 

  23. Morgan, C.: The specification statement. ACM Trans. Program. Lang. Syst. 10(3), 403–419 (1988)

    Article  MATH  Google Scholar 

  24. Nystrom, N., Clarkson, M.R., Myers, A.C.: Polyglot: An extensible compiler framework for java. In: Hedin, G. (ed.) CC 2003. LNCS, vol. 2622, pp. 138–152. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  25. Rayside, D., Milicevic, A., Yessenov, K., Dennis, G., Jackson, D.: Agile specifications. In: OOPSLA ’09: Proceeding of the 24th ACM SIGPLAN conference companion on Object oriented programming systems languages and applications, pp. 999–1006. ACM, New York (2009)

    Chapter  Google Scholar 

  26. SweetHome3D, http://www.sweethome3d.eu

  27. Torlak, E.: A constraint solver for software engineering: Finding models and cores of large relational specifications. Ph.D. dissertation, Massachusetts Institute of Technology (2009)

    Google Scholar 

  28. Vaziri, M., Jackson, D.: Checking properties of heap-manipulating procedures with a constraint solver. In: Garavel, H., Hatcliff, J. (eds.) TACAS 2003. LNCS, vol. 2619, pp. 505–520. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  29. Wahls, T., Leavens, G.T., Baker, A.L.: Executing formal specifications with concurrent constraint programming. Automated Software Engg. 7(4), 315–343 (2000)

    Article  MATH  Google Scholar 

  30. Zee, K., Kuncak, V., Rinard, M.: Full functional verification of linked data structures. In: PLDI ’08: Proceedings of the 2008 ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 349–361. ACM, New York (2008)

    Chapter  Google Scholar 

  31. Zee, K., Kuncak, V., Rinard, M.C.: An integrated proof language for imperative programs. In: PLDI ’09: Proceedings of the 2009 ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 338–351. ACM, New York (2009)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Samimi, H., Aung, E.D., Millstein, T. (2010). Falling Back on Executable Specifications. In: D’Hondt, T. (eds) ECOOP 2010 – Object-Oriented Programming. ECOOP 2010. Lecture Notes in Computer Science, vol 6183. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-14107-2_26

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-14107-2_26

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-14106-5

  • Online ISBN: 978-3-642-14107-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics