Translating Object-Z specifications to passive test oracles

A test oracle provides a means for determining whether an implementation functions according to its specification. A passive test oracle checks the behaviour of the implementation, but does not attempt to reproduce this behaviour. The paper describes the translation of formal specifications of container classes to passive test oracles. Specifically, we use Object-Z for specifications and C++ for oracles. We discuss several practical issues for the use of formal specifications in test oracle generation. We then present the translation process and illustrate it with an example based on an integer set class. Our approach is illustrated with an example based on an integer set class.

[1]  Leesa Murray,et al.  Extending test templates with inheritance , 1997, Proceedings of Australian Software Engineering Conference ASWEC 97.

[2]  David Lorge Parnas,et al.  Using Test Oracles Generated from Program Documentation , 1998, IEEE Trans. Software Eng..

[3]  Daniel Hoffman,et al.  ClassBench: A Methodology and Framework for Automated Class Testing , 1996 .

[4]  Bjarne Stroustrup,et al.  The C++ Programming Language, First Edition , 1986 .

[5]  Sergio Antoy,et al.  Using Term Rewriting to Verify Software , 1994, IEEE Trans. Software Eng..

[6]  Bjarne Stroustrup,et al.  C++ Programming Language , 1986, IEEE Softw..

[7]  Daniel Hoffman,et al.  ClassBench: a framework for automated class testing , 1997 .

[8]  Roger Duke,et al.  Object-Z: a specification language advocated for the description of standards , 1995 .

[9]  G.-H. Bagherzadeh Rafsanjani,et al.  From Object-Z to C++: A Structural Mapping , 1992, Z User Workshop.

[10]  Roger Duke,et al.  Formal Object Oriented Specification Using Object-Z , 2000 .

[11]  Daniel Hoffman,et al.  The Testgraph Methodology: Automated Testing of Collection Classes , 1995, J. Object Oriented Program..

[12]  Leesa Murray,et al.  Translating Object-Z specifications to object-oriented test oracles , 1997, Proceedings of Joint 4th International Computer Science Conference and 4th Asia Pacific Software Engineering Conference.

[13]  深川 雅和,et al.  A Mapping System from Object-Z to C++ , 1994 .

[14]  Gordon A. Rose,et al.  Guidelines for the manual conversion of Object-Z to C , 1993 .

[15]  Bertrand Meyer,et al.  Eiffel: The Language , 1991 .

[16]  David A. Duce,et al.  Specifying the PREMO Synchronization Objects , 1997 .

[17]  Hans-Martin Hörcher,et al.  Improving Software Tests Using Z Specifications , 1995, ZUM.

[18]  Daniel Hoffman,et al.  Automated Module Testing in Prolog , 1991, IEEE Trans. Software Eng..

[19]  Leesa Murray,et al.  Formal Derivation of Finite State Machines for Class Testing , 1998, ZUM.

[20]  Erich Mikk,et al.  Compilation of Z Specifications into C for Automatic Test Result Evaluation , 1995, ZUM.