政大機構典藏-National Chengchi University Institutional Repository(NCCUR):Item 140.119/38549
English  |  正體中文  |  简体中文  |  Post-Print筆數 : 27 |  Items with full text/Total items : 113303/144284 (79%)
Visitors : 50835285      Online Users : 817
RC Version 6.0 © Powered By DSPACE, MIT. Enhanced by NTU Library IR team.
Scope Tips:
  • please add "double quotation mark" for query phrases to get precise results
  • please goto advance search for comprehansive author search
  • Adv. Search
    HomeLoginUploadHelpAboutAdminister Goto mobile version
    Please use this identifier to cite or link to this item: https://nccur.lib.nccu.edu.tw/handle/140.119/38549


    Title: 以AspectFun探討模組化型態擴充與泛型程式設計
    A study on modular type extension and generic programming using AspectFun
    Authors: 陳政宏
    Chen, Cheng Hung
    Contributors: 陳恭
    Chen, Kung
    陳政宏
    Chen, Cheng Hung
    Keywords: 函數式剖面導向語言
    泛型程式設計
    AspectFun
    generic programming
    expression problem
    type class
    Date: 2009
    Issue Date: 2010-04-09 13:33:32 (UTC+8)
    Abstract: AspectFun是一個語法近似Haskell語言的函數式剖面導向語言。本論文中探討AspectFun在模組化型態擴充以及泛型程式設計上可扮演的角色。研究首先比較剖面與Haskell語言的type class在處理型態擴充需求議題的可行性,型態擴充議題我們以著名的Expression Problem作為代表(程式語言機制如何確保程式在擴充資料與運算函數的過程中,不需要修改舊有的程式碼,並能確保程式的型態安全)。
    我們接著會探討剖面如何以模組化方式實現泛型程式設計。泛型程式設計是指函數接收一額外的型態引數,且函數所執行的運算是依據此型態引數結構來進行的。型態引數是用來表示函數所處理的引數或其回傳值型態為何,但型態引數在函數定義中可能是明確定義的或者隱含的。在此研究中會展示以剖面實現的泛型程式設計更優於使用type class。此外,本研究為使AspectFun可以實現泛型程式設計方法,亦在AspectFun擴充了Existential types與多型互遞迴函數。
    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.
    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.
    [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.
    [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.
    [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.
    [5] Mads Torgersen. “The Expression Problem Revisited – Four new solutions using generics.” ECOOP’04.
    [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.
    [7] Koji Kagawa, “Polymorphic variants in Haskell”, Proceedings of the 2006 ACM SIGPLAN workshop on Haskell.
    [8] Martin Odersky, Zenger, “Scalable Component Abstractions.”, Proceedings of OOPSLA 2005.
    [9] Matthias Zenger, Martin Odersky. “Independently Extensible Solutions to the Expression Problem.”, EPFL I&C technical report, March 2005, NO. 2005013
    [10] Konstatin Laufer ,“What Functional Programmers can Learn from the Visitor Pattern.” ICFP March 2003
    [11] Ralf Hinze, Andres Loh, “Generic programming in 3D.”, science of computer programming, June 2009, Volume 74, Issue 8
    [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,
    [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.
    [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.
    [15] James Cheney, Ralf Hinze, “A lightweight implementation of generics and dynamics.”, Proceeding of the 2002 ACM SIGPLAN workshop on Haskell
    [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.
    Description: 碩士
    國立政治大學
    資訊科學學系
    96753035
    98
    Source URI: http://thesis.lib.nccu.edu.tw/record/#G0096753035
    Data Type: thesis
    Appears in Collections:[Department of Computer Science ] Theses

    Files in This Item:

    File SizeFormat
    303501.pdf855KbAdobe PDF2993View/Open


    All items in 政大典藏 are protected by copyright, with all rights reserved.


    社群 sharing

    著作權政策宣告 Copyright Announcement
    1.本網站之數位內容為國立政治大學所收錄之機構典藏,無償提供學術研究與公眾教育等公益性使用,惟仍請適度,合理使用本網站之內容,以尊重著作權人之權益。商業上之利用,則請先取得著作權人之授權。
    The digital content of this website is part of National Chengchi University Institutional Repository. It provides free access to academic research and public education for non-commercial use. Please utilize it in a proper and reasonable manner and respect the rights of copyright owners. For commercial use, please obtain authorization from the copyright owner in advance.

    2.本網站之製作,已盡力防止侵害著作權人之權益,如仍發現本網站之數位內容有侵害著作權人權益情事者,請權利人通知本網站維護人員(nccur@nccu.edu.tw),維護人員將立即採取移除該數位著作等補救措施。
    NCCU Institutional Repository is made to protect the interests of copyright owners. If you believe that any material on the website infringes copyright, please contact our staff(nccur@nccu.edu.tw). We will remove the work from the repository and investigate your claim.
    DSpace Software Copyright © 2002-2004  MIT &  Hewlett-Packard  /   Enhanced by   NTU Library IR team Copyright ©   - Feedback