A Local Search Approach for Batch Repair With Configuration Neighbor and Sub-Degree in Circuit System

The goal of automated troubleshooting is to diagnose and fix a system by repairing its abnormal behaviors, and this process has wide application. Heuristic search is an efficient way to solve troubleshooting problems, such as the batch repair problem (BRP), and heuristic search aims to minimize the costs of repairing a circuit system. The local search method is an efficient search approach and has very good performance in many areas. The key to this method is the modeling of “neighbor” and the search strategy. This paper proposes a local search approach for batch repair with configuration neighbors and sub-degree (CNASD). First, we define configuration neighbors in the BRP. Second, we propose three strategies to guide the search process, namely, best diagnosis with the highest probability component (BDHC), configuration neighbor with aspiration (CNA) and minimal sub-degree. Experimentally, compared with state-of-the-art batch repair algorithms that use heuristic search, our algorithm performs better in terms of the average / maximum repair cost and average / maximum runtime (decreased by up to one order of magnitude) on ISCAS’85 and ITC’99 systems, which are the standard combinational circuit systems.


I. INTRODUCTION
In general, diagnosing a system refers to identifying the root causes of encountered errors. A diagnostic problem arises when an inconsistency appears between the predicted behavior and observed behavior. Diagnosis algorithms return a set of possible diagnoses. The components with abnormal behavior in a diagnosis can explain the inconsistency. As the system's scale increases, diagnosis problems often become more common, and the maintenance costs potentially increase. Hence, automated diagnosis has been studied for several decades, with a great deal of development and successful applications in circuit diagnosis [1]- [9], spacecraft [10], satellite decision support systems [11], the automotive industry [12], spreadsheets [13] and nonlinear systems [14], [15].
The diagnosis problem also accompanies the emergence of troubleshooting problems. The goal of solving a The associate editor coordinating the review of this manuscript and approving it for publication was Youqing Wang . troubleshooting problem is to incur the minimal cost until the system is fixed. Note that, in this paper, ''repair'' is used for one or more components, and ''fix'' is used for the entire system. Most previous work on troubleshooting assumed that components are repaired one at a time [16]- [19]. When the repair overhead is more expensive than the component repair cost, this approach can be wasteful. It may be more effective to repair more than one component in a single repair action. We call this approach the batch repair problem (BRP). Unlike traditional troubleshooting problems, the costs incurred in the BRP include repair overhead costs and component repair costs. The component repair cost is the cost of the repair of a single component. The repair overhead cost denotes additional repair costs, for example, due to repairing one component at a time in a system with multiple faults. This approach is obviously wasteful in the BRP. Each repair action requires additional costs, i.e., repair overhead costs. However, it is more efficient to repair all faults in a single repair action. Hence, the main problem of the BRP is how to select multiple components for a single repair action. Stern et al. propose wasted cost utility functions [20] to guide this process in circuit systems. The wasted cost includes false positive costs and false negative costs. The false positive costs are the costs that appear when some repaired components are not truly faulty. False negative costs are the overhead costs incurred by the further repair actions. Batch repair algorithms use different utility functions according to the optimistic or pessimistic expected cost of false negatives. Moreover, these algorithms compare the costs with two baseline repair algorithms inspired by previous work on test planning [21], namely, ''Best Diagnosis'' and ''Highest Probability''. These baseline repair algorithms do not consider batch repair. Hence, these algorithms are used to evaluate the feasibility of batch repair algorithms. The ''Best Diagnosis'' repair algorithm chooses to repair a single component according to the most likely diagnosis. The ''Highest Probability'' selects the component to repair that is most likely to be faulty, as computed by the system's health state [22]. The experiments show that batch repair has excellent performance.
Subsequently, Shinitzky et al. [1] propose the enhanced wasted cost utility function and use heuristic search algorithms in a circuit system. The experimental results show that the enhanced wasted cost utility function outperforms previous utility functions from [20]. However, the universal winner does not appear in those heuristic search algorithms.
More importantly, for exploring the search space, Shinitzky et al. [1] and Stern et al. [20] propose a union-based search and a powerset-based search. Union-based search considers the union set of multiple diagnoses, and a powerset-based search considers the union set of multiple components in each search iteration process. In fact, a powerset-based search ignores the reasonability of a diagnosis, i.e., whether the diagnosis can explain the abnormal behavior of the current system. More importantly, the BRP's goal of incurring minimal costs has a critical precondition. That is, the system must have been fixed after the batch repair sequence. Hence, it is not reasonable to only consider the union of the components when minimizing cost. For a union-based search, a redundant component (that is not truly faulty) may exist without being detected due to considering one comprehensive diagnosis at a time. Hence, there is a key problem of how to fix a system sooner with batch repair and subsequently obtain minimal costs.
Previous work indicates that it is difficult to model the BRP as a Markov decision process [1]. As an alternative, the BRP can be modeled as a combinatorial optimization problem, in which the goal is to search for the optimal batch repair action.
Local search is a heuristic algorithm to solve optimization problems. Local search has very good performance in many areas [23]- [31]. As a popular approach to solving NP-hard combinatorial problems, local search is well known for its ability to quickly find a good-quality solution. The main idea of local search is to start with an initial solution and iteratively modify it according to certain heuristics. The key to this is the modeling of neighbors and the heuristics.
In this paper, our first contribution is a local search method for batch repair with configuration neighbors and sub-degree (CNASD). According to the relationship between the current batch repair sequence and the set of diagnoses, we define the configuration neighbor of the current batch repair sequence in the BRP. This approach is helpful for modifying the solution in local search. Our second contribution is a set of three strategies. We propose the strategies of: best diagnosis with the highest probability component (BDHC), configuration neighbor with aspiration (CNA) and minimal sub-degree. In the local search approach, the BDHC strategy is used to obtain the initial batch repair sequence. Then, the CNA and minimal sub-degree strategies are used to modify the sequence (sometimes the BDHC is also used). Our third contribution is a hybrid search space. As we described before, for the search space, the previous approach to batch repair considers either the union of diagnoses or the union of components. Because the precondition of the BRP is that the system must have been fixed, only considering diagnoses or components is not reasonable for obtaining minimal costs. Only considering diagnoses may lead to redundant components in the batch repair sequence. Only considering components ignores the reasonable premise that diagnosis can explain the current abnormal behavior of the system. Specifically, this approach blindly pursues low costs but ignores the precondition of the BRP (the system is fixed). Hence, the three strategies we propose aim to fix the system earlier and then obtain minimal costs using a hybrid search space. We search an entire diagnosis for a batch repair sequence with the BDHC strategy, and we search components with the CNA and minimal sub-degree strategies. We consider the reasonability of diagnosis and the minimization of redundant components.
We demonstrate our local search approach on a combinational Boolean circuit from the standard ISCAS'85 and ITC'99 benchmarks. The results show that with 1-5 faults, we are able to find a lower average / maximum cost incurred before the system is fixed, compared with state-of-the-art batch repair algorithms with heuristic search [1], and we reduce the average / maximum runtime by up to one order of magnitude.
The paper is organized as follows. Section 2 introduces some preliminaries. Section 3 presents three strategies and some notions. Then, we describe the CNASD approach and the details of the main process. Section 4 compares the CNASD approach with state-of-the-art batch repair algorithms with heuristic search [1]. Finally, we conclude the paper in Section 5.

