Essex logo VASE logo

HATE: Interfacing Programs to HATE

A program is interfaced to HATE by means of an interface procedure. By default, HATE expects the interface procedure to be found in a file called interface.tcl in the current directory; a different file may be specified via the -interface command-line qualifier.

Within the file there should be a single Tcl procedure called HATE_Interface. This should take a single argument, the input to be passed to the program. It should return to the calling Tcl procedure the result of applying the supplied input to the program under test. An example of an interface procedure, which interfaces to an external program called myproc, is:

proc HATE_Interface input {
    return [eval exec myprog [concat $input]]

When HATE starts running, the file containing the interface procedure is loaded into HATE; each test that is carried out results in HATE_Interface being invoked.