簡易檢索 / 詳目顯示

研究生: 蔡翰毅
論文名稱: 針對一般程式使用內插法來產生偵測動畫
Debugging Animation for General Programs by Keyframe Interpolation
指導教授: 鄭永斌
學位類別: 碩士
Master
系所名稱: 資訊工程學系
Department of Computer Science and Information Engineering
論文出版年: 2011
畢業學年度: 99
語文別: 中文
論文頁數: 55
中文關鍵詞: 軟體視覺化視覺化隱喻
英文關鍵詞: software visualization, visualize metaphors
論文種類: 學術論文
相關次數: 點閱:162下載:2
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 一般而言,程式設計師在撰寫程式時,常會需要使用或維護別人所寫的程式碼,此時就會遇到理解程式碼的問題。雖然閱讀相關的設計文件可以幫助了解程式的運作,但有可能會遇到文件過期的問題,所以通常程式設計師會先閱讀完設計文件然後在除錯模式下於程式中插入中斷點,然後藉觀察中斷點之間變數的變化以及呼叫過的函式路徑,來了解程式運作的方式以及原理。
    目前大部分的程式設計師還是使用文字介面的除錯器,但如果遇到複雜而龐大的資料結構,難免還是需要用紙筆或者是其他的程式來幫助了解此資料結構。雖然近年來有不少軟體視覺化的工具可以使用圖形來視覺化軟體內的資料,這些圖形被稱為視覺化隱喻(Visualize Metaphor(VM)),但是這些工具在幫助理解程式碼時的效益多寡是以應用領域而定,通常不具備普遍性。除了實用上還是有不少的限制之外,只有少數的軟體視覺化工具有提供動畫功能,如ANIMAL[1]、PlanAni[2]、JEDAS[3]、Jeliot3[4]、POLKA[5]、TANGO[6]、XTANGO[7];這些研究雛形軟體工具都有幾個特點,就是他們都擁有特定的VM、只能針對特定的程式碼演示動畫、或需要撰寫額外複雜的程式碼幫助動畫的進行。所以大部分只適用於教學用途。因此我們提出了一個建構在xDIVA[8]的動畫子系統,能夠以動畫呈現出中斷點與中斷點之間程式的動態行為,能讓使用者在追溯程式碼時能夠更快速的了解程式運作的方式。
    為什麼需要建構在xDIVA上呢?主要是因為使用者可以在xDIVA上根據基本形狀的VM組合出更為複雜的VM而且不需要撰寫程式碼就可以完成這些步驟,而且xDIVA裡也有針對各種不同的資料結構所設計的排列方式(layout),而使用者完全不需要撰寫額外的程式碼來輔助動畫的進行。在程式的進行過程中layout會不斷的排列所有的VM,藉由著這些位置的改變以及VM本身的改變構成一段有意義的動畫,可讓使用者省去在紙上或腦海中推演程式進行的步驟,輕鬆的達成理解程式碼的目的。

    Generally speaking, a programmer usually needs to use or maintain the code which is written by someone else. Before he/she is capable of modifying the code, he/she must understand the program. Several entities can help understanding a program. For example, a design document, if available, can greatly help the understanding of a program. However, a design document might be out of date or inconsistent to the code. Tracing the source code is often used as a last resort. It is common to trace a program by debugger. The programmers set break points inside the program and then execute the program in debug mode to observe the change of variable values in order to understand how does the program work.
    Most debuggers nowadays are textual and numerical based. It is inadequate when a program comprises of complicated data structures. In these years, several software visualization researches have been proposed to visualize software by the graphics, which are called visualize metaphors (VM). However, these research tools are typically limited to specific application domains, without generality. Tools that provide animation capability include ANIMAL[1], PlanAni[2], JEDAS[3], Jeliot3[4], POLKA[5], TANGO[6], and XTANGO[7]. These prototype software tools typically limit their visualization power to fixed problem domains such as education. Some requires writing extra code for the animation.
    In this thesis, we proposed an animation subsystem in xDIVA[8]. It can display the program dynamic behavior between the break points by animation so that a program can be understood in a more efficient manner. In our method, users do not need to write the extra code for animation. After a layout automatically arranges the VMs in a new break point, our approach computes the differences in VM’s positions
    and properties so that an interpolation between the two key frames at two break points can be constructed. An animation is then made from such an interpolation.

    Abstract ............................................................................................................. 7 摘要 .................................................................................................................. 9 第一章 緒論 ............................................................................................. 11 第一節 研究動機.................................................................................. 11 第二節 論文架構.................................................................................. 16 第二章 研究背景 ..................................................................................... 17 第一節 Program Animation ................................................................. 17 第二節 相關工具研究 .......................................................................... 18 第三章 xDIVA Overview .......................................................................... 23 第一節 Platform .................................................................................. 23 第二節 Minerva ................................................................................... 25 第三節 DIVA ....................................................................................... 27 第一項 DIVA UI .......................................................................... 27 第二項 DIVA Mapping Dialog ..................................................... 28 第三項 DIVA WOP ...................................................................... 28 第四項 DIVA New VM Dialog ..................................................... 29 第五項 DIVA VM ........................................................................ 31 第四章 Change Animation Subsystem ...................................................... 35 第一節 The principle of animation ....................................................... 35 第二節 The DIVA Layout .................................................................... 35 第三節 The steps to enable the animation in xDIVA ............................ 42 第四節 The Analysis of Changes between key frames .......................... 42 第五節 Change Event .......................................................................... 44 第六節 The Computation of Interpolation ............................................ 45 第七節 The animation in xDIVA .......................................................... 45 第八節 The enhancement of break point .............................................. 47 第五章 Some Snapshots of Animation ...................................................... 48 第六章 Conclusion and Future Work .............................................................. 52 文獻參考 ......................................................................................................... 53

    [1] Guido Rößling, Bernd Freisleben: Experiences in using animations in introductory computer science lectures. ACM SIGCSE Bulletin, 32, 1, 134-138, 2000.
    [2] Jorma Sajaniemi, Marja Kuittinen: Program Animation Based on the Roles of Variables. In SOFTVIS, page 7-ff, 2003.
    [3] Lauer, T., Muller, R. & Ottmann, T.: Animations for Teaching Purposes: Now and Tomorrow. Special Issue of the Journal of Universal Computer Science (J.UCS), 7, 5, 420-433, 2001.
    [4] Moreno, A., Myller, N., Sutinen, E., and Ben-Ari, M.: Visualizing Programs with Jeliot 3. In the Proceedings of the International Working Conference on Advanced Visual Interfaces AVI 2004, Gallipoli (Lecce), Italy, 25-28 May, 2004 © ACM, 2004.
    [5] Stasko, J., Kraemer, E.: A methodology for building application-specific visualizations of parallel programs. In Journal of Parallel and Distributed Computing, 18, 2, 258-264, 1993.
    [6] Stasko, J.: Tango: A framework and system for algorithm animation. In IEEE Computer, 23, 9, 27-39, 1990.
    [7] Stasko, J.: Animating algorithm with XTANGO. SIGACT News, 23, 2, 67-71, 1992.
    [8] Yung-Pin Cheng, Jih-Feng Chen, Ming-Chieh Chiu,Nien-Wei Lai, and Chien-Chih Tseng. xdiva: A debugging visualization system with composable visualization metaphors. In Proceedings of ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications, 2008, Nashville, USA.
    [9] http://en.wikipedia.org/wiki/Tcl, January 25, 2010.
    [10] http://en.wikipedia.org/wiki/Proxy_pattern, January 25, 2010.
    [11] C. Knight. System and Software Visualization. In Handbook of software engineering and
    knowledge engineering. Vol 2, Emerging technologies (Vol.2).
    [12] M. Lanza. Codecrawler - polymetric views in action. In Proceedings. 19th International Conference on Automated Software Engineering, pages 394–401, Los Alamitos, California, 2004. IEEE Computer Society.
    [13] Katharina Mehner. Javis: A uml-based visualization and debugging environment for concurrent java programs. In Software Visualization, pages 163–175, 2001.
    [14] Steve Streeting. The object-oriented graphics rendering engine (ogre). available on http://www.ogre3d.org, January 25,2010.
    [15] A. E. R. Campbell, G. L. Gatto, and E. E. Hansen. Language independent interactive data visualization. In Proceedings of ACM SIGCSE 2003, pages 215–219. ACM, 2003.
    [16] Paul V. Gestwicki and Bharat Jayaraman. Methodology and architecture of jive. In SOFTVIS, pages 95–104, 2005.
    II James H. Cross, T. Dean Hendrix, Jhilmil Jain, and Larry A. Barowski. Dynamic object viewers for data
    [17] structures. In SIGCSE ’07: Proceedings of the 38th SIGCSE technical symposium on Computer science education, pages 4–8, New York, NY, USA, 2007. ACM.

    下載圖示
    QR CODE