II. PRELIMINARIES
First, we show the whole workflow of the modeldiagnosis-troubleshooting process in Figure 1.
In model-based diagnosis (MBD), a model of the system is first built, namely, a triple SD, Comps, Obs [32], [33]. The system description is denoted as SD, the set of components are denoted as Comps, and a given observation is denoted VOLUME 8, 2020 as Obs. Then, the predicted behavior of the system is obtained by following the model. Recently, MBD algorithms have focused on a satisfiability-or maximum satisfiability-(SAT or MaxSAT, respectively) based approach [2], [4], [34]- [37] because of the rapid development of SAT and MaxSAT technology [23], [25], [38]. As shown in Figure 1, the model process obtains a (weighted) conjunctive normal form ((W)CNF) file based on gate logic and knowledge of discrete mathematics [39], [40]. The numeric variables are used to denote components, inputs and outputs. Obs and Comps are modeled as unit clauses, and SD is modeled based on gate logic and knowledge of discrete mathematics. The details of the circuit model process are shown in [39], [40].
An MBD problem arises when an inconsistency appears between the observed behavior of the system and the predicted behavior. That is, the system has abnormal behavior. A troubleshooting problem, in general, plans a sequence of actions to fix an abnormally behaving system.
Recently, batch repair has been an efficient way to solve troubleshooting problems. The BRP arises when an MBD problem arises, i.e., the system's behavior is abnormal.
A description of the diagnosis problem and the related concepts can be found in [32], [33]. A unary predicate Ab indicates an unhealthy component c ∈ Comps, i.e., Ab(c) is true when component c has abnormal behavior.
In addition, is a subset-minimal diagnosis when any ⊂ is not a diagnosis. is a cardinality-minimal diagnosis if no diagnosis exists such that | | < | |. In BRP, the model-based diagnosis engine (MBDE) returns a set of diagnoses and their likelihoods p(·), where a diagnosis ∈ is a set of components that may have been faulty, and the likelihood p( ) is the likelihood of .
assigned 1 when c i ∈ and 0 otherwise.
We show an example of health states in Table 1. Given a system with 6 components, there are 5 diagnoses d 1 = Through a SAT-or MaxSAT-based diagnosis algorithm, we can obtain diagnosis results via the CNF or WCNF file, as shown in Figure 1, including the health state, diagnosis and score. The subsequent troubleshooting process requires these diagnosis results to obtain repair sequences.
Specifically, when an MBD problem arises, at least one component must be repaired. Thus, repair actions are needed to fix the system. A description of the repair action and related concepts can be found in [20].
Definition 3 (Repair Action): A repair action aims to repair a set of components γ ⊆ Comps, denoted by Repair(γ ).
Note that the components in γ have normal behavior after the repair action. Then, it is verified whether the system has been fixed via the comparing observed system outputs and the expected outputs of a healthy system. In this paper, the components γ are called the batch repair sequence.
More importantly, costs will be incurred after repairing some components, and they are composed of the repair overhead and component repair costs. The repair overhead is denoted as cost repair , and the repair cost of a component c ∈ Comps is denoted by cost c .
Definition 4 (Repair Costs): After a repair action, the cost incurred is cost(Repair(γ )) = cost repair + c∈γ cost c , where cost repair > 0 and cost c > 0.
The BRP algorithm is a way to solve troubleshooting problems, i.e., to fix the system. To minimize the total repair cost is the task of the BRP.
The system repair likelihood can be obtained via a sequence of repaired components γ and a set of diagnoses . The likelihood for each component can be obtained as Previous works modeled the BRP as a combinatorial optimization problem and used the heuristic search method to solve it [1], [20]. They use heuristic search methods, i.e., A* variant, hill climbing (HC) and depth-limited breadth-first search. To find the minimum total repair cost, utility functions are proposed as heuristic strategies. These functions consist of false positive costs cost FP , false negative costs cost FN and future false positive costs cost FFP . cost FP denotes the costs incurred by repairing components that are not truly faulty, i.e., it indicates whether the current repair actions involve some non-faulty components. cost FN gives the overhead costs incurred by succeeding repair actions. cost FFP denotes the costs that will be wasted in the future when repairing components that should not have been repaired. Then, cost FFP is estimated according to equation 4. These cost functions are as follows.
Note that cost FN considers two cases. The optimistic case cost o FN (γ ) only needs one additional repair action. In the pessimistic case, cost p FN (γ ), one faulty component is repaired per repair action in the future. These are two kinds of extreme scenarios.
Stern et al. [20] proposed two utility functions, namely, C W C Opt and C W C Pess . C W C Pess has better results. Subsequently, the enhanced wasted cost utility function C W C FFP is proposed for use in search algorithms that use A* variant, hill climbing (HC) and depth-limited breadth-first search [1]. Moreover, compared with C W C Opt and C W C Pess , C W C FFP performs better. These utility functions are as follows.
More importantly, Shinitzky et al. [1] propose that the BRP can be modeled as a combinatorial optimization problem of searching for the optimal batch repair action. However, these authors do not find the universal winner with A*, HC or depth-limited breadth-first search. Therefore, there is much room for improvement here.

