Even though many technologies of Fault-Localization have been developed, program designers still spend much time on checking the used variable values of codes which contain faults. Therefore, in this thesis we discuss how to use the technology of Fault-Localization - State-Coverage on the automatic debugger which is proposed recently and put it into practice. Besides using the original variables of Branching Point which has been recorded by Checkpoint, we proposed and added different ways of Checkpoint according to different characteristic of Branch point and processed it due to the correction of results. After operating by Priority-Ranker and Wight-Calculator, we put the highest Priority Value codes into the implement of Data-Slicing and Dependence-Tree, the Dependence-Tree of possibly faults codes is revealed. Finally, we proposed the thought of scaling Function-Call into lines to calculate the distance between the fault line which we have and the real fault line. Under 5034 Test cases, we elevate the correction of Fault-Localization to 5% (The distance between Fault-Localization lines and the real fault lines are under 5 lines) ~11 %( The distance between Fault-Localization lines and the real fault lines are under 20 lines). We discuss the performances and related effects of Code-Coverage, State-Coverage and the improved State-Coverage.
目前已有許多不同的錯誤偵測技術被開發出來,但在實際的應用上,程式設計師仍然必須花費許多時間手動檢查可能包含錯誤的程式碼中已使用到變數的值。因此在這篇文章中主要想要討論的是如何在全自動化除錯系統上使用最近才被提出的偵錯技術—State-Coverage並實際實作出來。除了運用原有Checkpoint記錄在Branching Point該行程式碼中的變數外,也針對不同的Branch point的特性提出加入不同的Checkpoint的方法並依照其結果的正確性分類處理。由Priority-Ranker和Weight-Calculator運算後,將Priority Value最高的該行程式碼進行Data-Slicing 和Dependence-Tree建置動作,便可以看出錯誤可能性最高的那行程式碼的Dependence-Tree。最後再提出延展Function Call為行數的想法去計算偵測錯誤所在的行數與真正錯誤所在行數的距離。目前在總數5034種測試案例之下可以將偵測錯誤正確率提升5%(偵測錯誤行數與真正錯誤行數距離小於5行)~11%(偵測錯誤行數與真正錯誤行數距離小於20行),討論Code-Coverage、State-Coverage與改良後的State-Coverage的表現與相關的影響因素。