Daistish: Systematic Testing with ADT Axioms
Daistish is a test oracle generator for C++ classes. It is similar
is operating principles to Gannon's DAISTS system.
We will be using Daistish to test our implementations of ADTs
specified with axioms.
C++ programming style
Daistish does not handle the entire C++ language (but it's close).
It does handle a large enough subset to do significant programming,
and certainly large enough to implement the classes we
are specifying as ADTs.
The ommissions are primarily in pointer use.
To wit, you must program your classes in C++ using these restrictions:
- All objects should be pointers, i.e., dynamically allocated.
- This means objects are passed to functions by pointer (like by-reference).
- Separate your classes into header files (with member function
prototypes) and code files with function definitions. This will
make it easier to include member function headers into the tester
itself.
Using Assertions in C++
The contract method of programming that we have been
studying, using pre- and post-conditions, is directly supported
in OOPLs like Eiffel, but not directly in C++. We can use the
"assert" statement to simulate it, but a few carefully thought
out functions can make the support more direct.