A novel test case generation method for prolog programs based on call patterns semantics

  • Authors:
  • Lingzhong Zhao;Tianlong Gu;Junyan Qian;Guoyong Cai

  • Affiliations:
  • School of Computer and Control, Guilin University of Electronic Technology, Guilin, China and Electronic Engineering School, Xidian University, Xi'an, China;School of Computer and Control, Guilin University of Electronic Technology, Guilin, China;School of Computer and Control, Guilin University of Electronic Technology, Guilin, China;School of Computer and Control, Guilin University of Electronic Technology, Guilin, China

  • Venue:
  • APLAS'07 Proceedings of the 5th Asian conference on Programming languages and systems
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

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.