黃冠寰Gwan-Hwan Hwang林恆毅Heng-Yi Lin2019-09-052012-6-252019-09-052012http://etds.lib.ntnu.edu.tw/cgi-bin/gs32/gsweb.cgi?o=dstdcdr&s=id=%22GN0699470280%22.&%22.id.&http://rportal.lib.ntnu.edu.tw:80/handle/20.500.12235/106902隨著多核心電腦的快速發展,軟體也趨向多執行緒開發,然而,並行程式會造成非決定性行為,也就是說給定一組輸入,執行多次後可能會產生多個不同運行順序和結果,這產生了一個關於同步程式測試的重要議題:如何將目標程式所有可能執行順序找出來,在這篇論文中,我們提出了一個動態測試架構,可運用在Java監視器和共享記憶體上,這個動態測試架構只需要去分析在執行時蒐集到的同步序列,而不需要對語法以及語義做靜態測試,更不需要使用測試模組來找出所有可能的交錯執行順序,只要可行的同步序列是有限的,就能使用我們提出的架構來進行測試,找出並行程式所有可能的執行順序,達到測試的效果。Concurrent programs exhibit nondeterministic behavior in that multiple executions thereof with the same input might produce different sequences of synchronization events and different results. This is because different executions of a concurrent major issues in the testing of concurrent programs is to explore different interleavings or exhaust all the possible interleavings of the target programs. In this paper we present a framework we have developed for performing dynamic testing on monitor-based and shared-memory concurrent programs. The proposed scheme only has to analyze the synchronization sequences (SYN-sequences) that are collected during the dynamic testing of the concurrent program – static analysis of syntax and semantics of the target concurrent program is unnecessary. It also does not need to employ a model checker to explore the feasible interleavings of the execution of the concurrent program. If the SYN-sequence of the tested concurrent program is finite, our scheme can perform dynamic testingon all the feasible SYN-sequences. The implementation and experimental results obtained with real codes and some benchmark programs demonstrate the feasibility of the proposed scheme.並行程式訊號機共享記憶體非決定性行為並行測試同步序列可達性測試動態效率測試監視器Concurrent programSemaphoreShared-memoryNondeterministic behaviorConcurrent testingSYN-sequenceReachability testingDynamic effective testingJava monitor針對Java Monitor的可達性測試Reachability Testing with Java Monitor