Browse Prior Art Database

Checking the Execution of Programs by Hashing

IP.com Disclosure Number: IPCOM000078286D
Original Publication Date: 1972-Dec-01
Included in the Prior Art Database: 2005-Feb-25
Document File: 1 page(s) / 12K

Publishing Venue

IBM

Related People

Healey, MJ: AUTHOR

Abstract

This technique is applicable wherever it is necessary to be sure that the execution of a program with a particular set of input data, is unaffected by a program change not concerned with the set of input data. Typical examples are test cases used to test compilers or any large user program with varied input. After some small enhancement or correction has been made to the compiler, it is desirable to be satisfied that there are no unexpected side effects. The test cases must be seen to behave in the same way throughout their execution.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 77% of the total text.

Page 1 of 1

Checking the Execution of Programs by Hashing

This technique is applicable wherever it is necessary to be sure that the execution of a program with a particular set of input data, is unaffected by a program change not concerned with the set of input data. Typical examples are test cases used to test compilers or any large user program with varied input. After some small enhancement or correction has been made to the compiler, it is desirable to be satisfied that there are no unexpected side effects. The test cases must be seen to behave in the same way throughout their execution.

To verify that a program performs exactly as on a previous occasion, a routine called HASH is called at very frequent points in the program. This concatenates all suitable variables in existence at the time, as a string of characters. That string of characters is then hashed, using one of the standard hashing techniques. The resulting hash value, which might be a ten-digit number, represents the state of the program at that time. On future runs, if HASH yields the same result at the same point, it is reasonably certain that the program has behaved in the same way.

A suitable standard hashing method on IBM System 360/370 machines is to break the string resulting from concatenation into fullwords (signed 31-digit binary numbers) and sum these, ignoring overflow. This method takes into account all of the string, is reasonably fast, and gives a compact and reliable result. The user may desig...