Journal of the Association for Computing Machinery, Vol. 42, No. 1, January 1995, pp. 269–291.

Designing Programs that Check Their Work

MANUEL BLUM

AND

SAMPATH KANNAN

Abstract. A program correctness checker is an algorithm for checking the output of a computation. That is, given a program and an instance on which the program is run, the checker certifies whether the output of the program on that instance is correct. This paper defines the concept of a program checker. It designs program checkers for a few specific and carefully chosen problems in the class FP of functions computable in polynomial time. Problems in FP for which checkers are presented in this paper include Sorting, Matrix Rank and GCD. It also applies methods of modern cryptography, especially the idea of a probabilistic interactive proof, to the design of program checkers for group theoretic computations.

Two structural theorems are proven here. One is a characterization of problems that can be checked. The other theorem establishes equivalence classes of problems such that whenever one problem in a class is checkable, all problems in the class are checkable.

Categories and Subject Descriptors. D.2.4[correctness proofs; reliability]; F.2.0; F.3.1; G.3[probabilistic algorithms (including Monte Carlo)]

General Terms. Algorithms, Design, Reliability, Theory, Verification

Additional Key words and Phrases. Interactive proofs, probabilistic algorithms, program checking, program verification, testing

Copyright 1995 by ACM, Inc. Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or direct commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from Publications Dept, ACM Inc., fax +1 (212) 869-0481, or permissions@acm.org.