Abstract
In the context of test driven development, tests specify the behavior of a program before the code that implements it, is actually written. In addition, they are used as main source of documentation in XP projects, together with the program code. However, tests alone describe the properties of a program only in terms of examples and thus are not sufficient to completely describe the behavior of a program. In contrast, formal specifications allow to generalize these example properties to more general properties, which leads to a more complete description of the behavior of a program. Specifications add another main artifact to XP in addition to the already existent ones, i.e. code and tests. The interaction between these three artifacts further improves the quality of both software and documentation. The goal of this paper is to show that it is possible, with appropriate tool support, to combine formal specifications with test driven development without loosing the agility of test driven development.
This research has been partially sponsored by the EC 5th Framework project AGILE: Architectures for Mobility (IST-2001-32747)
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
Beck, K.: Extreme Programming Explained: Embrace Change. Addison-Wesley, Reading (1999)
Beck, K.: Test Driven Development: By Example. Addison-Wesley, Reading (2002)
Beck, K., Newkirk, J.: Baby steps, safely. article. PDF at groups.yahoo.com/group/testdrivendevelopment/files, 2 Architectures for Mobility (February 2002), http://www.pst.ifi.lmu.de/projekte/agile
Binder, R.V.: Testing Object-Oriented Systems: Models, Patterns, and Tools. Addison- Wesley, Reading (2000)
Bowen, J.: The World Wide Web virtual library: Formal methods (2004), http://www.afm.sbu.ac.uk
Cheon, Y., Leavens, G.T.: A runtime assertion checker for the Java Modeling Language (JML). In: Arabnia, H.R., Mun, Y. (eds.) International Conference on Software Engineering Research and Practice (SERP 2002), pp. 322–328. CSREA Press, Las Vegas (2002)
Contejean, E., Duprat, J., Filiǎtre, J.-C., Marché, C., Paulin-Mohring, C., Urbain, X.: The Krakatoa tool for JML/Java program verification (October 2002) Available at krakatoa.lri.fr
Feldman, Y.A.: Extreme design by contract. In: Marchesi, M., Succi, G. (eds.) XP 2003. LNCS, vol. 2675, pp. 261–270. Springer, Heidelberg (2003)
Flanagan, C., Leino, K.R.M., Lillibridge, M., Nelson, G., Saxe, J.B., Stata, R.: Extended static checking for Java. In: Proceedings of the 2002 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), vol. 37, pp. 234–245. ACM, New York (2002)
Floyd, R.W.: Toward interactive design of correct programs. In: Freiman, C.V., Griffith, J.E., Rosenfeld, J.L. (eds.) Information Processing 71, Proceedings of IFIP Congress 71,Foundations and Systems, Ljubljana, Yugoslavia, August 23-28, vol. 1, pp. 7–10. North-Holland, Amsterdam (1972)
Heinecke, H., Noack, C.: Integrating extreme programming and contracts. In: Beck, K., Marchesi, M., Succi, G. (eds.) 2nd International Conference on Extreme Programming and Flexible Processes in Software Engineering, XP 2001, Villasimius, Sardinia, Italy, May 20–23, pp. 24–27 (2001)
Herranz, A., Moreno-Navarro, J.J.: Formal extreme (and extremely formal) programming. In: Marchesi, M., Succi, G. (eds.) XP 2003. LNCS, vol. 2675, pp. 88–98. Springer, Heidelberg (2003)
Hoare, C.A.R.: An axiomatic basis for computer programming. Communications of the ACM 12(10), 576–583 (1969)
Hubbers, E., Oostdijk, M., Poll, E.: Implementing a formally verifiable security protocol in Java Card. In: Proc. of SPC 2003, 1st International Conference on Security in Pervasive Computing, Boppard, Germany, March 12-14 (2003)
Hunt, A., Thomas, D.: The Pragmatic Programmer. Addison–Wesley, Reading (2000)
Jacobs, B., Kiniry, J., Warnier, M.: Java program verification challenges. In: de Boer, F.S., Bonsangue, M.M., Graf, S., de Roever, W.-P. (eds.) FMCO 2002. LNCS, vol. 2852, pp. 202–219. Springer, Heidelberg (2003)
Jones, C.B.: Systematic Software Development Using VDM. Prentice Hall international series in computer science. 2nd edn. Prentice Hall, New York (1990)
Knapp, A., Merz, S., Rauh, C.: Model checking timed UML state machines and collaborations. In: Damm, W., Olderog, E.-R. (eds.) FTRTFT 2002. LNCS, vol. 2469, pp. 395–416. Springer, Heidelberg (2002)
Leavens, G.T., Baker, A.L., Ruby, C.: JML: a notation for detailed design. In: Kilov, H., Rumpe, B., Simmonds, I. (eds.) Behavioral Specifications for Businesses and Systems, vol. ch.12, pp. 175–188. Kluwer, Dordrecht (1999)
McConnell, S.: Code Complete. Microsoft Press, Redmond (1993)
Meyer, B.: Object-Oriented Software Construction. Prentice-Hall, Upper Saddle River (1997)
Ostroff, J., Makalsky, D., Paige, R.: Agile specification-driven development. In: Eckstein, J., Baumeister, H. (eds.) XP 2004. LNCS, vol. 3092, pp. 104–112. Springer, Heidelberg (2004)
Spivey, J.M.: The Z Notation: A Reference Manual. International series in computer science. 2nd edn. Prentice Hall, New York(1992)
van den Berg, J., Jacobs, B.: The LOOP compiler for Java and JML. In: Margaria, T., Yi, W. (eds.) TACAS 2001. LNCS, vol. 2031, pp. 299–312. Springer, Heidelberg (2001)
Warmer, J., Kleppe, A.: The Object Constraint Language: Precise Modeling with UML, 1st edn. Addison-Wesley, Reading (1998)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2004 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Baumeister, H. (2004). Combining Formal Specifications with Test Driven Development. In: Zannier, C., Erdogmus, H., Lindstrom, L. (eds) Extreme Programming and Agile Methods - XP/Agile Universe 2004. XP/Agile Universe 2004. Lecture Notes in Computer Science, vol 3134. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-27777-4_1
Download citation
DOI: https://doi.org/10.1007/978-3-540-27777-4_1
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-22839-4
Online ISBN: 978-3-540-27777-4
eBook Packages: Springer Book Archive