Pieces of programs, usually functions or procedures, that provide the correct interface but not the correct implementation of some other piece of program, typically a function or an abstract data structure. A stub makes it possible to test certain aspects of a high-level function or abstract data type without having implemented all of the lower-level functions or abstract data types that it uses. Stubs are necessary when top-down programming is used.