跳到主要內容

臺灣博碩士論文加值系統

(216.73.216.54) 您好!臺灣時間:2026/01/10 15:37
字體大小: 字級放大   字級縮小   預設字形  
回查詢結果 :::

詳目顯示

我願授權國圖
: 
twitterline
研究生:陳家豪
研究生(外文):Jia-Hao Chen
論文名稱:並行Java程式不確定執行行為之測試方法
論文名稱(外文):A Method to Test the Non-deterministic Execution Behavior of Concurrent Java Program
指導教授:鍾乾癸鍾乾癸引用關係
指導教授(外文):Chyan-Goei Chung
學位類別:碩士
校院名稱:國立交通大學
系所名稱:資訊工程系
學門:工程學門
學類:電資工程學類
論文種類:學術論文
論文出版年:1999
畢業學年度:87
語文別:中文
論文頁數:73
中文關鍵詞:Java程式測試並行程式並行路徑不確定執行行為
外文關鍵詞:JavaProgram testingConcurrent programConcurrent pathNon-deterministic execution behavior
相關次數:
  • 被引用被引用:4
  • 點閱點閱:191
  • 評分評分:
  • 下載下載:0
  • 收藏至我的研究室書目清單書目收藏:0
Java程式語言是一個具跨平台特性之物件導向程式語言,且Java程式語言提供並行機制並具有豐富的類別函式庫,因此越來越多的並行程式以Java程式語言來開發。
然而並行Java程式與其他並行語言程式一樣,有不確定執行行為的問題,所謂不確定執行行為現象即以相同輸入資料反覆地執行同一並行Java程式卻產生不同的輸出結果,因而造成並行Java程式難以測試;本論文針對並行Java程式之不確定執行行為提出一測試方法。
一條並行路徑是由多個執行緒所執行的展開路徑所組成,執行緒之間的執行可能是彼此獨立的或者有溝通與同步的關係,執行緒可藉由呼叫Thread物件的start()或join()函式或者呼叫共用物件的同步函式或wait()/notify()/notifyAll()來達成啟動、同步與溝通的目的。這些執行緒之間的啟動、同步、溝通行為稱為inter-thread activity,本論文將不同的inter-thread activity執行順序視為不同的執行行為,並且利用可達性分析的方法來產生一條並行路徑的所有執行行為。
為了測試的完整性,測試工程師必須對一條有不確定執行行為的並行路徑之所有執行行為皆做測試,然而同一並行路徑之有些不同的執行行為卻有相同的執行結果,從錯誤偵測的角度來看只需要測試其中一種執行行為即可。本論文從共用物件的讀取與寫入動作來分析,發現有相同read/write pattern的inter-thread activity執行順序之不同執行行為,其執行結果是一樣的,因此這些執行行為只需要選取一個來做測試即可。
本研究並將所提的並行Java程式不確定執行行為測試方法加入本實驗室所開發的循序Java程式測試環境,擴充成為並行Java程式測試環境。

The Java programming language makes writing multithreaded code easier by building support for multithreading into the language. As a result, more and more concurrent Java programs are produced. However, the area of concurrent Java program testing has received little attention in research.
The phenomenon of non-deterministic execution behavior is that repeated executions of a concurrent program with the same input may exercise different execution behaviors and produce different outputs at different executions. Similar to other concurrent programs, concurrent Java programs may also have non-deterministic execution behaviors. This thesis identifies the issues caused by non-deterministic execution behavior in concurrent Java program testing and proposes solutions.
A concurrent path consists of the expanded paths executed by distinct threads. The threads can be independent or have start/synchronization/communication relationships: threads can start(synchronize) other threads by calling the Thread object's start(join) method or communicate with each others by sending messages to the same object. These start/synchronization/communication activities are called inter-thread activity. Different inter-thread activity execution sequences are treated as different execution behavior. This thesis uses the reachability analysis technique to generate the all execution behaviors of a concurrent path.
For the completeness of program testing, testers must test all execution behaviors of a concurrent path. But some different execution behaviors of a concurrent path have the same execution result. In consideration of test efficiency, test one of them is enough because no new errors will be uncovered by testing other ones. This thesis abstract the read/write pattern of the inter-thread activity execution sequence and found that different inter-thread activity execution sequences that have the same read/write pattern will produce the same execution result,so that test one of theses inter-thread activity execution sequences is enough. A testing environment based on the proposed solutions has been implemented.