III. A LOCAL SEARCH APPROACH FOR BATCH REPAIR
In this section, we propose a novel local search approach for BRP, namely, CNASD. The key idea of local search is defining ''neighbor'' and choosing a heuristic strategy. We first introduce formal notions. Next, we present three strategies to be used in our approach: BDHC, CNA and minimal subdegree. In addition, we describe how we obtain an optimal batch repair sequence via CNASD.

A. NOTIONS
To introduce our CNASD method, we first define some concepts.
Definition 6 (Configuration Neighbor): Given a set of components γ in a batch repair sequence and a set of diagnoses = { 1 , 2 , . . . , m }, the configuration neighbors of γ , denoted by CN (γ ), consist of the components v that appear VOLUME 8, 2020 in the same diagnosis ∈ as each component u ∈ γ , That is, for a component u ∈ γ , if components v / ∈ γ and u appear in the same diagnosis, we say that component v is a configuration neighbor of γ , i.e., v ∈ CN (γ ).
We take Table 1 as an example. If the current batch repair sequence γ = {c 3 , c 5 }, then CN (γ ) consists of c 1 , c 2 and c 6 , i.e., CN (γ ) = {c 1 , c 2 , c 6 }. Obviously, c 1 / ∈ γ and c 3 ∈ γ are in the same diagnosis d 2 . The components c 5 ∈ γ , c 1 / ∈ γ and c 6 / ∈ γ are in the same diagnosis d 5 . Definition 7 (Sub-Degree): Given a set of components γ and a set of diagnoses , the sub-degree of a diagnosis ∈ is the cardinality of the difference of γ and , denoted by Take Table 1, for example. If γ = {c 5 }, the sub-degree of d 3 is 1, and subdegree(d 5 ) = 2. The sub-degree of a diagnosis shows the ''distance'' from the set of components γ to this diagnosis, to some extent.

