博碩士論文 109552014 詳細資訊




以作者查詢圖書館館藏 以作者查詢臺灣博碩士 以作者查詢全國書目 勘誤回報 、線上人數:52 、訪客IP:3.142.252.100
姓名 陳欣平(Hsin Ping Chen)  查詢紙本館藏   畢業系所 資訊工程學系在職專班
論文名稱 在指令式程式設計中以跨作用域的變數追蹤實現訊號抬升自動化
(Using Cross-scope Variable Tracking to Lift Signal Automatically in Imperative Programming)
相關論文
★ 條件判斷式事件驅動程式設計之C語言擴充★ 基于小波变换的指纹活度检测,具有聚集 LPQ 和 LBP 特征
★ 應用自動化測試於異質環境機器學習管道之 MLOps 系統★ 提升乳癌篩檢效率之批次排程框架
★ 設計具有可視化思維工具和程式作為單一步的 輔助學習程式之棋盤式遊戲★ TOCTOU 漏洞的靜態分析與實作
★ 用於繪製風力發電控制邏輯之特定領域語言★ 在Java程式語言中以雙向結構表達數學公式間關聯之設計與實作
★ 支援模組化規則製作之程式碼轉換工具★ 基於替代語意的 pandas DataFrame 靜態型別檢查器
★ 自動化時間複雜度分析的設計與實作–從軟體層面評估嵌入式系統的功率消耗★ 以震波層析成像為應用之特定領域語言實作與分析
★ 用特徵選擇減少疲勞偵測腦電圖通道數★ 一個應用紙本運算與數位化於程式設計學習使程序性思維可視化的機制
★ 基於抽象語法樹的陣列形狀錯誤偵測★ 從合作學習角色分工獲得函式程式設計思維學習遞迴程式的機制
檔案 [Endnote RIS 格式]    [Bibtex 格式]    [相關文章]   [文章引用]   [完整記錄]   [館藏目錄]   至系統瀏覽論文 (2029-7-18以後開放)
摘要(中) 響應式程式設計(Reactive Programming)是一種程式範式,它可以 將變數定義為訊號(Signal),這個訊號會追蹤變數的變化,當變數有變 化時,訊號也會跟著變化。這樣的特性使響應式程式設計很適合使用在 圖形使用者介面(Graphical User Interface)開發上。因此許多響應式程 式設計函式庫(Library)或是框架(Framework)被建立出來,它們都 是以特定的程式語言作為宿主,去建立響應式程式設計相關的功能。但 是其宣告式(Declarative)的特性與原本指令式(Imperative)物件導向
(Object-Oriented)程式設計的程式語言結合,會使工程師需要學習不同 的操作方式。其中一個操作就是要將訊號抬升(Lift)後才能做運算,這 樣的操作增加了程式碼的量與複雜度。
本研究提供一種方法 - Invisible Reactivity ,透過預編譯器將原本的 響應式程式設計函式庫中需要訊號抬升的操作自動化,使工程師在使用 訊號變數時只需要像是使用程式語言中的一般變數一樣,不需要額外學 習響應式函式庫的訊號抬升操作,並且可以避免在兩種變數間互相操作 而造成錯誤。
我們在本研究中以 Invisible Reactivity 方法為 JavaScript 響應式框 架 Vue.js 加入訊號抬升自動化的功能實作,稱為 RJS 。以 Babel 作為預 編譯器,透過 Babel 的插件來操作抽象語法樹(Abstract Syntax Tree) 來實現 Invisible Reactivity 。
摘要(英) Reactive Programming is a programming paradigm that defines vari- ables as signals, which track changes in variables and update accordingly when changes occur. This characteristic makes reactive programming par- ticularly suitable for developing graphical user interfaces (GUIs). Con- sequently, many reactive programming libraries or frameworks have been created, each tailored to specific programming languages to implement re- active programming functionalities. However, integrating its declarative nature with the traditional imperative object-oriented programming lan- guages requires engineers to learn different operational methods. One such operation is signal lifting, which must be done before performing calcula- tions, increasing code complexity and volume.
This study presents a method called Invisible Reactivity. By using a precompiler, the method automates the signal lifting operations required by traditional reactive programming libraries. This allows engineers to use signal variables just like regular variables in the programming language without needing to learn the additional signal lifting operations of reactive libraries, thereby avoiding errors that can arise from operations between the two types of variables.
In this study, we implemented the Invisible Reactivity method to add automated signal lifting functionality to the JavaScript reactive framework Vue.js, naming the implementation RJS. Babel was used as the precom- piler, and the functionality was achieved by manipulating the Abstract Syntax Tree (AST) through Babel plugins.
關鍵字(中) ★ 響應式程式設計
★ 訊號
★ 抬升
★ JavaScript
關鍵字(英) ★ Reactive Programming
★ Signal
★ Lift
★ JavaScript
論文目次 頁次 摘要 v Abstract vii
目錄 圖目錄 表目錄
ix xii xiii
一、 緒論 1
1.1 研究背景 .................................................................. 1
1.2 響應式與指令式程式設計的差別 .................................... 3
1.3 響應式程式設計與使用者介面開發 ................................. 5
1.4 響應式特性整合至指令式程式語言中 .............................. 6
1.5 抬升自動化 ............................................................... 8
二、 動機 10
2.1 JavaScript 範例.......................................................... 10
2.2 Vue.js 範例................................................................ 12
2.3 響應式函式庫對於訊號的抬升操作 ................................. 14
2.4 目前抬升自動化方法與期望的特性不同 ........................... 15
三、 提案 17 3.1 訊號的抬升轉換 ......................................................... 18 3.1.1 對於函式的轉換 ................................................ 19
3.2 訊號變數宣告與使用類型的判斷機制 .............................. 20
3.3 JavaScript 中的提升(Hoisting)對訊號變數判斷的影響 . . . . . 22
3.4 Invisible Reactivity 方法說明 ........................................ 22
四、 實作 25
4.1 定義轉換目標 ............................................................ 26
4.2 程式碼轉換為抽象語法樹 ............................................. 27
4.3 巡覽抽象語法樹節點 ................................................... 27
4.4 建立變數的作用域樹狀結構 .......................................... 28
4.4.1 Declarators 的種類............................................. 29
4.4.2 Variables 的種類................................................ 30
4.5 建立變數作用域樹狀結構的方式 .................................... 31
4.5.1 識別訊號變數宣告 ............................................. 31
4.5.2 判斷變數是否以 Set 或 Get 的方式使用.................. 32
4.5.3 判斷變數是否為訊號 .......................................... 33
4.5.4 提升的處理 ...................................................... 35
4.6 自定義函式的處理 ...................................................... 35 4.6.1 函式的紀錄與處理方式 ....................................... 36
39
五、 評估
5.1 基準測試 .................................................................. 39
5.2 與響應式函式庫的比較 ................................................ 41
5.3 與其他自動化的研究比較 ............................................. 42
5.4 Invisible Reactivity 的優缺點 ........................................ 43
5.5 Invisible Reactivity 方法的泛用性 .................................. 44
x
目錄