第1章 緒論1
第1.1節 前言1
第1.2節 章節介紹3
第2章 JAVA程式語言的並行機制與並行JAVA程式測試策略簡介4
第2.1節 JAVA程式語言之並行機制4
第2.1.1節 主動類別的並行指令4
第2.1.2節 共用類別的並行指令7
第2.2節 並行JAVA程式測試策略8
第3章 一條並行路徑所有執行行為之產生11
第3.1節 INTER-THREAD ACTIVITY11
第3.2節 產生一條並行路徑的所有執行行為17
第3.3節 並行JAVA程式強制執行機制26
第4章 測試個案的選取30
第4.1節 哪些INTER-THREAD ACTIVITY執行順序有相同的執行結果30
第4.2節 產生不同READ/WRITE PATTERN的INTER-THREAD ACTIVITY執行順序34
第5章 並行JAVA程式測試環境的系統功能、架構與設計39
第5.1節 系統功能39
第5.2節 系統架構41
第5.3節 並行JAVA程式測試環境之設計44
第6章 並行JAVA程式測試環境之使用者介面58
第6.1節 範例程式說明58
第6.2節 測試環境之使用者介面與說明60
第7章 結論69

1. K. C. Tai, "On testing concurrent programs", Proceeding of COMPSAC85, 1985, pp. 310-317
2. K. C. Tai, "Reproducible testing of concurrent Ada programs," Proceedings of the 2nd Conference on Software Development Tools, 1985, pp. 114-121
3. R. N. Taylor, D. L. Levine, and C. D. Kelly, "Structural testing of concurrent programs", IEEE Transactions on Software Engineering, vol. 18, no. 3, March 1992, pp. 206-215
4. R. D. Yang and C. G. Chung, "Testing concurrent Ada programs with reproducible test cases," International Conference on Software and Knowledge Engineering, pp. 15-16, June 1989, Illinois
5. 李正國、林浩澄、鍾乾癸,Java程式測試方法,第八屆物件導向技術及應用研討會,38-44頁
6. 林浩澄,Java程式測試方法與Java程式測試環境之研究,碩士論文,國立交通大學,1997
7. Roger S. Pressman, Software Engineering - A Practitioner's Approach, 4th edition, McGraw-Hill, 1997
8. Boris Beizer, Software Testing Techniques, 2nd edition, Van Nostrand Reinhold, 1990
9. Java Language Specification, http://java.sun.com/docs/books/jls/index.html
10. Java Virtual Machine Specification, http://java.sun.com/docs/books/vmspec/ index.html
11. JavaTM 2 SDK, Standard Edition Documentation, http://www.javasoft.com/ products/jdk/1.2/docs/index.html
12. Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, "Introduction To Algorithms", 1996
13. R. H. Carver, K. C. Tai, "Replay and testing for concurrent programs", IEEE Software, vol. 8, March 1991, pp. 66-74
14. T. Katayama, Z. Furukawa, K. Ushijima, "A Test-case Generation Method for Concurrent Programs Including Task-types", Proceedings of Joint 1997 Asia-Pacific Software Engineering Conference and International Computer Science Conference (APSEC'97/ICSC'97), 1997, pp. 485-494
15. T. Katayama, Z. Furukawa, K. Ushijima, "Design and implementation of test case generation for concurrent programs", Proceeding of Asia-Pacific Software Engineering Conference (APSEC'98), 1998, pp. 262-269
16. K. C. Tai, R. H. Carver, and E. E. Obaid, "Debugging concurrent Ada programs by deterministic execution", IEEE Transactions on Software Engineering, vol. 17, non. 1, January 1991, pp 45-63
17. Hwang, G-H, Tai, K-C. and Huang, T-L., 1995. " Reachability testing: an approach to testing concurrent software'', International Journal of Software Engineering and Knowledge Engineering, Vol. 5, No. 4, pp. 493-510, December 1995
18. R. N. Taylor, "A general purpose algorithm for analyzing concurrent programs," Communication of ACM, vol. 26, no. 5, 1983, pp. 362-376
19. A. Vermeulen, "Java Deadlock", Dr. Dobb's Journal, September 1997, pp. 52-56
20. R. N. Taylor and M. Young, "Graph model for reachability analysis of concurrent programs," ACM Transactions on Software Engineering and Methodology, vol. 4, no. 2, April 1995, pp. 171-213

QRCODE
 
 
 
 
 
                                                                                                                                                                                                                                                                                                                                                                                                               
第一頁 上一頁 下一頁 最後一頁 top