B. THREE STRATEGIES FOR BATCH REPAIR
As we described before, union-based search is better than powerset-based search in terms of solution quality. However, union-based search also has defects. Union-based search means we need to repair the union of multiple comprehensive diagnoses. In this case, the batch repair sequence may have some unnecessary components that are not true faults in the system. Powerset-based search ignores the reasonability of a diagnosis, i.e., whether the diagnosis can explain abnormal system behavior. Moreover, a unitary search space is not reasonable. Hence, we propose three strategies to solve the BRP in our heuristic search algorithm. The details are as follows. Note that max α β (k) denotes the α with maximal k value from β (α ∈ β), and min α β (k) denotes the α with minimal k value from β (α ∈ β). = max j (p( j )) contains c i ∈ (max c i Comps (H [i])). The MBDE returns a set of diagnoses and their likelihoods. The probability for a component, i.e., the health state, is obtained via aggregating information on diagnoses. The BDHC strategy aims to find the best diagnosis (i.e., that with the maximal likelihood) that includes the highest probability component.
Considering Table 1 as an example, c 5 has the highest probability, and d 3 , d 5 both contain c 5 . We obtain d 3 as the best diagnosis with the highest probability component because d 3 has a higher likelihood than d 5  . These three strategies enable our approach to select as much of the whole diagnosis as possible and to avoid redundant components. Hence, our approach is neither union-based search nor powerset-based search. We aim to avoid redundant components in a union-based search.