六、 相關研究 七、 未來研究 八、 結論 參考文獻
46 49 50 51
參考文獻 [1] Bainomugisha, E., Carreton, A. L., Cutsem, T. V., Mostinckx, S., & Meuter, W. D. (2013). A survey on reactive programming. ACM Computing Surveys (CSUR), 45(4), 1-34.
[2] Kambona, K., Boix, E. G., & De Meuter, W. (2013, July). An evaluation of re- active programming and promises for structuring collaborative web applications. In Proceedings of the 7th Workshop on Dynamic Languages and Applications (pp. 1-9).
[3] Horowitz, E. (2012). Fundamentals of programming languages. Springer Science & Business Media.
[4] Hudak, P. (1989). Conception, evolution, and application of functional programming languages. ACM Computing Surveys (CSUR), 21(3), 359-411.
[5] Lloyd, J. W. (1994, September). Practical Advtanages of Declarative Programming. In GULP-PRODE (1) (pp. 18-30).
[6] Hughes, J. (1989). Why functional programming matters. The computer journal, 32(2), 98-107.
[7] SABRY, A. (1998). What is a purely functional language? Journal of Functional Programming, 8(1), 1–22. doi:10.1017/S0956796897002943
[8] Gifford, D. K., & Lucassen, J. M. (1986, August). Integrating functional and im- perative programming. In Proceedings of the 1986 ACM Conference on LISP and Functional Programming (pp. 28-38).
[9] Lucassen, J. M. (1987). Types and effects: Towards the integration of functional and imperative programming (Doctoral dissertation, Massachusetts Institute of Technol- ogy, Dept. of Electrical Engineering and Computer Science.).
[10] Wegner, P. (1990). Concepts and paradigms of object-oriented programming. ACM Sigplan Oops Messenger, 1(1), 7-87.
[11] Gamma, E., Helm, R., Johnson, R., & Vlissides, J. (1993). Design patterns: Ab- straction and reuse of object-oriented design. In ECOOP’93—Object-Oriented Pro- gramming: 7th European Conference Kaiserslautern, Germany, July 26–30, 1993 Proceedings 7 (pp. 406-431). Springer Berlin Heidelberg.
[12] Eales, A., & Eales, A. (2005). The observer pattern revisited. Educating, Innovating & Transforming: Educators in IT: Concise paper.
[13] Ferg, S. (2006). Event-driven programming: Introduction, tutorial, history. vailable online at: http://eventdrivenpgm.sourceforge.net.
[14] Paykin,J.,Krishnaswami,N.R.,&Zdancewic,S.(2016).Theessenceofevent-driven programming. Leibniz, Leibniz International Proceedings in Informatics.
[15] Szallies, C. (1997). On using the observer design pattern. XP-002323533,(Aug. 21, 1997), 9.
[16] Sun, H., Bonetta, D., Schiavio, F., & Binder, W. (2019, February). Reasoning about the Node. js event loop using Async Graphs. In 2019 IEEE/ACM International Symposium on Code Generation and Optimization (CGO) (pp. 61-72). IEEE.
[17] Gallaba, K., Mesbah, A., & Beschastnikh, I. (2015, October). Don’t call us, we’ll call you: Characterizing callbacks in JavaScript. In 2015 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM) (pp. 1- 10). IEEE.
[18] Salvaneschi, G., & Mezini, M. (2013, March). Reactive behavior in object-oriented applications: an analysis and a research roadmap. In Proceedings of the 12th annual international conference on Aspect-oriented software development (pp. 37-48).
[19] Brilliant, S. S., & Wiseman, T. R. (1996, March). The first programming paradigm and language dilemma. In Proceedings of the twenty-seventh SIGCSE technical sym- posium on Computer science education (pp. 338-342).
[20] Spinellis, D. (1994). Programming paradigms as object classes: a structuring mech- anism for multiparadigm programming (Doctoral dissertation, University of London 1994.).
[21] Gabbrielli, M., & Martini, S. (2023). Programming languages: principles and paradigms. Springer Nature.
[22] Van Roy, P. (2009). Programming paradigms for dummies: What every programmer should know. New computational paradigms for computer music, 104, 616-621.
[23] Salvaneschi, G., & Mezini, M. (2014). Towards reactive programming for object- oriented applications. Transactions on Aspect-Oriented Software Development XI, 227-261.
[24] Mogk, R. (2015). Reactive interfaces: Combining events and expressing signals. In Workshop on Reactive and Event-based Languages & Systems (REBLS).
[25] Perez, I., & Nilsson, H. (2015, August). Bridging the GUI gap with reactive values and relations. In Proceedings of the 2015 ACM SIGPLAN Symposium on Haskell (pp. 47-58).

