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.
Keywords
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.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
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)
Belli, F., Jack, O.: PROTest II, Testing Logic Programs, Technical report, 1992/13, ADT (October 1992)
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)
Colmerauer, A.: An Introduction to PROLOG-III. Communications of the ACM 33(7), 69–90 (1990)
Comini, M., Levi, G., Vitiello, G.: Abstract Debugging of Logic Program. In: META, pp. 440–450 (1994)
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)
Cousot, P., Cousot, R.: Abstract Interpretation and Applications to Logic Programs. Journal of Logic Programming 13(23), 103–179 (1992)
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)
Dershowitz, N., Lee, Y.: Deductive Debugging. In: Proceedings of the Fourth IEEE Symposium on Logic Programming, pp. 298–306 (1987)
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)
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)
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)
Jaffar, J., Maher, M.J.: Constraint Logic Programming: A survey. Journal of Logic Programming 19–20, 503–581 (1994)
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)
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)
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)
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)
Ostrand, T.J., Balcer, M.J.: The Category-Partition Method for Specifying and Generating Functional Tests. Communications of ACM 31(6), 676–686 (1988)
Shapiro, E.Y.: Algorithmic Program Diagnosis. In: POPL 1982, pp. 299–308 (1982)
Spoto, F.: Operational and Goal-independent Denotational Semantics for Prolog with Cut. The Journal of Logic Programming 42, 1–46 (2000)
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)
Yan, S.Y.: Declarative Testing in Logic Programming. In: Proceedings of the Third Australian Software Engineering Conference, pp. 423–435 (1987)
Author information
Authors and Affiliations
Editor information
Rights 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)