Skip to main content

A Novel Test Case Generation Method for Prolog Programs Based on Call Patterns Semantics

  • Conference paper
Programming Languages and Systems (APLAS 2007)

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

Included in the following conference series:

Abstract

A natural way to generate test cases for a Prolog program is to view the call patterns of the procedures in the program as an implicit representation of the control flow graph (CFG) of the program. This paper explores the idea by proposing a call patterns-based test case generation method, where a set of call patterns or computed answers is used to describe the paths in a CFG. With a constraint-based call patterns semantics, this method is formalized. Through the use of a proper constraints solver, we can generate test cases automatically from the sets of constraints. This method can be based on any approximation of the call patterns semantics. So compared with traditional CFG-based test case generation, the method is more flexible and can be easily adapted to meet the requirements of a tester expressed by the approximation of the call patterns semantics we use.

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. Belli, F., Jack, O.: Implementation-based Analysis and Testing of Prolog Programs. In: Proceedings of the 1993 ACM SIGSOFT International Symposium on Software Testing and Analysis, pp. 70–80 (1993)

    Google Scholar 

  2. Belli, F., Jack, O.: PROTest II, Testing Logic Programs, Technical report, 1992/13, ADT (October 1992)

    Google Scholar 

  3. Chen, T.Y., Poon, P.-L., Tse, T.H.: A Choice Relation Framework for Supporting Category-Partition Test Case Generation. IEEE Transactions on Software Engineering 29(7), 577–593 (2003)

    Article  Google Scholar 

  4. Colmerauer, A.: An Introduction to PROLOG-III. Communications of the ACM 33(7), 69–90 (1990)

    Article  Google Scholar 

  5. Comini, M., Levi, G., Vitiello, G.: Abstract Debugging of Logic Program. In: META, pp. 440–450 (1994)

    Google Scholar 

  6. Comini, M., Levi, G., Vitiello, G.: Efficient Detection of Incompleteness Errors in the Abstract Debugging of Logic Programs. In: Proceedings of AADEBUG 1995, pp. 159–174 (1995)

    Google Scholar 

  7. Cousot, P., Cousot, R.: Abstract Interpretation and Applications to Logic Programs. Journal of Logic Programming 13(23), 103–179 (1992)

    Article  MATH  MathSciNet  Google Scholar 

  8. Cousot, P., Cousot, R.: Comparing the Galois connection and widening/narrowing approaches to abstract interpretation. In: Bruynooghe, M., Wirsing, M. (eds.) PLILP 1992. LNCS, vol. 631, pp. 269–295. Springer, Heidelberg (1992)

    Chapter  Google Scholar 

  9. Dershowitz, N., Lee, Y.: Deductive Debugging. In: Proceedings of the Fourth IEEE Symposium on Logic Programming, pp. 298–306 (1987)

    Google Scholar 

  10. Dincbas, M., Van Hentenryck, P., Simonis, H., Aggoun, A.: The Constraint Logic Programming Language CHIP. In: Proceedings of the International Conference on Fifth Generation Computer Systems, pp. 693–702 (1988)

    Google Scholar 

  11. Hermenegildo, M., Puebla, G., Bueno, F., López-García, P.: Integrated Program Debugging, Verification, and Optimization Using Abstract Interpretation (and the Ciao system preprocessor). Science of Computer Programming. 58(1-2), 115–140 (2005)

    Article  MATH  MathSciNet  Google Scholar 

  12. Horváth, T., Gyimóthy, T., Alexin, Z., Kocsis, F.: Interactive Diagnosis and Testing of Logic Programs. In: Proceedings of the Third Finnish-Estonian-Hungarian Symposium on Programming Languages and Software Tools Kääriku, Estonia, pp. 34–46 (1993)

    Google Scholar 

  13. Jaffar, J., Maher, M.J.: Constraint Logic Programming: A survey. Journal of Logic Programming 19–20, 503–581 (1994)

    Google Scholar 

  14. Kókai, G., Harmath, L., Gyimóthy, T.: IDTS: a Tool for Debugging and Testing of Prolog Programs. In: Proceedings of LIRA 1997, The 8th Conference on Logic and Computer Science, Novi Sad, Yugoslavia, September 1-4, 1997 pp. 103–110 (1997)

    Google Scholar 

  15. Levi, G., Spoto, F.: Accurate Analysis of Prolog with Cut. In: Lucio, P., Martelli, M., Navarro, M. (eds.) Proceedings APPIA-GULP-PRODE 1996, pp. 481–492 (1996)

    Google Scholar 

  16. Lu, L., Greenfield, P.: Logic Program Testing Based on Abstract Interpretation. In: Pottosin, I.V., Bjorner, D., Broy, M. (eds.) Formal Methods in Programming and Their Applications. LNCS, vol. 735, pp. 170–180. Springer, Heidelberg (1993)

    Chapter  Google Scholar 

  17. Luo, G., Bochmann, G., Sarikaya, B., Boyer, M.: Control Flow Based Testing of Prolog Programs. In: Proceedings of the 3rd International Symposium on Software Reliability Engineering, pp. 104–113 (1992)

    Google Scholar 

  18. Ostrand, T.J., Balcer, M.J.: The Category-Partition Method for Specifying and Generating Functional Tests. Communications of ACM 31(6), 676–686 (1988)

    Article  Google Scholar 

  19. Shapiro, E.Y.: Algorithmic Program Diagnosis. In: POPL 1982, pp. 299–308 (1982)

    Google Scholar 

  20. Spoto, F.: Operational and Goal-independent Denotational Semantics for Prolog with Cut. The Journal of Logic Programming 42, 1–46 (2000)

    Article  MATH  MathSciNet  Google Scholar 

  21. Spoto, F., Levi, G.: Abstract Interpretation of Prolog Programs. In: Haeberer, A.M. (ed.) AMAST 1998. LNCS, vol. 1548, pp. 455–470. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  22. Yan, S.Y.: Declarative Testing in Logic Programming. In: Proceedings of the Third Australian Software Engineering Conference, pp. 423–435 (1987)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Zhong Shao

Rights and permissions

Reprints and permissions

Copyright information

© 2007 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Zhao, L., Gu, T., Qian, J., Cai, G. (2007). A Novel Test Case Generation Method for Prolog Programs Based on Call Patterns Semantics. In: Shao, Z. (eds) Programming Languages and Systems. APLAS 2007. Lecture Notes in Computer Science, vol 4807. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-76637-7_8

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-76637-7_8

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-76636-0

  • Online ISBN: 978-3-540-76637-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics