## 4 Fault Localization Method
### Fault Localization by Fault Suspiciousness  
The FS (\(FS_{j}\)) of each partition (\(PT_{j}\)) is calculated by applying the memory update information to the partitioned memory information. FS is a numerical value obtained by determining the non-executing region of the updated partitions (\(FS_{k,j}\)) in each frame, and by applying a weight to the number of determined times (\(NFSP_{j}\)) in an entire frame based on their relevance to the input. The terms used to calculate FS are as follows. Terms \(F_{k}\) and \(U_{a,k}\) used in (5) are defined by (2) and (3) in Section 3.3. As described there, \(IDUR\) defined in (8) is the range in which the number of update addresses increases while the output changes according to the input. Like (9), FS is calculated by the ratio between the numbers of frames determined as FS partitions in all frames and in IDUR, respectively. This is because FS is calculated based on the number of times an FS partition is determined and the correlation between the input and the update information. The algorithm calculating FS on the basis of such defined terms is shown in Figure 11.  
Figure 11: Algorithm for fault localization by fault suspiciousness (FS).  
Figure 10: Algorithm for partitioning the data section by the stack.  
\[\text{Partition }\left(PT_{j}\right)\equiv f^{th}\text{ memory region partitioned by the memory map and the stack} \tag{4}\]  
\[\text{Update Count }\left(UC_{k,j}\right)\text{ }\equiv\text{number of }U_{ak}\text{ in }PT_{j}\text{ for }F_{k} \tag{5}\]  
\[\text{Fault }-\text{suspicious Partition }\left(FSP_{k,j}\right)\equiv\{\left(PT_{j}, \ UC_{k,j}\right)\Big{|}0<UC_{k,j}<AVG_{k}; \tag{6}\]  
\[AVG_{k}=\frac{\sum\#\text{ of updated addresses in }F_{k}}{\#\text{ of partitions in }F_{k}}\} \tag{7}\]  
Number of Fault - suspicious Partitions \(\left(NFSP_{j}\right)\equiv\text{ number of frames }PT_{j}\text{ determined as }FSP\) (7)  
\[\text{Input }-\text{driven Update Range }\left(IDUR\right)\equiv\text{ the range of the number of update addresses} \tag{8}\]  
while the output is changed according to the input  
\[\text{Fault Suspiciousness }\left(FS_{j}\right)\text{ }\equiv\text{ }\frac{NFSP_{j}\text{ in }IDUR}{\text{ The number of }f\text{ frames in }IDUR}\div\frac{NFSP_{j}\text{ in all frames}}{\text{ The total number of }f\text{ frames}} \tag{9}\]  
Firstly, the number of update addresses (\(UC_{k,j}\)) in each partition is calculated in each frame. Next, FS partitions are determined based on the number of update addresses in each partition. As in Figure 12, partitions are classified into executing regions (\(UC_{k}\geq AVG_{k}\)), non-executing regions (\(UC_{k}=0\)), and FS partitions (\(FSP_{k,j}\), \(0<UC_{k}<AVG_{k}\)) based on the average number of update addresses (\(AVG_{k}\)) in each frame.  
FS partitions are determined in each frame based on these criteria, and the number of frames (\(NFSP_{j}\)) determined as having FS partitions is calculated. Finally, FS (\(FS_{j}\)) is calculated by using \(NFSP_{j}\) and the number of frames (\(NFSP_{j}^{IDUR}\)) determined as having FS partitions in IDUR based on the accumulated number of frames (Figure 11, lines 14-16). The equation for calculating the fault suspiciousness is implemented in Figure 11, line 15. In other words, by calculating a ratio determined by FS partitions in all frames and one determined by such partitions in IDUR, the ratio of the latter to the former is used as the FS. This ratio can be used for FS because the more frames that are determined as having FS partitions in IDUR (which is highly relevant to the input during the entire execution time), the more addresses that are associated with faults. In other words, this process calculates relevance to input. Finally, the FS ranking of partitions is determined on the basis of the FS of each partition.