Test frame updating in CPM testing of Prolog programs

Category Partition Method (CPM) is a general approach to specification-based program testing, where test frame reduction and refinement are two important issues. Test frame reduction is necessary since too many test frames may be produced, and test frame refinement is important since during CPM testing new information about test frame generation may be achieved and considered incrementally. Besides the information provided by testers or users, implementation related knowledge offers alternative information for reducing and refining CPM test frames. This paper explores the idea by proposing a call patterns semantics based test frame updating method for Prolog programs, in which a call patterns analysis is used to collect information about the way in which procedures are used in a program. The updated test frames will be represented as constraints. The effect of our test frame updating is two-fold. On one hand, it removes “uncared” data from the original set of test frames; on the other hand, it refines the test frames to which we should pay more attention. The first effect makes the input domain on which a procedure must be tested a subset of the procedure’s input domain, and the latter makes testers stand more chance to find out the faults that are more likely to show their presence in the use of the program under consideration. Our test frame updating method preserves the effectiveness of CPM testing with respect to the detection of faults we care. The test case generation from the updated set of test frames is also discussed. In order to show the applicability of our method an approximation call patterns semantics is proposed, and the test frame updating on the semantics is illustrated by an example.

[1]  Patrick Cousot,et al.  Comparing the Galois Connection and Widening/Narrowing Approaches to Abstract Interpretation , 1992, PLILP.

[2]  Thomas J. Ostrand,et al.  Automatic Generation of Test Scripts from Formal Test Specifications , 1989, Symposium on Testing, Analysis, and Verification.

[3]  Michael Codish,et al.  Bottum-up abstract interpretation of logic programs , 1992 .

[4]  Alain Colmerauer,et al.  An introduction to Prolog III , 1989, CACM.

[5]  Ron Patton Software Testing (2nd Edition) , 2005 .

[6]  Maurizio Gabbrielli,et al.  Observable Behaviors and Equivalences of Logic Programs , 1995, Inf. Comput..

[7]  David A. Carrington,et al.  A Framework for Specification-Based Testing , 1996, IEEE Trans. Software Eng..

[8]  J. Christian Wild,et al.  A knowledge base for software test refinement , 1993, Proceedings of 8th Knowledge-Based Software Engineering Conference.

[9]  Tibor Gyimóthy,et al.  Interactive Diagnosis and Testing of Logic Programs , 2008 .

[10]  Kim Marriott,et al.  Precise and efficient groundness analysis for logic programs , 1993, LOPL.

[11]  Paul Ammann,et al.  Using Z specifications in category partition testing , 1992, COMPASS `92 Proceedings of the Seventh Annual Conference on Computer Assurance.

[12]  Gregor von Bochmann,et al.  Control-flow based testing of Prolog programs , 1992, [1992] Proceedings Third International Symposium on Software Reliability Engineering.

[13]  Fausto Spoto,et al.  Operational and Goal-Independent Denotational Semantics for Prolog with Cut , 2000, J. Log. Program..

[14]  Paul Ammann,et al.  Using formal methods to derive test frames in category-partition testing , 1994, Proceedings of COMPASS'94 - 1994 IEEE 9th Annual Conference on Computer Assurance.

[15]  Tianlong Gu,et al.  On the New Application of Call Patterns to CPM Testing of Prolog Programs , 2006, Australian Conference on Artificial Intelligence.

[16]  Tianlong Gu,et al.  A Novel Test Case Generation Method for Prolog Programs Based on Call Patterns Semantics , 2007, APLAS.

[17]  Ehud Y. Shapiro,et al.  Algorithmic program diagnosis , 1982, POPL '82.

[18]  Qian Junyan,et al.  Goal-independent Semantics for Path Dependent Analysis of Prolog Programs , 2007 .

[19]  Fevzi Belli,et al.  A test coverage notion for logic programming , 1995, Proceedings of Sixth International Symposium on Software Reliability Engineering. ISSRE'95.

[20]  Maurizio Gabbrielli,et al.  Goal independency and call patterns in the analysis of logic programs , 1994, SAC '94.

[21]  Paolo Volpe,et al.  A first-order language for expressing sharing and type properties of logic programs , 2001, Sci. Comput. Program..

[22]  A. J. Offutt,et al.  Testing object-oriented software using the category-partition method , 1995 .

[23]  Michael J. Maher,et al.  Constraint Logic Programming: A Survey , 1994, J. Log. Program..

[24]  Fevzi Belli,et al.  Implementation-based analysis and testing of Prolog programs , 1993, ISSTA '93.

[25]  Ron Patton,et al.  Software Testing , 2000 .

[26]  Junyan Qian,et al.  Goal-independent Semantics for Path Dependent Analysis of Prolog Programs , 2007, First Joint IEEE/IFIP Symposium on Theoretical Aspects of Software Engineering (TASE '07).

[27]  Jacob M. Howe,et al.  Efficient Groundness Analysis in Prolog , 2003, Theory Pract. Log. Program..

[28]  Maurizio Gabbrielli,et al.  Fixpoint Semantics for Partial Computed Answer Substitutions and Call Patterns , 1992, ALP.

[29]  Patrick Cousot,et al.  Abstract Interpretation and Application to Logic Programs , 1992, J. Log. Program..

[30]  Giorgio Levi,et al.  Accurate Analysis of Prolog with cut , 1996, APPIA-GULP-PRODE.

[31]  Tianlong Gu,et al.  Designing prolog semantics for a class of observables , 2006 .

[32]  Tsong Yueh Chen,et al.  A Choice Relation Framework for Supporting Category-Partition Test Case Generation , 2003, IEEE Trans. Software Eng..

[33]  Marc J. Balcer,et al.  The category-partition method for specifying and generating fuctional tests , 1988, CACM.

[34]  Pascal Van Hentenryck,et al.  The Constraint Logic Programming Language CHIP , 1988, FGCS.

[35]  Fevzi Belli,et al.  Declarative paradigm of test coverage , 1998, Softw. Test. Verification Reliab..

[36]  Roberto Barbuti,et al.  A general framework for semantics-based bottom-up abstract interpretation of logic programs , 1993, TOPL.

[37]  Giorgio Levi,et al.  Abstract Interpretation of Prolog Programs , 1999, AMAST.