Aspect-oriented programming with type classes

Martin Sulzmann, Meng Wang
{"title":"Aspect-oriented programming with type classes","authors":"Martin Sulzmann, Meng Wang","doi":"10.1145/1233833.1233842","DOIUrl":null,"url":null,"abstract":"We consider the problem of adding aspects to a strongly typed language which supports type classes. We show that type classes as supported by the Glasgow Haskell Compiler can model an AOP style of programming via a simple syntax-directed transformation scheme where AOP programming idioms are mapped to type classes. The drawback of this approach is that we cannot easily advise functions in programs which carry type annotations. We sketch a more principled approach which is free of such problems by combining ideas from intentional type analysis with advanced overloading resolution strategies. Our results show that type-directed static weaving is closely related to type class resolution -- the process of typing and translating type class programs.","PeriodicalId":245301,"journal":{"name":"Workshop on Foundations of Aspect-Oriented Languages","volume":"47 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2007-03-13","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"13","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Workshop on Foundations of Aspect-Oriented Languages","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/1233833.1233842","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 13

Abstract

We consider the problem of adding aspects to a strongly typed language which supports type classes. We show that type classes as supported by the Glasgow Haskell Compiler can model an AOP style of programming via a simple syntax-directed transformation scheme where AOP programming idioms are mapped to type classes. The drawback of this approach is that we cannot easily advise functions in programs which carry type annotations. We sketch a more principled approach which is free of such problems by combining ideas from intentional type analysis with advanced overloading resolution strategies. Our results show that type-directed static weaving is closely related to type class resolution -- the process of typing and translating type class programs.
使用类型类的面向方面编程
我们考虑在支持类型类的强类型语言中添加方面的问题。我们展示了格拉斯哥Haskell编译器支持的类型类可以通过一个简单的语法导向的转换方案对AOP风格的编程建模,其中AOP编程习惯被映射到类型类。这种方法的缺点是,我们不容易在带有类型注释的程序中通知函数。我们概述了一种更有原则性的方法,通过将有意类型分析的思想与高级重载解析策略相结合,可以避免此类问题。我们的研究结果表明,面向类型的静态编织与类型类解析密切相关——类型类程序的输入和翻译过程。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信