C. CONFIGURATION NEIGHBOR WITH ASPIRATION APPROACH USING THE SUB-DEGREE (CNASD)
We show the main flow of the CNASD algorithm in Figure 2.
The key idea behind our algorithm is to start by obtaining the best diagnosis with the highest probability as the initial repair sequence. We then acquire all configuration neighbors of this sequence. From the configuration neighbors, the component with the highest probability is added into the repair sequence via the CNA strategy. However, there may be more than one such component. Then, the minimal sub-degree strategy will be used to find the component with the highest probability in the latest visited diagnosis with minimal sub-degree. The BDHC strategy will be used if no configuration neighbor exists.
We now present our CNASD algorithm in detail. The pseudocode of CNASD is given in Algorithm 1. maxSteps is set as the maximum number of attempts on line 2 of Algorithm 1. A reasonable number of attempts should be set to avoid the addition of a large number of components into the repair sequence. These are useless for users because they cannot fix such a mass of components in the system. We check whether a configuration neighbor exists via the HasConfigurationNeighbors() method on line 3 of Algorithm 1.

1) STEP 1. (INITIALIZATION)
The CNASD algorithm starts by initializing the batch repair sequence. The BDHC strategy is used to find the best diagnosis with the highest probability component on line 1 of Algorithm 1. Algorithm 2 implements this procedure.
Note that the task of the method notAddToRepair() is to determine whether the current diagnosis has been added to the batch repair sequence on line 6 of Algorithm 2. A diagnosis

2) STEP 2. (FIND THE CONFIGURATION NEIGHBOR WITH ASPIRATION)
After the initialization process, we acquire all configuration neighbors of the current batch repair sequence as the search space. Then, the aspiration mechanism ensures that the highest-probability component is added into the batch repair sequence via the CNA strategy. This procedure is implemented in Algorithm 3. However, if no configuration VOLUME 8, 2020  The aspiration mechanism may find more than one component with the highest probability. At this point, the minimal sub-degree strategy is useful. We find the diagnoses that include com that were obtained in step 2 (Algorithm 3). When only one diagnosis has a minimal subdegree, the highest-probability component is chosen, which is in the difference set of the current batch repair sequence and this diagnosis. Sometimes, more than one diagnosis has a minimal degree. The latest-visited diagnosis is taken into account. We select the highest-probability component from the difference set of the current batch repair sequence and this diagnosis. This process is outlined in Algorithm 4.
In summary, we propose three strategies to obtain an optimal batch repair sequence. The initialization process uses the BDHC strategy. The CNA and minimal sub-degree strategies guide us in approaching the optimal batch repair sequence with the configuration neighbors (if they exist) as the search space. If no configuration neighbors exist, our approach follows the BDHC strategy.

D. ANALYSIS OF COMPUTATIONAL COMPLEXITY
For exploring the search space [1], [20], the powerset-based search considers a union of k components in each search iteration process, where k is a parameter. Union-based search obtains the union of k diagnoses in each search iteration process, where k is a parameter.

return comp
A higher k incurs a larger search space. Consequently, higher computational complexity results. However, a higher k also increases the length of the batch repair sequence considered, and therefore, using a higher k value can potentially obtain a better batch repair sequence than using lower k values.
Note that our approach is neither a powerset-based search nor a union-based search. In our approach, the search space is a hybrid search space, namely, one that can choose an entire diagnosis or a single component. In our approach, the configuration neighbors become the current search space, if they exist, according to the CNA strategy. If configuration neighbors do not exist, the diagnoses not used for the batch repair sequence become the current search space. The BDHC strategy will work in this case. Note that in each search iteration process, the search space is a single kind of search space, i.e., it consists of either diagnoses or components not in the current sequence.
For example, take a system that has m diagnoses and n components. In a powerset-based search, the search space in each search iteration process can be as large as C k n . For a union-based search, the search space in each search iteration process can be as large as C k m . In our approach, the search space in each search iteration process can be as large as C 1 n or C 1 m . The one extreme case of our approach is the case where no configuration neighbor exists in any iteration. Thus, the search space of our approach in each iteration can be as large as C 1 m . The other extreme case is that configuration neighbors exist in every iteration. Generally, the number of configuration neighbors is less than the number of system components. Specifically, the search space of our approach in each iteration is smaller than C 1 n .

