dc.contributor.advisor | 陳恭 | zh_TW |
dc.contributor.advisor | Chen, Kung | en_US |
dc.contributor.author (Authors) | 陳政宏 | zh_TW |
dc.contributor.author (Authors) | Chen, Cheng Hung | en_US |
dc.creator (作者) | 陳政宏 | zh_TW |
dc.creator (作者) | Chen, Cheng Hung | en_US |
dc.date (日期) | 2009 | en_US |
dc.date.accessioned | 9-Apr-2010 13:33:32 (UTC+8) | - |
dc.date.available | 9-Apr-2010 13:33:32 (UTC+8) | - |
dc.date.issued (上傳時間) | 9-Apr-2010 13:33:32 (UTC+8) | - |
dc.identifier (Other Identifiers) | G0096753035 | en_US |
dc.identifier.uri (URI) | http://nccur.lib.nccu.edu.tw/handle/140.119/38549 | - |
dc.description (描述) | 碩士 | zh_TW |
dc.description (描述) | 國立政治大學 | zh_TW |
dc.description (描述) | 資訊科學學系 | zh_TW |
dc.description (描述) | 96753035 | zh_TW |
dc.description (描述) | 98 | zh_TW |
dc.description.abstract (摘要) | AspectFun是一個語法近似Haskell語言的函數式剖面導向語言。本論文中探討AspectFun在模組化型態擴充以及泛型程式設計上可扮演的角色。研究首先比較剖面與Haskell語言的type class在處理型態擴充需求議題的可行性,型態擴充議題我們以著名的Expression Problem作為代表(程式語言機制如何確保程式在擴充資料與運算函數的過程中,不需要修改舊有的程式碼,並能確保程式的型態安全)。我們接著會探討剖面如何以模組化方式實現泛型程式設計。泛型程式設計是指函數接收一額外的型態引數,且函數所執行的運算是依據此型態引數結構來進行的。型態引數是用來表示函數所處理的引數或其回傳值型態為何,但型態引數在函數定義中可能是明確定義的或者隱含的。在此研究中會展示以剖面實現的泛型程式設計更優於使用type class。此外,本研究為使AspectFun可以實現泛型程式設計方法,亦在AspectFun擴充了Existential types與多型互遞迴函數。 | zh_TW |
dc.description.abstract (摘要) | AspectFun is an aspect-oriented functional language with a Haskell-like syntax.This thesis present an study on modular type extension and generic programming using AspectFun. First, we compare the feasibility of using aspects and Haskell`s type classes to address the type extension requirements as stated in the famous expression problem (which calls for language mechanisms that can support type-safe program extension in both the dimensions of data types and associated operations, yet neither code duplication nor code rewriting is required.) Second, we investigate how to use aspects to support generic programming in amodular manner. Generic programming means a form of programming in which a function takes a type as argument, and its behavior depends upon the structure of this type. The type argument, which may be explicit or implicit, represents the type of values to which the function is applied, or which the function returns. We show that aspects can do better than type classes in supporting generic programming. In particular, we extend AspectFun with existential types and polymorphic mutual recursion to achieve such a result. | en_US |
dc.description.tableofcontents | 第一章 導論 11.1 研究動機 11.2 研究目標 21.3 論文之成果 31.4 論文之限制 31.5 論文章節架構 3第二章 背景介紹 52.1 程式的可重用性 (reusability)及擴展性(extensibility) 52.2 AspectFun介紹 52.2.1 AspectFun語言特色與基礎語法介紹 62.2.2 Type-scoped advice 72.2.3 Cflow pointcut 82.2.4 data+ 82.2.5 AspectFun的織入系統介紹 9第三章 探討AspectFun的程式重用性與擴充性 123.1 The Expression Problem 123.2 Open datatype / Open function 133.3 AspectFun的程式擴充機制在Expression Problem的應用 153.4 相關程式重用與擴充議題探討 16第四章 以AspectFun輔助實現泛型程式設計 194.1泛型程式設計 194.1.1 重載函數(overloaded function) 194.1.2 泛型程式設計與相關研究介紹 204.2 實現泛型程式設計所面臨的問題 234.2.1以type classes機制輔助實現泛型程式設計的實作與問題 234.3以AspectFun輔助實現的泛型程式設計 264.4相關的函數式剖面語言研究探討 304.5 AspectFun修改細節 304.5.1 Existential types 304.5.2 Predicate propagation 324.5.3 Polymorphic mutual recursion 34第五章 結論與未來研究 36參考文獻 37附錄 39附錄一 39附錄二 41附錄三 42 | zh_TW |
dc.format.extent | 876271 bytes | - |
dc.format.mimetype | application/pdf | - |
dc.language.iso | en_US | - |
dc.source.uri (資料來源) | http://thesis.lib.nccu.edu.tw/record/#G0096753035 | en_US |
dc.subject (關鍵詞) | 函數式剖面導向語言 | zh_TW |
dc.subject (關鍵詞) | 泛型程式設計 | zh_TW |
dc.subject (關鍵詞) | AspectFun | en_US |
dc.subject (關鍵詞) | generic programming | en_US |
dc.subject (關鍵詞) | expression problem | en_US |
dc.subject (關鍵詞) | type class | en_US |
dc.title (題名) | 以AspectFun探討模組化型態擴充與泛型程式設計 | zh_TW |
dc.title (題名) | A study on modular type extension and generic programming using AspectFun | en_US |
dc.type (資料類型) | thesis | en |
dc.relation.reference (參考文獻) | [1] G. Kiczales, J. Lamping, A. Menhdhekar, C. Maeda, C. Lopes, J.-M. Loingtier, and J. Irwin. "Aspect-oriented programming." ECOOP `97 Object-Oriented Programming 11th European Conference, Finland (M. Aksit and S. Matsuoka, eds.). 1997, vol. 1241, pp. 220-242, New York, NY: Springer-Verlag. | zh_TW |
dc.relation.reference (參考文獻) | [2] D. S. Dantas, D. Walker, G. Washburn, and S. Weirich, "PolyAML: a polymorphic aspect-oriented functional programming language." Proceedings of the tenth ACM SIGPLAN international conference on Functional programming, 2005, pp. 306 – 319. | zh_TW |
dc.relation.reference (參考文獻) | [3] H. Masuhara, H. Tatsuzawa, and A. Yonezawa, "Aspectual Caml: an aspect-oriented functional language." Proceedings of the tenth ACM SIGPLAN international conference on Functional programming, 2005, pp. 320 - 330. | zh_TW |
dc.relation.reference (參考文獻) | [4] K. Chen, S. C. Weng, M. Wang, S.C. Khoo, and C.H. Chen, "A Compilation Model for Aspect-Oriented Polymorphically Typed Functional Languages." Symposium of Static Analysis (SAS), 2007. | zh_TW |
dc.relation.reference (參考文獻) | [5] Mads Torgersen. “The Expression Problem Revisited – Four new solutions using generics.” ECOOP’04. | zh_TW |
dc.relation.reference (參考文獻) | [6] Jens Palsberg, C. Barry Jay “The essence of the visitor pattern” Computer Software and applications conference 1998. COMPSAC apos;98. proceedings. Aug 1998, The twenty second annual International. Volume, issue, 19-21, pp. 9 – 15. | zh_TW |
dc.relation.reference (參考文獻) | [7] Koji Kagawa, “Polymorphic variants in Haskell”, Proceedings of the 2006 ACM SIGPLAN workshop on Haskell. | zh_TW |
dc.relation.reference (參考文獻) | [8] Martin Odersky, Zenger, “Scalable Component Abstractions.”, Proceedings of OOPSLA 2005. | zh_TW |
dc.relation.reference (參考文獻) | [9] Matthias Zenger, Martin Odersky. “Independently Extensible Solutions to the Expression Problem.”, EPFL I&C technical report, March 2005, NO. 2005013 | zh_TW |
dc.relation.reference (參考文獻) | [10] Konstatin Laufer ,“What Functional Programmers can Learn from the Visitor Pattern.” ICFP March 2003 | zh_TW |
dc.relation.reference (參考文獻) | [11] Ralf Hinze, Andres Loh, “Generic programming in 3D.”, science of computer programming, June 2009, Volume 74, Issue 8 | zh_TW |
dc.relation.reference (參考文獻) | [12] Jan de Wit. “A technical overview of Generic Haskell.” Master`s thesis, department of Information and Computing Sciences, Utrecht University, 2002, INF-SCR-02-03, | zh_TW |
dc.relation.reference (參考文獻) | [13] Gilad Bracha, William Cook. “Mixin-based inheritance.”, Conference on Object Oriented Programming Systems Languages and Applications. Proceedings of the European conference on object-oriented programming on Object-oriented programming systems ,languages, and applications, 1990, Page : 303 – 311. | zh_TW |
dc.relation.reference (參考文獻) | [14] Andres Loh, Ralf Hinze, ”Open data types and open functions”, Proceedings of the 8th ACM SIGPLAN international conference on principle and practice of declarative programming page, 2006, pp.133-144. | zh_TW |
dc.relation.reference (參考文獻) | [15] James Cheney, Ralf Hinze, “A lightweight implementation of generics and dynamics.”, Proceeding of the 2002 ACM SIGPLAN workshop on Haskell | zh_TW |
dc.relation.reference (參考文獻) | [16] Geoffrey Washburn, Setphanie Weirich, “Good advice for type directed programming aspect-oriented programming and extensible generic programming.”, proceedings of the 2006 ACM SIGPLAN workshop on generic programming. | zh_TW |