[26] Meyerovich, L. A., Guha, A., Baskin, J., Cooper, G. H., Greenberg, M., Bromfield, A., and Krishnamurthi, S. (2009, October). Flapjax: a programming language for Ajax applications. In Proceedings of the 24th ACM SIGPLAN conference on Object oriented programming systems languages and applications (pp. 1-20).
[27] Salvaneschi, G., Hintz, G., and Mezini, M. (2014, April). REScala: Bridging between object-oriented and functional style in reactive applications. In Proceedings of the 13th international conference on Modularity (pp. 25-36).
[28] Maier, I., and Odersky, M. (2013). Higher-order reactive programming with incre- mental lists. In ECOOP 2013–Object-Oriented Programming: 27th European Con- ference, Montpellier, France, July 1-5, 2013. Proceedings 27 (pp. 707-731). Springer Berlin Heidelberg.
[29] Vue core team and contributors. Vue.js - The Progressive JavaScript Framework,
https://vuejs.org/
[30] Zhuang, Y. Y., and Chiba, S. (2016). Expanding Event Systems to Support Signals by Enabling the Automation of Handler Bindings. Journal of Information Processing, 24(4), 620-634.
[31] Elliott, C. M. (2009, September). Push-pull functional reactive programming. In Proceedings of the 2nd ACM SIGPLAN symposium on Haskell (pp. 25-36).
[32] Zhuang, Y. (2019). A lightweight push-pull mechanism for implicitly using signals in imperative programming. Journal of Computer Languages, 54, 100903.
[33] Schuster, C., and Flanagan, C. (2016, March). Reactive programming with reac- tive variables. In Companion Proceedings of the 15th International Conference on Modularity (pp. 29-33).
[34] React team and contributors. React. https://react.dev/
[35] lexical scope, Computer and Program Organization, Part 3, p. 18, at Google Books, University of Michigan. Engineering Summer Conferences, 1967
[36] The compiler for next generation JavaScript, https://babeljs.io/
[37] T. Nicolini, A. Hora and E. Figueiredo, ”On the Usage of New JavaScript Features Through Transpilers: The Babel Case,” in IEEE Software, vol. 41, no. 1, pp. 105-112, Jan.-Feb. 2024, doi: 10.1109/MS.2023.3243858.
[38] Knoop, J., Rüthing, O., and Steffen, B. (1994). Partial dead code elimination. ACM Sigplan Notices, 29(6), 147-158.
[39] Software Technology Group, Technical University of Darmstadt, REScala, https:// www.rescala-lang.com/

