博碩士論文 108522106 詳細資訊




以作者查詢圖書館館藏 以作者查詢臺灣博碩士 以作者查詢全國書目 勘誤回報 、線上人數:84 、訪客IP:18.119.139.50
姓名 蔡欣倢(Hsin-Chieh Tsai)  查詢紙本館藏   畢業系所 資訊工程學系
論文名稱 字串參數錯誤偵測靜態分析檢查器之設計與實作
(The Design and Implementation of a Static Checker for String Parameters)
相關論文
★ 條件判斷式事件驅動程式設計之C語言擴充★ 基于小波变换的指纹活度检测,具有聚集 LPQ 和 LBP 特征
★ 應用自動化測試於異質環境機器學習管道之 MLOps 系統★ 設計具有可視化思維工具和程式作為單一步的 輔助學習程式之棋盤式遊戲
★ TOCTOU 漏洞的靜態分析與實作★ 用於繪製風力發電控制邏輯之特定領域語言
★ 在Java程式語言中以雙向結構表達數學公式間關聯之設計與實作★ 支援模組化規則製作之程式碼轉換工具
★ 基於替代語意的 pandas DataFrame 靜態型別檢查器★ 自動化時間複雜度分析的設計與實作–從軟體層面評估嵌入式系統的功率消耗
★ 以震波層析成像為應用之特定領域語言實作與分析★ 用特徵選擇減少疲勞偵測腦電圖通道數
★ 一個應用紙本運算與數位化於程式設計學習使程序性思維可視化的機制★ 基於抽象語法樹的陣列形狀錯誤偵測
★ 從合作學習角色分工獲得函式程式設計思維學習遞迴程式的機制★ 基於抽象語法樹的深度複製及彈性別名之所有權系統解決 Java 表示暴露問題
檔案 [Endnote RIS 格式]    [Bibtex 格式]    [相關文章]   [文章引用]   [完整記錄]   [館藏目錄]   至系統瀏覽論文 (2031-8-1以後開放)
摘要(中) 程式撰寫者做開發時常會使用到API,但其中的字串參數卻只能在執行時期才能被檢測到是否與正確格式相符。為了節省重複嘗試與查找資料的時間,我們提出一個針對字串參數問題的靜態分析檢查器來輔助使用者撰寫及重用程式碼。既存研究將字面值常數的抽象語法樹一起傳入檢查函式,或是以字面值型態與型別提示搭配第三方工具做檢測。其中會有兩個問題,(一)使用變數做參數控制會出現錯誤的分析訊息,(二)檢查資訊與程式撰寫者使用版本可能不同的隱憂。我們提出以爬蟲程式即時爬取線上指定版本,確保與使用者安裝的版本資料一致,用剖析抽象語法樹的方式定位字串參數的位置做檢查。對於字串變數經過條件式分支產生的多可能性字串,藉由變數數值表記錄賦值行為一併做檢查。另外將錯誤字串與可使用的字串列表做字串相似度比對,在錯誤報告上給予更精準的修改建議。此概念以pandas、TensorFlow為實作範例。
摘要(英) Programmers often use APIs when developing, but the incorrect string parameters in it can only be detected at run-time. In order to reduce the time of repeated execution and searching for documentation, we propose a static analysis checker for string parameters to assist programmers in writing and reusing code. There are two problems in related researches. One is wrong analysis reports at some situations. Another problem is the gap between the latest documentation and API version that programmers used. We propose a tool, StrChecker, to crawl the online documentation to ensure that it is consistent with the version installed by the user. And, we parse the abstract syntax tree to locate the position of the string parameters. For the multi-possibility strings generated by the conditional branch, we trace the assign statements to record all possible strings. In addition, we provide more accurate suggestions for modification on the report. StrChecker is compatible with most libraries, we implement this tool on pandas and TensorFlow.
關鍵字(中) ★ 靜態分析
★ 字串參數
★ 資料流分析
★ 網路爬蟲
關鍵字(英) ★ Static analysis
★ String parameter
★ Data flow analysis
★ Web crawler
論文目次 摘要 (p.i)
Abstract (p.ii)
目錄 (p.iii)
圖目錄 (p.vi)
表目錄 (p.vii)
一、緒論 (p.1)
1.1 API字串參數 (p.1)
1.2 字串參數錯誤問題 (p.2)
1.3 程式碼分析 (p.3)
1.3.1 抽象語法樹 (p.4)
1.3.2 型態檢查 (p.5)
1.4 Web Crawler (p.7)
1.5 論文架構 (p.8)
二、研究動機 (p.9)
2.1 字串參數錯誤 (p.9)
2.2 既存研究的解決方式 (p.12)
2.2.1 避免使用字串 (p.12)
2.2.2 mypy (p.12)
2.2.3 PDChecker (p.14)
2.3 版本差異的隱憂 (p.15)
2.4 小結 (p.16)
三、提案 (p.17)
3.1 概觀 (p.17)
3.2 資料收集 (p.19)
3.3 檢查器 (p.21)
3.3.1 定位字串參數位置 (p.22)
3.3.2 變數數值表記錄字串變數 (p.22)
3.3.3 賦值行為追蹤 (p.23)
3.3.4 錯誤輸出 (p.24)
四、實作 (p.25)
4.1 實作函式庫挑選條件 (p.25)
4.2 爬蟲程式 (p.26)
4.3 抽象語法樹分析 (p.26)
4.3.1 賦值與分支處理 (p.29)
4.3.2 字串參數檢查 (p.32)
五、評估與討論 (p.33)
5.1 功能面評估 (p.33)
5.1.1 外顯與內隱做法討論 (p.34)
5.1.2 版本差異更新辦法討論 (p.35)
5.2 案例分析 (p.36)
5.2.1 輔助使用者撰寫開發 (p.36)
5.2.2 協助重用既有程式碼 (p.37)
六、相關研究 (p.38)
6.1 版本異動影響 (p.38)
6.2 領域特定語言 (p.39)
七、總結 (p.40)
7.1 未來展望 (p.41)
參考文獻 (p.42)
參考文獻 [1]P. L. Index, “Pypl popularity of programming language.” https://pypl.github.io/PYPL.html. (accessed May 5, 2021).
[2]M. F. Sanner et al., “Python: a programming language for software integration and development,” J Mol Graph Model, vol. 17, no. 1, pp. 57–61, 1999.
[3]M. Abadi, P. Barham, J. Chen, Z. Chen, A. Davis, J. Dean, M. Devin, S. Ghemawat, G. Irving, M. Isard, et al., “Tensorflow: A system for large-scale machine learning,” in 12th {USENIX} symposium on operating systems design and implementation ({OSDI} 16), pp. 265–283, 2016.
[4]N. Ketkar, “Introduction to keras,” in Deep learning with Python, pp. 97–111, Springer, 2017.
[5]L. Snider and S. Swedo, “Pandas: current status and directions for research,” Molecular psychiatry, vol. 9, no. 10, pp. 900–907, 2004.
[6]F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blon- del, P. Prettenhofer, R. Weiss, V. Dubourg, et al., “Scikit-learn: Machine learning in python,” the Journal of machine Learning research, vol. 12, pp. 2825–2830, 2011.
[7]M. Grinberg, Flask web development: developing web applications with python. ” O’Reilly Media, Inc.”, 2018.
[8]J. Forcier, P. Bissex, and W. J. Chun, Python web development with Django. Addison- Wesley Professional, 2008.
[9]J. Bloch, “How to design a good api and why it matters,” in Companion to the 21st ACM SIGPLAN symposium on Object-oriented programming systems, languages, and applications, pp. 506–507, 2006.
[10]L. Cardelli, “Type systems,” ACM Computing Surveys (CSUR), vol. 28, no. 1, pp. 263–264, 1996.
[11]“Abstract syntax tree.” https://en.wikipedia.org/wiki/Abstract_syntax_tree/. (ac- cessed May. 4, 2021).
[12]“PEP 484 – Type Hints.” https://www.python.org/dev/peps/pep-0484/. (accessed Apr. 15, 2021).
[13]“PEP 586 – Literal Types.” https://www.python.org/dev/peps/pep-0586/. (accessed Apr. 15, 2021).
[14]“PEP 591 – Adding a final qualifier to typing.” https://www.python.org/dev/peps/ pep-0591/. (accessed Apr. 23, 2021).
[15]Z. Zhang, H. Zhu, M. Wen, Y. Tao, Y. Liu, and Y. Xiong, “How do python framework apis evolve? an exploratory study,” in 2020 IEEE 27th International Conference on Software Analysis, Evolution and Reengineering (SANER), pp. 81–92, IEEE, 2020.
[16]A. Heydon and M. Najork, “Mercator: A scalable, extensible web crawler,” World Wide Web, vol. 2, no. 4, pp. 219–229, 1999.
[17]python, “mypy - optional static typing for python.” http://mypy-lang.org/. (accessed Mar. 1, 2021).
[18]“stub-files.” https://mypy.readthedocs.io/en/stable/stubs.htmlstub-files. (accessed May. 4, 2021).
[19]呂銘洋、莊永裕, “靜態分析 pandas 程式之檢查,” in the 16th Taiwan Conference on Software Engineering (第 16 屆台灣軟體工程研討會, TCSE 2020), July 16-17, 2020.
[20]B. Dagenais and M. P. Robillard, “Recommending adaptive changes for framework evolution,” ACM Transactions on Software Engineering and Methodology (TOSEM), vol. 20, no. 4, pp. 1–35, 2011.
[21]H. A. Nguyen, T. T. Nguyen, G. Wilson Jr, A. T. Nguyen, M. Kim, and T. N. Nguyen, “A graph-based approach to api usage adaptation,” ACM Sigplan Notices, vol. 45, no. 10, pp. 302–321, 2010.
[22]A. Møller, B. B. Nielsen, and M. T. Torp, “Detecting locations in javascript programs affected by breaking library changes,” Proceedings of the ACM on Programming Languages, vol. 4, no. OOPSLA, pp. 1–25, 2020.
[23]L. Li, T. F. Bissyandé, H. Wang, and J. Klein, “Cid: Automating the detection of api-related compatibility issues in android apps,” in Proceedings of the 27th ACM SIGSOFT International Symposium on Software Testing and Analysis, pp. 153–163, 2018.
[24]A. Van Deursen, P. Klint, and J. Visser, “Domain-specific languages: An annotated bibliography,” ACM Sigplan Notices, vol. 35, no. 6, pp. 26–36, 2000.
指導教授 莊永裕(Yung-Yu Zhuang) 審核日期 2021-7-20
推文 facebook   plurk   twitter   funp   google   live   udn   HD   myshare   reddit   netvibes   friend   youpush   delicious   baidu   
網路書籤 Google bookmarks   del.icio.us   hemidemi   myshare   

若有論文相關問題,請聯絡國立中央大學圖書館推廣服務組 TEL:(03)422-7151轉57407,或E-mail聯絡  - 隱私權政策聲明