E. RELATED WORKS
Local search is an efficient algorithm to solve the optimization problem. Local search has very good performance in many areas. Cai and Su [24] propose a new heuristic based on a checking strategy for a stochastic local search algorithm to solve the satisfiability problem (SAT). Cai et al. [25] propose a number of new ideas for local search for the partial maximum satisfiability problem. Wang et al. [23] propose a local search method to solve the minimum-weight dominating set problem based on two-level configuration checking. Song et al. [26] propose an iterated local search algorithm for solving university course timetabling problems. Saviniec and Constantino [27] propose iterated local search and variable neighborhood search-based algorithms for high school timetabling problems. Zhang et al. [5] propose a learning-based local search algorithm for the graph coloring problem. Michalak [29] propose a new local search method for the multiobjective firefighter problem to reduce the computational cost.
The key in local search is the definition of ''neighbor'' and the heuristic strategy. The abovementioned works on local search define ''neighbor'' and propose corresponding heuristic strategies in many areas. The advantages of local search are efficiency and flexibility in finding optimal solutions. This paper defines the ''neighbor'' in batch repair problems and selects heuristic strategies to guide search processes. In addition, local search, as a greedy algorithm, cannot be proven to obtain the optimal solution. Namely, the local search approach obtains the (approximate) optimal solution.
For the BRP, in this paper, our goal in the local search is to find the minimal cost of fixing the system. We incorporate the characteristics of a diagnosis problem, where the diagnosis is a reasonable explanation of the system failure. However, it is always impossible to repair the system by only repairing the components in a single diagnosis. Hence, to fix the system, repairing the components in the union of many diagnoses is a reasonable solution. To achieve minimal cost, it is wise to consider as few components as possible. This paper proposes three strategies to find the balance between incurring the minimal cost and fixing the system within the maximum number of iterations. Certainly, there is a case in which no repair sequence that fixes the system is found within the maximum number of iterations. In the experiment, we set a reasonable maximum number of iterations and show the percentage of instances solved. Our local search approach can solve most instances.
System fixed is the premise of BRP to get minimal cost. However, the simple cost-oriented ways in previous works neglect this premise. Actually, repairing the system earlier will minimize the repair cost.
Our algorithm start with initial batch repair sequence with BDHC. We avoid the null initial batch repair sequence in previous works. And the BDHC is used to ensure the system fixed first and next obtain minimal cost. Because we also consider the scores on diagnosis and component.
Second, CNA and sub-degree are used to update batch repair sequence. And they update sequence with a component for minimal cost first and system fixed second. BDHC is also used to update batch repair sequence. It update sequence with the components in a diagnosis for system fixed first and minimal cost second. These are because the diagnosis is the reasonable explanation of abnormal system. To add the diagnosis into repair sequence aims to fix system. Adding a component aims to minimal cost. And the CNA and sub-degree consider score on component. It also makes adding a component for fixing system to some extents.
Thence, our strategies aim to both system fixed and minimal cost. But different strategies consider different priorities on system fixed and minimal cost. Overall, our algorithm find the balance between incurring the minimal cost and fixing the system within the maximum number of iterations and the following experimental results also prove this.
Troubleshooting algorithms, in general, plan a sequence of actions that are intended to fix an abnormally behaving system. Troubleshooting algorithms have been applied to many areas. Heckerman et al. [16] propose a decision-theoretic approach for generating troubleshooting plans for automobile systems. Friedrich and Nejdl [17] propose a cost model for troubleshooting problems in power transmission network systems. Pernestål et al. [18] propose a decision-theoretic troubleshooting system that is developed to handle external interventions on automotive vehicle systems. Torta et al. [19] propose a novel abductive problem-solving method that extends previous work on measurement selection in model-based reasoning and on decision-theoretic troubleshooting by considering structured representations of the domain. However, all the above research on troubleshooting assume that components are repaired one at a time. Stern et al. [20] propose batch repair to solve troubleshooting problems and apply this approach it to circuit systems for the first time. This work shows the efficiency of the batch repair method. Then, Shinitzky et al. [1] propose heuristic search algorithms to solve batch repair in circuit systems.

