Implementing a Type-Directed Translator for AspectFun

碩士 === 國立政治大學 === 資訊科學學系 === 95 === 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 compila...

Full description

Bibliographic Details
Main Authors: Chen, Chung Hsin, 陳忠信
Other Authors: Chen, Kung
Format: Others
Language:zh-TW
Published: 2007
Online Access:http://ndltd.ncl.edu.tw/handle/93696810895594108246
id ndltd-TW-095NCCU5394043
record_format oai_dc
spelling ndltd-TW-095NCCU53940432016-05-23T04:18:07Z http://ndltd.ncl.edu.tw/handle/93696810895594108246 Implementing a Type-Directed Translator for AspectFun 以型態推演技術製作AspectFun語言編譯器 Chen, Chung Hsin 陳忠信 碩士 國立政治大學 資訊科學學系 95 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. Chen, Kung 陳恭 2007 學位論文 ; thesis 69 zh-TW
collection NDLTD
language zh-TW
format Others
sources NDLTD
description 碩士 === 國立政治大學 === 資訊科學學系 === 95 === 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.
author2 Chen, Kung
author_facet Chen, Kung
Chen, Chung Hsin
陳忠信
author Chen, Chung Hsin
陳忠信
spellingShingle Chen, Chung Hsin
陳忠信
Implementing a Type-Directed Translator for AspectFun
author_sort Chen, Chung Hsin
title Implementing a Type-Directed Translator for AspectFun
title_short Implementing a Type-Directed Translator for AspectFun
title_full Implementing a Type-Directed Translator for AspectFun
title_fullStr Implementing a Type-Directed Translator for AspectFun
title_full_unstemmed Implementing a Type-Directed Translator for AspectFun
title_sort implementing a type-directed translator for aspectfun
publishDate 2007
url http://ndltd.ncl.edu.tw/handle/93696810895594108246
work_keys_str_mv AT chenchunghsin implementingatypedirectedtranslatorforaspectfun
AT chénzhōngxìn implementingatypedirectedtranslatorforaspectfun
AT chenchunghsin yǐxíngtàituīyǎnjìshùzhìzuòaspectfunyǔyánbiānyìqì
AT chénzhōngxìn yǐxíngtàituīyǎnjìshùzhìzuòaspectfunyǔyánbiānyìqì
_version_ 1718278600543698944