Advertisement

Application of PROLOG to test sets generation from algebraic specifications

  • L. Bougé
  • N. Choquet
  • L. Fribourg
  • M. C. Gaudel
Colloquium On Software Engineering Abstract Data Types In Software Development
Part of the Lecture Notes in Computer Science book series (LNCS, volume 186)

Abstract

We present a method and a tool for generating test sets from algebraic data type specifications. We give formal definitions of the basic concepts required in our approach of functional testing. Then we discuss the problem of testing algebraic data types implementations. This allows the introduction of additional hypotheses and thus the description of an effective method for generating test sets. The method can be improved by using PROLOG. Indeed, it turns out that PROLOG is a very well suited tool for generating test sets in this context. Applicability of the method is discussed and a complete example is given.

Keywords

Logic Programming Testing Process Function Symbol Horn Clause Abstract Data Type 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

References

  1. [ABC 82]
    W.R. Adrion, M.A. Branstad and J.C. Cherniavsky, "Validation, verification and testing of computer software", ACM Comp. Surv. 14, 2 (June 82).Google Scholar
  2. [Bido 81]
    M. Bidoit, "Putting together fair presentations of abstract data types into structured specifications", Rept. No. 15/81, GRECO, France (1981).Google Scholar
  3. [Boug 82]
    L. Bougé, "Modélisation de la notion de test de programme; application à la production de jeux de tests", Thèse de 3ème cycle, Université Paris 6, Paris (Oct. 1982).Google Scholar
  4. [Boug 83]
    L. Bougé, "A proposition for a theory of testing: an abstract approach to the testing process", Rept. No. PB-160, DAIMI, Aarhus University, Denmark (may 83), to appear in Theor. Comp. Science.Google Scholar
  5. [Budd 81]
    T.A. Budd "Mutation analysis: ideas, examples, problems and prospects", in: Computer Program Testing, B. Chandrasekran and S. Radicchi, eds. (North-Holland, 1981) 129–148.Google Scholar
  6. [BA 82]
    T.A. Budd and D. Angluin, "Two notions of correctness and their relation to testing", Acta Informatica 18 (1982) 31–45.Google Scholar
  7. [BDLS 80]
    T.A. Budd, R.A. De Millo, R.J. Lipton and F.G. Sayward, "Theoretical and empirical studies on using program mutation to test the functional correctness of programs", Proc. 7th Ann. ACM Symp. Princ. Prog. Lang., Las Vegas (Jan. 1980) 220–233.Google Scholar
  8. [BH 85]
    B. Biebow and J. Hagelstein, "Algebraic specification of synchronization and errors: a telephonic example", Proc. Coll. Soft. Eng., Berlin (1985), this volume.Google Scholar
  9. [B2G3 84]
    M. Bidoit, B. Biebow, M.C. Gaudel, D. Gresse and G. Guiho, "Exception handling: formal specification and systematic program construction", Proc. Int. Conf. Soft. Eng., Orlando, Florida (1984).Google Scholar
  10. [Clar 77]
    K.L. Clark, "Predicate logic as a computational formalism", Research Rept., Dept. of Computing, Imperial College, London (1977).Google Scholar
  11. [Clar 76]
    L. Clarke, "A system to generate test data and symbollicaly execute programs", IEEE Trans. Soft. Eng. SE-2, 3 (1976) 215–222.Google Scholar
  12. [DJ 84]
    N. Dershowitz and N.A. Josephson, "Logic programming by completion", Proc. 2nd Int. Logic Programming Conf., Uppsala, Sweden (July 1984) 313–320.Google Scholar
  13. [DL 84]
    M. Dincbas and J.P. Le Pape, "Metacontrol in logic programs in METALOG", 5th Generation Conf., Tokyo, Janpan (Nov. 1984).Google Scholar
  14. [Frib 84]
    L. Fribourg, "Oriented equational clauses as a programming language", J. Logic Programming, 2 (Oct. 1984) 165–177.Google Scholar
  15. [Gour 83]
    J.S. Gourlay, "A mathematical framework for the investigation of testing", IEEE trans. Soft. Eng. SE-9, 6 (1983).Google Scholar
  16. [GG 75]
    J.B. Goodenough and S.L. Gerhart, "Toward a theory of test data selection", IEEE Trans. Soft. Eng. SE-1, 2 (1975).Google Scholar
  17. [GH 78]
    J. Guttag and J. Horning, "The algebraic specification of abstract data types", Acta Informatica 10, 1 (1978).Google Scholar
  18. [GM 84]
    J. Goguen and J. Meseguer, "Equality, types, modules and generics for logic programming", Proc. 2nd Int. Logic Programming Conf., Uppsala, Sweden (July 1984) 115–125.Google Scholar
  19. [Haml 75]
    R.G. Hamlet, "Testing programs with finite sets of data", Rept. No. TR-388, U. of Maryland, College Park (August 1975).Google Scholar
  20. [Howd 76]
    W.E. Howden, "Reliability of path analysis strategies", IEEE Trans. Soft. Eng. SE-2, 3 (1976) 208–214.Google Scholar
  21. [Howd 80]
    W.E. Howden, "Functional program testing", IEEE Trans. Soft. Eng. SE-6, 2 (1980) 162–169.Google Scholar
  22. [Howd 82]
    W.E. Howden, "Weak mutation testing and completeness of test sets", IEEE Trans. Soft. Eng. SE-8, 4 (1982) 371–379.Google Scholar
  23. [HS 85]
    J. Hsiang and M. Srivas, "A Prolog environment for developing and reasoning about data types", Proc. Coll. Soft. Eng., Berlin (1985), this volume.Google Scholar
  24. [Komo 80]
    H.J. Komorowski, "Qlog — The software for prolog and logic programming", Proc. of the Logic Programming Workshop, Debrecen, Hungary (1980) 305–320.Google Scholar
  25. [Nais 82]
    L. Naish, "An introduction to MU-PROLOG", Technical Rept., Dept. of Computer Science, U. of Melbourne (1982).Google Scholar
  26. [Paul 83]
    J. Paul, "Approche pour une certification fonctionnelle de systèmes à partir de spécifications externes", Internal rept., CIT, Lannion, France (1983).Google Scholar
  27. [SW 83]
    D. Sanella and M. Wirsing, "A kernel language for algebraic specification and implementation", Proc. Int. Conf. Foundations Computing Theory, Bergholm, Sweden (Aug. 1983).Google Scholar
  28. [WC 80]
    L.J. White, E.J. Cohen, "A domain strategy for computer program testing", IEEE Trans. Soft. Eng. SE-6, 3 (1980) 247–257.Google Scholar
  29. [WHH 80]
    M.R. Woodward, D. Hedley and M.A. Hennel, "Experience with path analysis and testing of programs", IEEE Trans. Soft. Eng. SE-6, 3 (1980) 278–285.Google Scholar
  30. [WPP 83]
    M. Wirsing, P. Pepper, H. Partsch, W. Dosch and M. Broy, "On hierarchies of abstract data types", Acta Informatica 20, 1 (Oct. 1983).Google Scholar
  31. [ZW 81]
    S.H. Zeil, L.J. White, "Sufficient test sets for path analysis testing strategy", Proc. 5th Int. Conf. Soft. Eng., San Diego, Calif. (March 1981) 184–191.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1985

Authors and Affiliations

  • L. Bougé
    • 1
  • N. Choquet
    • 2
  • L. Fribourg
    • 2
  • M. C. Gaudel
    • 3
  1. 1.LITP, Université Paris 7Paris Cedex 05France
  2. 2.Laboratoires de Marcoussis-C.G.E, route de NozayMarcoussisFrance
  3. 3.LRI, Université Paris SudOrsayFrance

Personalised recommendations