A programming-language construct called a program history, and a method,
system, apparatus, and data structure for translating computer source
code that contains the program history construct. A program history
captures data regarding the state of the program as it executes and makes
this data available to functions called history operators, which operate
on the data. The source code contains a history operand, an instance of
the history operand, and the history operator. The presence of the
history operand directs a translator to cause history data to be saved
regarding the sequence of data that is associated with the operand
instance as the program executes. The presence of the history operator
directs the translator to cause a function to be performed that saves
history data. In this way, the programmer is freed from writing tedious
and error-prone bookkeeping code that declares variables and saves
history data into those declared variables.