F. APPLICABILITY AND LIMITATIONS
For the workflow as shown in Figure 1, our algorithm for the BRP requires corresponding diagnosis results, i.e., the health state, diagnosis and score. Therefore, our algorithm for the BRP works as long as it provides diagnostic results. In this paper, these results are obtained by the MBD algorithm. The experiment in our paper uses the ISCAS'85 and ITC'99 combination circuit systems, which are always used in the evaluation of MBD algorithms. The key is the model process, which is important for determining the acceptable input form of the diagnosis algorithm. The circuit system need to be modeled in a CNF or WCNF file. Then, the SAT-or MaxSAT-based diagnosis algorithm uses the SAT or MaxSAT solver to obtain diagnosis results.
In addition to the above actual combination circuit systems, general simulations are also an important source of circuit VOLUME 8, 2020 systems, such as field programmable gate arrays (FPGA). Due to their low power consumption and reconfigurability, FPGAs have been successfully applied to hardware acceleration [41]- [44]. For a simulation circuit system based on FPGA, our algorithm for BRP will work as long as it can provide diagnostic results, i.e., the health state, diagnosis and score. This simulation process is different from the MBD process in this paper. The MBD process is based on the model. This process needs to model the system. However, the simulation process is based on data and the corresponding relationship formula. As long as it can provide the scores on diagnoses and the health state of components, our local search algorithm will work.
Because the repair process begins after the diagnosis problem arises, the key consideration is whether the diagnosis process can provide information on general simulations or real systems.

IV. EXPERIMENTAL EVALUATIONS
This section evaluates our CNASD approach to computing the incurred cost of the optimal batch repair action. We show the average cost incurred before the system is fixed in the experimental results.

A. EXPERIMENT PRELIMINARIES
• Implementation Our approach was implemented in Java. Moreover, we adopted Direct-MS SAT [37] as the basic diagnosis method in our approach, which was a complete MBD approach using SAT. Actually, any completed diagnosis algorithm could be selected here. We selected only one complete MBD approach using SAT that performed well. More importantly, we obtained minimal-subset diagnoses in order of cardinality.

• Competitors
We compared our approach with the batch repair algorithms that use heuristic search, such as A* variant, HC and depth-limited breadth-first search [1]. In [1], cost FFP had the best performance. Hence, we selected this enhanced wasted cost utility function as the heuristic for the compared approaches. The depth-limited breadth-first search, denoted as B(n), limits the depth via n. In [1], B(2) had better performance than B(1) among the B(n) algorithms. Hence, we chose B(2) to represent the depth-limited breadth-first search.
• Benchmarks Shinitzky et al. [1] performed experiments on a standard Boolean circuit benchmark including c432, c880 and 74182, which are from the 74XXX and ISCAS'85 circuit systems. As the circuit in 74XXX systems is small, we mainly performed experiments on ISCAS'85 systems and ITC'99 systems in this paper. The ISCAS'85 systems are standard combinational Boolean circuits, which are generally used as the basis for comparing results in the circuit diagnosis field. ITC'99 systems are standard combinational Boolean circuits, which are generally used in areas such as diagnosis, design for testability (DFT) and automatic test pattern generation (ATPG).
We ran instances using random observations. We injected 1 to 5 faults into the circuits. The prior probability of being faulty was set to 0.01 for each gate. For each observation, the subset-minimal diagnoses were found whose cardinality is less than or equal to the number of injected faults. We set maxSteps as |Comps|/10.

