| | |
Summary: IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, VOL. 26, NO. 1, JANUARY 2000, PP. 55{69
Automatically Checking an Implementation
against Its Formal Specication
Sergio Antoy Dick Hamlet y
Portland State University
Department of Computer Science
and
Center for Software Quality Research
Portland, OR 97207
January 27, 1999
Abstract
We propose to check the execution of an abstract data type's imperative implemen-
tation against its algebraic specication. An explicit mapping from implementation
states to abstract values is added to the imperative code. The form of specication
allows mechanical checking of desirable properties such as consistency and com-
pleteness, particularly when operations are added incrementally to the data type.
During unit testing, the specication serves as a test oracle. Any variance between
computed and specied values is automatically detected. When the module is made
part of some application, the checking can be removed, or may remain in place for
further validating the implementation. The specication, executed by rewriting, can
|