Skip to main content

Testing Data Types Implementations from Algebraic Specifications

  • Chapter
Formal Methods and Testing

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

Abstract

Algebraic specifications of data types provide a natural basis for testing data types implementations. In this framework, the conformance relation is based on the satisfaction of axioms. This makes it possible to state formally the fundamental concepts of testing: exhaustive test set, testability hypotheses, oracle. Various criteria for selecting finite test sets have been proposed. They depend on the form of the axioms, and on the possibilities of observation of the implementation under test. This last point is related to the well-known oracle problem. As the main interest of algebraic specifications is data type abstraction, testing a concrete implementation raises the issue of the gap between the abstract description and the concrete representation. The observational semantics of algebraic specifications bring solutions on the basis of the so-called observable contexts. After a description of testing methods based on algebraic specifications, the chapter gives a brief presentation of some tools and case studies, and presents some applications to other formal methods involving data types.

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. Aiguier, M., Arnould, A., Boin, C., Le Gall, P., Marre, B.: Testing from algebraic specifications: Test data set selection by unfolding axioms. In: Grieskamp, W., Weise, C. (eds.) FATES 2005. LNCS, vol. 3997, pp. 203–217. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  2. Arnold, A., Gaudel, M., Marre, B.: An experiment on the validation of a specification by heterogeneous formal means: The transit node. In: 5th IFIP Working Conference on Dependable Computing for Critical Applications (DCCA5), pp. 24–34 (1995)

    Google Scholar 

  3. Arnould, A., Le Gall, P.: Test de conformité: une approche algébrique. Technique et Science Informatiques, Test de logiciel 21(9), 1219–1242 (2002)

    Google Scholar 

  4. Arnould, A., Le Gall, P., Marre, B.: Dynamic testing from bounded data type specifications. In: Hlawiczka, A., Simoncini, L., Silva, J.G.S. (eds.) EDCC 1996. LNCS, vol. 1150, pp. 285–302. Springer, Heidelberg (1996)

    Google Scholar 

  5. Astesiano, E., Kreowski, H.-J., Krieg-Bruckner, B.: Algebraic Foundations of Systems Specification. In: IFIP State-of-the-Art Reports, Springer, Heidelberg (1999)

    Google Scholar 

  6. Barbey, S., Buchs, D.: Testing Ada abstract data types using formal specifications. In: 1st Int. Eurospace-Ada-Europe Symposium. LNCS, vol. 887, pp. 76–89. Springer, Heidelberg (1994)

    Google Scholar 

  7. Berghofer, S., Nipkow, T.: Random testing in isabelle/hol. In: SEFM, pp. 230–239 (2004)

    Google Scholar 

  8. Bernot, G.: Testing against formal specifications: A theoretical view. In: Abramsky, S. (ed.) TAPSOFT 1991, CCPSD 1991, and ADC-Talks 1991. LNCS, vol. 494, pp. 99–119. Springer, Heidelberg (1991)

    Google Scholar 

  9. Bernot, G., Bouaziz, L., Le Gall, P.: A theory of probabilistic functional testing. In: ICSE 1997: Proceedings of the 19th international conference on Software engineering, pp. 216–226. ACM Press, New York (1997)

    Chapter  Google Scholar 

  10. Bernot, G., Gaudel, M.-C., Marre, B.: Software testing based on formal specifications: A theory and a tool. Software Engineering Journal 6(6), 387–405 (1991)

    Article  Google Scholar 

  11. Bernot, G., Gaudel, M.-C., Marre, B.: A formal approach to software testing. In: 2nd International Conference on Algebraic Methodology and Software Technology (AMAST). Worshops in Computing Series, vol. 670, pp. 243–253. Springer, Heidelberg (1992)

    Google Scholar 

  12. Bidoit, M., Hennicker, R.: Behavioural theories and the proof of behavioural properties. Theoretical Computer Science 165(1), 3–55 (1996)

    Article  MathSciNet  MATH  Google Scholar 

  13. Bidoit, M., Hennicker, R., Wirsing, M.: Behavioural and abstractor specifications. Science of Computer Programming 25(2-3), 149–186 (1995)

    Article  MathSciNet  MATH  Google Scholar 

  14. Bidoit, M., Mosses, P.D.: CASL user manual. LNCS, vol. 2900. Springer, Heidelberg (1998)

    Google Scholar 

  15. Bougé, L.: Modélisation de la notion de test de programmes, application à la production de jeux de test. Ph. D. thesis, Université de Paris 6 (1982)

    Google Scholar 

  16. Bougé, L., Choquet, N., Fribourg, L., Gaudel, M.-C.: Test set generation from algebraic specifications using logic programming. Journal of Systems and Software 6(4), 343–360 (1986)

    Article  Google Scholar 

  17. Brinksma, E., Tretmans, J.: Testing transition systems: An annotated bibliography. In: Cassez, F., Jard, C., Rozoy, B., Dermot, M. (eds.) MOVEP 2000. LNCS, vol. 2067, pp. 187–195. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  18. Brucker, A.D., Wolff, B.: Symbolic test case generation for primitive recursive functions. In: Grabowski, J., Nielsen, B. (eds.) FATES 2004. LNCS, vol. 3395, pp. 16–32. Springer, Heidelberg (2005)

    Google Scholar 

  19. Burstall, R.M., Darlington, J.: A transformation system for developing recursive programs. Journal of the Association for Computing Machinery 24(1), 44–67 (1977)

    MathSciNet  MATH  Google Scholar 

  20. Chen, H.Y., Tse, T.H., Chan, F.T., Chen, T.Y.: In black and white: an integrated approach to class-level testing of object-oriented programs. ACM transactions on Software Engineering and Methodology 7(3), 250–295 (1998)

    Article  Google Scholar 

  21. Chen, H.Y., Tse, T.H., Chan, F.T., Chen, T.Y.: In black and white: an integrated approach to class-level testing of object-oriented programs. ACM transactions on Software Engineering and Methodology 7(3), 250–295 (1998)

    Article  Google Scholar 

  22. Chen, H.Y., Tse, T.H., Chen, T.Y.: TACCLE: A methodology for object-oriented software testing at the class and cluster levels. ACM Transactions on Software Engineering and Methodology 10(1), 56–109 (2001)

    Article  Google Scholar 

  23. Chow, T.S.: Testing software design modeled by finite-state machines. IEEE Transactions on Software Engineering SE-4(3), 178–187 (1978)

    Article  Google Scholar 

  24. Claessen, K., Hughes, J.: Quickcheck: A lightweight tool for random testing of haskell programs. In: International Conference on Functional Programming, pp. 268–279 (2000)

    Google Scholar 

  25. Dan, L., Aichernig, B.K.: Combining algebraic and model-based test case generation. In: ICTAC 2004 (2004)

    Google Scholar 

  26. Dauchy, P., Gaudel, M.-C., Marre, B.: Using algebraic specifications in software testing: A case study on the software of an automatic subway. Journal of Systems and Software 21(3), 229–244 (1993)

    Article  Google Scholar 

  27. Dauchy, P., Ozello, P.: Experiments with formal specifications on MAGGALY. In: Second International Conference on Applications of Advanced Technologies in Transportation Engineering, Mineapolis (1991)

    Google Scholar 

  28. Dick, J., Faivre, A.: Automating the generation and sequencing of test cases from model-based specifications. In: Formal Methods Europe 1993. LNCS, vol. 670, pp. 268–284. Springer, Heidelberg (1993)

    Google Scholar 

  29. Doche, M., Seguin, C., Wiels, V.: A modular approach to specify and test an electrical flight control system. In: FMICS-4 (1999)

    Google Scholar 

  30. Doche, M., Wiels, V.: Extended institutions for testing. In: Rus, T. (ed.) AMAST 2000. LNCS, vol. 1816, pp. 514–528. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  31. Dong, R.K., Frankl, Ph.G.: The ASTOOT approach to testing object-oriented programs. ACM Transactions on Software Engineering and Methodology 3(2), 103–130 (1994)

    Google Scholar 

  32. Dybjer, P., Haiyan, Q., Takeyama, M.: Combining testing and proving in dependent type theory. In: Basin, D., Wolff, B. (eds.) TPHOLs 2003. LNCS, vol. 2758, pp. 188–203. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  33. Gannon, J., McMullin, P., Hamlet, R.: Data abstraction implementation, specification and testing. ACM Transactions on Programming Languages and Systems 3(3), 211–223 (1981)

    Article  Google Scholar 

  34. Gaudel, M.-C., James, P.J.: Testing algebraic data types and processes: A unifying theory. Formal Aspects of Computing 10(5-6), 436–451 (1998)

    Article  MATH  Google Scholar 

  35. Goguen, J.A., Thatcher, J.W., Wagner, E.G.: An initial algebra approach to the specification, correctness and implementation of abstract data types. In: Current Trends in Programming Methodology IV: Data structuring, pp. 80–144. Prentice Hall, Englewood Cliffs (1978)

    Google Scholar 

  36. Goodenough, J.B., Gerhart, S.: Toward a theory of test data selection. IEEE Transactions on Software Engineering SE-1(2), 156–173 (1975)

    MathSciNet  Google Scholar 

  37. Guttag, J.V., Horning, J.J.: The algebraic specification of abstract data types. Acta Informatica 10(1), 27–52 (1978)

    Article  MathSciNet  MATH  Google Scholar 

  38. Halbwachs, N., Caspi, P., Raymond, P., Pilaud, D.: The synchronous data-flow programming language LUSTRE. Proceedings of the IEEE 79(9), 1305–1320 (1991)

    Article  Google Scholar 

  39. Hennicker, R.: Context induction: a proof principle for behavioural abstractions and algebraic implementations. Formal Aspects of Computing 3(4), 326–345 (1991)

    Article  MATH  Google Scholar 

  40. Hierons, R.M.: Comparing test sets and criteria in the presence of test hypotheses and fault domains. ACM Trans. Softw. Eng. Methodol. 11(4), 427–448 (2002)

    Article  Google Scholar 

  41. James, P.R., Endler, M., Gaudel, M.-C.: Development of an atomic broadcast protocol using LOTOS. Software Practice and Experience 29(8), 699–719 (1999)

    Article  Google Scholar 

  42. Le Gall, P.: Les algèbres étiquetées : une sémantique pour les spécifications algébriques fondée sur une utilisation systématique des termes. Application au test de logiciel avec traitement d’exceptions. PhD thesis, Université de Paris XI, Orsay (1993)

    Google Scholar 

  43. Le Gall, P., Arnould, A.: Formal specification and test: correctness and oracle. In: 11th WADT joint with the 9th general COMPASS workshop, Oslo, Norway. LNCS, vol. 1130, pp. 342–358. Springer, Heidelberg (1996)

    Google Scholar 

  44. Lee, D., Yannakakis, M.: Principles and methods of testing finite state machines - A survey. Proceedings of the IEEE 84, 1090–1126 (1996)

    Article  Google Scholar 

  45. Machado, P.: On oracles for interpreting test results against algebraic specifications. In: Haeberer, A.M. (ed.) AMAST 1998. LNCS, vol. 1548, Springer, Heidelberg (1998)

    Google Scholar 

  46. Machado, P.: Testing from structured algebraic specifications. In: Rus, T. (ed.) AMAST 2000. LNCS, vol. 1816, pp. 529–544. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  47. Machado, P., Sannella, D.: Unit testing for CASL architectural specifications. In: Diks, K., Rytter, W. (eds.) MFCS 2002. LNCS, vol. 2420, pp. 506–518. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  48. Marre, B.: Toward an automatic test data set selection using algebraic specifications and logic programming. In: Furukawa, K. (ed.) Eight International Conference on Logic Programming (ICLP 1991), pp. 25–28. MIT Press, Cambridge (1991)

    Google Scholar 

  49. Marre, B.: Loft: a tool for assisting selection of test data sets from algebraic specifications. In: Mosses, P.D., Schwartzbach, M.I., Nielsen, M. (eds.) CAAP 1995, FASE 1995, and TAPSOFT 1995. LNCS, vol. 915, pp. 799–800. Springer, Heidelberg (1995)

    Google Scholar 

  50. Marre, B., Arnold, A., Gaudel, M.C.: Validation d’une spécification par des formalismes différents: le noeud de transit. Revue Technique et Science Informatiques 16(6), 677–699 (1997)

    Google Scholar 

  51. Marre, B., Arnould, A.: Test sequences generation from LUSTRE descriptions: GATEL. In: 15h I.E.E.E. International Conference on Automated Software Engineering, pp. 229–237 (2000)

    Google Scholar 

  52. Marre, B., Blanc, B.: Test selection strategies for lustre descriptions in gatel. In: MBT 2004 joint to ETAPS 2004. ENTCS, vol. 111, pp. 93–111 (2004)

    Google Scholar 

  53. Marre, B., Thévenod-Fosse, P., Waeselink, H., Le Gall, P., Crouzet, Y.: An experimental evaluation of formal testing and statistical testing. In: SAFECOMP 1992, pp. 311–316 (1992)

    Google Scholar 

  54. Orejas, F., Navarro, M., Sanchez, A.: Implementation and behavioural equivalence: A survey. In: Bidoit, M., Choppy, C. (eds.) Abstract Data Types 1991 and COMPASS 1991. LNCS, vol. 655, pp. 144–163. Springer, Heidelberg (1993)

    Google Scholar 

  55. Péraire, C., Barbey, S., Buchs, D.: Test selection for object-oriented software based on formal specifications. In: IFIP Working Conference on Programming Concepts and Methods (PROCOMET 1998), Shelter Island, New York, USA, June 1998, pp. 385–403. Chapman Hall, Boca Raton (1998)

    Google Scholar 

  56. Tse, T.H., Lau, F.C.M., Chan, W.K., Liu, P.C.K., Luk, C.K.F.: Testing object-oriented industrial software without precise oracles or results. Communications of the ACM (accepted, 2006)

    Google Scholar 

  57. Wirsing, M.: Handbook of Theoretical Computer Science. In: Formal models and semantics, chapter Algebraic Specification, vol. B, Elsevier, Amsterdam (1990)

    Google Scholar 

  58. Zhu, H.: A note on test oracles and semantics of algebraic specifications. In: QSIC 2003, pp. 91–99. IEEE Computer Society, Los Alamitos (2003)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Robert M. Hierons Jonathan P. Bowen Mark Harman

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this chapter

Cite this chapter

Gaudel, MC., Le Gall, P. (2008). Testing Data Types Implementations from Algebraic Specifications. In: Hierons, R.M., Bowen, J.P., Harman, M. (eds) Formal Methods and Testing. Lecture Notes in Computer Science, vol 4949. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-78917-8_7

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-78917-8_7

  • Publisher Name: Springer, Berlin, Heidelberg

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

  • Online ISBN: 978-3-540-78917-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics