Loading...
|
Please use this identifier to cite or link to this item:
https://nccur.lib.nccu.edu.tw/handle/140.119/32674
|
Title: | 以型態推演技術製作AspectFun語言編譯器 Implementing a Type-Directed Translator for AspectFun |
Authors: | 陳忠信 Chen, Chung Hsin |
Contributors: | 陳恭 Chen, Kung 陳忠信 Chen, Chung Hsin |
Keywords: | 型態系統 型態推論 剖面導向程式設計 Type system Type inference Aspect-oriented programming |
Date: | 2006 |
Issue Date: | 2009-09-17 14:01:53 (UTC+8) |
Abstract: | AspectFun是一個實驗性的剖面導向函式語言,它主要的特色在於具備能以靜態織入方式實現的多型剖面、高階剖面以及依據動態流程觸發的剖面。 本論文提出一個AspectFun語言的編譯器,其編譯過程分為四個主要步驟:語法結構轉換、剖面織入、剖面轉函式與整合動態流程判斷資訊。其中剖面織入是最複雜的步驟,必須仰賴可能是多型的型態資訊,選取適當的剖面整合到程式指定的切點處。這部份的織入工作,我們的編譯器是依據一套以靜態型態推論規則發展而來的轉譯規則,先將AspectFun程式轉譯成的剖面與函式整合在一起的中介格式,再翻譯為可執行的Haskell程式來完成。此外,本系統也是使用Haskell程式語言開發,並採用Monad技術將系統模組化,以達到最佳的可維護性、擴充性與閱讀性。本論文介紹系統的實作面,解釋AspectFun系統架構、語法、原理和實作帶來的貢獻以及限制。 AspectFun is an experimental aspect-oriented functional language. Its main features include polymorphic aspects via static weaving, second-order aspects and control-flow triggered aspects. This thesis presents a type-directed compiler for AspectFun. Our compilation processes consists of four major steps: syntax de-sugaring, aspect weaving, translating aspects to normal functions, and integrating control flow information. The most complicated one is aspect weaving. Due to polymorphism in aspects, it is completely dependent on type information inferable from the aspects and the context they are used. We base our weaving step on a set of type-directed translation rules. In particular, the weaving step is further divided into two stages. First, an AspectFun program is translated into an intermediate form in which all aspects applicable at a context are chained together and integrated with context. Second, all aspects are translated into ordinary functions and any chain of aspects are transformed to a sequence of function calls in as an executable Haskell program. Moreover, the complier itself is implemented in Haskell. We fully utilize the monad mechanism of Haskell to modularize our compiler and achieve the goals of good maintainability, extensibility and readability. |
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.), vol. 1241, pp. 220-242, New York, NY: Springer-Verlag, 1997. [2] A. Tesanovic and D. Nystrom. "Aspects and Components in Real-Time System Development: Towards Reconfigurable and Reusable Software." Journal of Embedded Computing, 2004, vol. 1, no. 1. [3] L. Zhang and R. Liu. "Aspect-Oriented Real-Time System Modeling Method Based on UML." 11th IEEE International Conference on Embedded and Real-Time Computing Systems and Applications (RTCSA`05), pp. 373-376 [4] J. Viega, J.T. Bloch and P. Chandra. "Applying Aspect-Oriented Programming to Security." Cutter IT Journal, February, 2001. [5] K. Chen and C.M. Huang. "A Practical Aspect Framework for Enforcing Fine-Grained Access Control in Web Applications." First Information Security Practice and Experience Conference (ISPEC 05) Lecture Notes in Computer Science 3439, April, 2005. [6] F. Baligand and V. Monfort. "A Concrete Solution for Web Services Adaptability Using Policies and Aspects." ICSOC ’04, 2nd International Conference on Service Oriented Computing, New York City, NY, USA. [7] G. Ortiz, J. Hernandez, and P. J. Clemente. "Building and Reusing Web Service Choreographies by Using Aspect-Oriented Techniques." Proc. of the WorkShop on Best Practices and Methodologies in Service-oriented Architectures: Paving the Way to Web-services Success at the Object-Oriented programming, Systems, Languages and Applications Conference (OOPSLA), Vancouver, Canada, October 2004. [8] W. Hürsch and C. V. Lopes. "Separation of Concerns." Technical Report, NU-CCS-95-03, 1995. [9] M. Wand, G. Kiczales, and C. Dutchyn. "A semantics for advice and dynamic join points in aspect-oriented programming." Foundations of Aspect-Oriented Languages (FOAL), 2002, Extended version: ACM TOPLAS, 26(5):890–910, September 2004. [10] H. Masuhara and G. Kiczales. "Modeling Crosscutting in Aspect-Oriented Mechanisms." ECOOP 2003: 2-28. [11] R. Jagadeesan, A. Jeffrey, and J. Riely. "A calculus of untyped aspect-oriented programs." In Proceedings of the 2003 European Conference on Object Oriented Programming, pages 54–73. Springer, 2003. [12] C. Clifton and G. Leavens. " MiniMAO1: Investigating the Semantics of Proceed." In Proceedings of the Foundations of Aspect-Oriented Languages, 2005. [13] GHC, http://www.haskell.org/ghc/ [14] Hugs, http://www.haskell.org/hugs/ [15] P. Hudak. "Conception, evolution, and application of functional programming languages." 1989. ACM Computing Surveys 21 (3): 359-411. [16] P. Hudak, J. Hughes, S. P. Jones, and P. Wadler. "A History of Haskell: being lazy with class." 2007. The Third ACM SIGPLAN History of Programming Languages Conference (HOPL-III). [17] A. Church. "A set of postulates for the foundation of logic." 1932-1933. Ann. Math. 2. [18] A. Church. "The Calculi of Lambda Conversion." Princeton University Press. [19] B. D. Win, F. Piessens, W. Joosen and T. Verhanneman, "On the importance of the separation-of-concerns principle in secure software engineering." Workshop on the Application of Engineering Principles to System Security Design, 2002. [20] JBoss AOP, http://www.jboss.org/products/aop, documents download url: http://docs.jboss.org/aop/Aspectframework/ [21] AspectJ, http://www.eclipse.org/aspectj/ [22] G. Kiczales, E. Hilsdale, J. Hugunin, M. Kersten, J. Palm and W. Griswold, "Getting Started with AspectJ." Communications of the ACM. vol. 44, no. 10, pp 59-65, 2001 [23] M. P. Jones, "Typing Haskell in Haskell." Haskell Workshop, 1999 [24] C. Hall, K. Hammond, S. P. Jones, and P. Wadler, "Type Classes in Haskell." European Symposium On Programming, LNCS 788, Springer Verlag, pp. 241-256, April 1994. [25] P. Wadler, "Comprehending Monads." Proceedings of the 1990 ACM Conference on LISP and Functional Programming, Nice. 1990. [26] E. Moggi, "Notions of Computation and Monads." Information and Computation 93 (1), 1991. [27] S. P. Jones and P. Wadler, "Imperative Functional Programming." Conference record of the 20th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Charleston, South Carolina. 1993. [28] But why should monads obey these laws, http://haskell.org/haskellwiki/Monad_Laws [29] L. Damas and R. Milner, "Principal type-schemes for functional programs." Proceedings of the 9th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, 1982. [30] P. Wadler and S. Blott, "How to make ad-hoc polymorphism less ad hoc." Proceedings of the 16th ACM SIGPLAN-SIGACT symposium on Principles of programming languages., 1989. [31] D. Walker, S. Zdancewic, and J. Ligatti, "A Theory of Aspects." Proceedings of the eighth ACM SIGPLAN international conference on Functional programming, pp. 127 - 139, 2003. [32] J. Ligatti, D. Walker, and S. Zdancewic, "A type-theoretic interpretation of pointcuts and advice." Science of Computer Programming, vol. 63, issue 3, pp. 240 - 266, 2006. [33] 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, pp. 306 - 319, 2005. [34] 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, pp. 320 - 330, 2005. [35] M. Wang, K. Chen, and S. C. Khoo, "Type-directed weaving of aspects for higher-order functional languages." Proceedings of the 2006 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation, pp. 78 - 87, 2006. [36] D. B. Tucker and S. Krishnamurthi, "Pointcuts and advice in higher-order languages." Proceedings of the 2nd international conference on Aspect-oriented software development, pp. 158 - 167, 2003. [37] Robin Milner, "A theory of type polymorphism in programming." Journal of Computer and System Sciences, 17:348-375, 1978. [38] Goldberg, Mayer, "A Variadic Extension of Curry`s Fixed-Point Combinator." LISP and Symbolic Computation, Volume 18, Numbers 3-4, December 2005 , pp. 371-388(18). [39] Schönfinkel, "Über die Bausteine der mathematischen Logik." Mathematische Annalen 92, 1924. pp. 305-316. Translated by Stefan Bauer-Mengelberg as "On the building blocks of mathematical logic" in Jean van Heijenoort, 1967. A Source Book in Mathematical Logic, 1879-1931. Harvard Univ. Press: 355-66. [40] Haskell Standard Libraries, http://www.haskell.org/ghc/docs/latest/html/libraries/ [41] O. Danvy and A. Filinski, "Representing Control, A Study of the CPS Transformation Mathematical Structures." Computer Science 2(4):361-391, 1992. [42] M. P. Jones, "Kind: A system of constructor classes: overloading and implicit higher-order polymorphism." Functional Programming Languages and Computer Architecture, Pages: 52 – 61, 1993 [43] 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. |
Description: | 碩士 國立政治大學 資訊科學學系 94753003 95 |
Source URI: | http://thesis.lib.nccu.edu.tw/record/#G0094753003 |
Data Type: | thesis |
Appears in Collections: | [資訊科學系] 學位論文
|
All items in 政大典藏 are protected by copyright, with all rights reserved.
|