Title :
Queue-based cost evaluation of mental simulation process in program comprehension
Author :
Nakamura, Masahide ; Monden, Akito ; Itoh, Tomoaki ; Matsumoto, Ken-ichi ; Kanzaki, Yuichiro ; Satoh, Hirotsugu
Author_Institution :
Graduate Sch. of Inf. Sci., Nara Inst. of Sci. & Technol., Japan
Abstract :
We present a method to estimate the cost of mental (hand) simulation of programs. In mental simulation, human short term memory is extensively used to recall and memorize values of variables. When the simulation reaches a variable reference, the simulation can be performed easily if the value is still remembered. However, if not, we have to backtrack the simulation until the value is obtained, which is time consuming. Taking the above observation into consideration, we first present a model, called virtual mental simulation model (VMSM), which exploits a queue representing short term memory. The VMSM takes one of the abstract processes recall or backtrack, depending on whether the variable is currently stored in the queue or not. Then, applying cost functions to the VMSM, we derive four dynamic metrics reflecting the cost of mental simulation. In our empirical study, the proposed VMSM metrics reveal that the backtrack process for nonconstant variables gives a significant impact on the cost of mental simulation. Since the proposed method can be fully automated, it can provide a practical means to estimate the cost of mental simulation, which can be also used as a program comprehension measure.
Keywords :
backtracking; reverse engineering; software metrics; backtrack process; dynamic metrics; human short-term memory; mental program simulation; program comprehension; queue-based cost evaluation; recall process; virtual mental simulation model; Computational modeling; Computer crime; Computer hacking; Computer simulation; Cost function; Debugging; Humans; Information science; Programming profession; Protection;
Conference_Titel :
Software Metrics Symposium, 2003. Proceedings. Ninth International
Print_ISBN :
0-7695-1987-3
DOI :
10.1109/METRIC.2003.1232480