[40] Wan, Z., & Hudak, P. (2000, May). Functional reactive programming from first principles. In Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementation (pp. 242-252).
[41] Nilsson, H., Courtney, A., & Peterson, J. (2002, October). Functional reactive pro- gramming, continued. In Proceedings of the 2002 ACM SIGPLAN workshop on Haskell (pp. 51-64).
[42] Elliott, C., and Hudak, P. (1997, August). Functional reactive animation. In Pro- ceedings of the second ACM SIGPLAN international conference on Functional pro- gramming (pp. 263-273).
[43] Peterson, J., Cleary, A., & Roe, K. (2015). PyFRP: Function Reactive Programming in Python.
[44] Courtney, A. (2001, March). Frappé: Functional reactive programming in Java. In International Symposium on Practical Aspects of Declarative Languages (pp. 29-44). Berlin, Heidelberg: Springer Berlin Heidelberg.
[45] Cooper, G. H., & Krishnamurthi, S. (2006, March). Embedding dynamic dataflow in a call-by-value language. In European symposium on programming (pp. 294-308). Berlin, Heidelberg: Springer Berlin Heidelberg.
[46] Jeffrey, A. (2013, September). Functional reactive programming with liveness guar- antees. In Proceedings of the 18th ACM SIGPLAN international conference on Func- tional programming (pp. 233-244).
[47] Cooper, G. H. (2008). Integrating dataflow evaluation into a practical higher-order call-by-value language. Brown University.
[48] Ohshima,Y.,Lunzer,A.,Freudenberg,B.,andKaehler,T.(2013,October).KScript and KSWorld: A time-aware and mostly declarative language and interactive GUI framework. In Proceedings of the 2013 ACM international symposium on New ideas, new paradigms, and reflections on programming and software (pp. 117-134).
[49] Czaplicki, E. (2012). Elm: Concurrent frp for functional guis. Senior thesis, Harvard University, 30.
[50] Czaplicki, E., & Chong, S. (2013). Asynchronous functional reactive programming for GUIs. ACM SIGPLAN Notices, 48(6), 411-422.
[51] Demetrescu, C., Finocchi, I., & Ribichini, A. (2011). Reactive imperative program- ming with dataflow constraints. ACM SIGPLAN Notices, 46(10), 407-426.
[52] Sant’Anna, F., & Ierusalimschy, R. (2009). LuaGravity, a reactive language based on implicit invocation. Proc. of SBLP, 89-102.

[53] Berry, G., & Serrano, M. (2020, June). Hiphop. js:(a) synchronous reactive web pro- gramming. In Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation (pp. 533-545).
[54] ReactiveX, https://reactivex.io/
[55] Liberty, J., Betts, P. (2011). Reactive Extensions for JavaScript. In: Programming Reactive Extensions and LINQ. Apress.
[56] McDirmid, S., and Hsieh, W. C. (2006, July). Superglue: Component programming with object-oriented signals. In European Conference on Object-Oriented Program- ming (pp. 206-229). Berlin, Heidelberg: Springer Berlin Heidelberg.
[57] Felgentreff, T., Borning, A., and Hirschfeld, R. (2014). Babelsberg: Specifying and Solving Constraints on Object Behavior. Journal of Object Technology, 13(4).
[58] Disney, T., Faubion, N., Herman, D., and Flanagan, C. (2014, October). Sweeten your JavaScript: Hygienic macros for ES5. In Proceedings of the 10th ACM Sympo- sium on Dynamic languages (pp. 35-44).
[59] SolidJS ·Reactive Javascript Library, https://www.solidjs.com/
[60] Meyerovich, L. Flapjax: Functional Reactive Web Programming. See http://www.
cs. brown. edu/l̃meyerov/thesis8. pdf.
指導教授 莊永裕(YungYu Zhuang) 審核日期 2024-7-30
推文 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聯絡  - 隱私權政策聲明