• Experimental Setup
The experiments were performed on a machine running Windows 10, 64-bit, with an Intel i5-4590 3.30 GHz processor and 8 GB of physical memory. Table 2 shows the average cost and maximum cost incurred with different overhead costs until the system is fixed. The rows in these tables show the results for the different   benchmark systems (on ISCAS'85 and ITC'99 circuit systems). The columns in these tables show the results for the different search algorithms, where A*, HC, B(2) and CNASD correspond to A* variant, hill climbing, breadth-first search with a depth bound of two, and our heuristic search algorithm CNASD, respectively. The results in Table 2 are given for the overhead costs of 15 and 25, and the best result in each case is bolded. Column A. denotes the average cost, and column M. denotes the maximum cost. In CNASD, column S. (%) denotes the percentage of instances solved.

B. EXPERIMENT RESULTS
As can be observed, our CNASD approach exhibits outstanding performance and can solve most instances. This result is relatively consistent over these two cases with different overhead costs. Obviously, the cost of batch repair increases as the repair overhead increases. As expected, as the scale of the system increases, the cost of batch repair increases. To fix the system, our approach considers the reasonability of a diagnosis (whether the diagnosis can explain the system's current abnormal behavior) and avoids redundant components in diagnoses as much as possible. Hence, our approach yields excellent results. Whether for the average cost or maximum cost, our algorithm performs the best in most cases. On average, our algorithm obtains better repair sequences. As can be observed from the maximum cost, our algorithm performs well and has better stability on repair costs.
In addition, our algorithm efficiently reduces the search space. The comparisons of average runtime and maximum runtime on ISCAS'85 and ITC'99 circuit systems are shown in Figure 3 and 4.
As can be observed from Figure 3 and 4, compared with A*, HC and B(2), the CNASD algorithm has a large increase in average runtime on ISCAS'85 and ITC'99 circuit systems. Additionally, as the number of faulty components increases, the increase becomes more significant, up to an order of magnitude greater. This result is due to the reduction of the search space by the CNASD algorithm. Therefore, our algorithm exhibits a reduced runtime. Comparing the average runtime and maximum runtime of the algorithms, we find that the CNASD algorithm has a smaller gap. The CNASD algorithm has a more stable runtime.

V. CONCLUSION
This paper presented a novel local search approach to solving the BRP with configuration neighbors and sub-degree. This method adopts three strategies, namely, BDHC, CNA and minimal sub-degree. First, the BDHC strategy is used to initialize the batch repair sequence. Then, the configuration neighbor is used to limit the search space. If no configuration neighbor exists, the BDHC strategy continues to play a role. Second, the CNA and minimal sub-degree strategies are used to find the next candidate component to add to the batch repair sequence. The experimental evaluation used the ISCAS'85 and ITC'99 benchmarks. We compared the average cost, average runtime, maximum cost and maximum runtime incurred by our method with those incurred by the methods of A* variant, HC and depth-limited breadth-first search [1] in state-of-the-art batch repair algorithms with heuristic search. The results are unequivocal; our approach outperforms the other approaches in terms of average cost and average runtime incurred until the system is fixed. Moreover, our approach has better stability on cost and runtime.
In the future, we would like to seek further optimization using the CNASD approach. In this paper, we have neglected an important and commonly available source of information about a circuit system, namely, its topology. The topology may help us to learn the relationships among diagnoses and obtain a more efficient strategy. In addition, we want to apply this approach to other areas, such as program and spreadsheet systems. Many diagnosis algorithms for those systems exist. Thus, the key task is to model the configuration neighbor for those systems and to find an efficient search strategy.

APPENDIX
We present a list of acronyms with their meanings in Table 3.