軟體元件錯誤診斷-基於軟體切片技術

Abstract

軟體由於程式設計不當而發生錯誤在現實生活中常常發生。然而一般的使用者若碰到這種情況對軟體本身的處理相當有限。若軟體發生錯誤,使用者往往只能選擇中斷程式執行,對於避免軟體再次發生相同錯誤並沒有太大幫助。本論文希望提供一種新的想法對於使用者在軟體發生錯誤之後,能對軟體進行診斷。並且利用軟體元件圖(component diagram)將診斷的結果呈現給使用者,未來讓使用者透過網路上或其他方式找尋功能相同的元件來替換可能造成軟體發生錯誤之部份。很多其他工程領域都發展出診斷系統或診斷程式,來幫助診斷有問題的零件。找出錯誤的零件後,可以用相同功能的零件進行替換。軟體在這方面,則相對的沒有什麼進展。 本論文希望當軟體發生錯誤之後,能夠使用與硬體上類似的處理方式解決問題,因此提出了軟體錯誤診斷的概念。軟體因為內部程式設計不當發生錯誤的原因相當多變且複雜,所以我們並不打算用單一演算法來診斷軟體。本論文設計了許多規則(rule)作為分析方法用以分析軟體內部程式碼,不同的錯誤由相對應的規則分析,因此本論文設計軟體診斷的架構是一種rule-based的架構。透過這種架構,不但可以針對軟體發生特定錯誤的情況來診斷,也提昇了分析方法的擴充性。分析的過程中,本系統使用了program slicing做為主要的技術,然後用更精確的規則縮小診斷範圍,找出會造成軟體發生錯誤的部份。最後我們探討了部份Java程式當中發生錯誤的軟體案例,利用這些案例來解釋我們設計的軟體錯誤診斷架構的流程。
Software crash occurs frequently in our daily life due to poor programming of software. However, when users encounter software crash, an user’s choices are limited. When software crashed, the only choice is to terminate the program. Nevertheless, this choice is not helpful if the same problem occurs again. This thesis propose an idea to diagnose the software after it crashed and display the diagnosis through a component diagram showing that which component would be the major culprit for such a crash. Users can search the internet to look for components with identical functions to replace the problematic components. This concept is widely used in other engineering fields. In other engineering fields, many automatic diagnosis systems have been developed to identify problems quickly. These problematic parts can then be replaced. This thesis proposes to utilizing the trouble shooting concepts in other engineering fields and applying it to software crash. The causes of software crash are varied and complicated. Therefore, we propose a framework that does not use one algorithm to diagnose the crash. The framework contains a rule-based inference engine. to read a crash analysis profile for each kind of crash. It allows us to tune or extend the precision of the analysis continuously. The major analysis technique we use is program slicing. Finally, we demonstrate some case studies in Java programs.

Description

Keywords

軟體錯誤診斷, 軟體切片技術, 軟體元件, software crash diagnosis, program slicing, software component

Citation

Collections

Endorsement

Review

Supplemented By

Referenced By