ContextJ: Context-oriented Programming with Java

ContextJ: Context-oriented Programming with Java
复制标题

DOI:
10.11185/imt.6.399
复制
发表时间:
2011
影响因子:
--
通讯作者:
M. Appeltauer;R. Hirschfeld;M. Haupt;Hidehiko Masuhara
M. Appeltauer;R. Hirschfeld;M. Haupt;Hidehiko Masuhara
中科院分区:
--
文献类型:
--
作者:
M. Appeltauer;R. Hirschfeld;M. Haupt;Hidehiko Masuhara

文献摘要

被引文献

相似文献

面向上下文的编程(COP)允许上下文相关的行为变化的模块化。到目前为止,COP已经为动态类型语言(如Lisp,Smalltalk,Python和Ruby)实现,依赖于反射机制,以及基于库和预处理器的静态类型编程语言Java。ContextJ是我们的Java COP实现。它正确地将COP的层概念集成到Java类型系统中。ContextJ是基于编译器的。正如基准测试和案例研究所证实的那样,它提供了比基于Java的前辈更好的性能和更高级别的抽象机制。在本文中,我们介绍了ContextJ语言,并解释其结构和语义。此外,我们给出了我们的编译器的实现的概述,并讨论运行时基准。
Context-oriented programming (COP) allows for the modularization of context-dependent behavioral variations. So far, COP has been implemented for dynamically-typed languages such as Lisp, Smalltalk, Python, and Ruby relying on reflection mechanisms, and for the statically-typed programming language Java based on a library and a pre-processor. ContextJ is our COP implementation for Java. It properly integrates COP’s layer concept into the Java type system. ContextJ is compiler-based. As confirmed by a benchmark and a case study, it provides both better performance and higher-level abstraction mechanisms than its Java-based predecessors. In this paper, we present the ContextJ language and explain its constructs and semantics. Further, we give an overview of the implementation of our compiler and discuss run-time benchmarks.