A programming framework is proposed to address the problem that the context-oriented programming languages do not provide any mechanisms to support dynamic layer addition
and its implementation is presented. The key component of the framework is an extended Java virtual machine. It incorporates predicate for checking object composition and delegation to implement layer activation
and uses existing virtual machine services to support dynamic layer addition. Therefore
the framework provides the capabilities of layer activation and dynamic layer addition. Experimental results show that the performance of layer activation in the proposed framework is approximately 10% higher than that in ContextJ.
关键词
Keywords
references
KICZALES G, LAMPING J, MENDHEKAR A, et al. Aspect-oriented programming [C]∥Proceedings of the ECOOP. Berlin, Germany: Springer-Verlag, 1997: 220-242.
HIRSCHFELD R, COSTANZA P, NIERSTRASZ O. Context-oriented programming [J]. Journal of Object Technology, 2008, 7(3): 125-151.
APPELTAUER M, HIRSCHFELD R, HAUPT M, et al. ContextJ: context-oriented programming with Java [J]. Journal of the Japan Society for Software Science and Technology on Computer Software, 2011, 28(1): 272-292.
KAMINA T, AOTANI T, MASUHARA H. EventCJ: a context-oriented programming language with declarative event-based context transition [C]∥Proceedings of the 10th International Conference on Aspect-Oriented Software Development. New York, USA: ACM, 2011: 21-25.
ENGINEER B, JORGE V. Interruptible context dependent executions: a fresh look at programming context-aware applications [C]∥Proceedings of the ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software. New York, USA: ACM, 2012: 67-84.
SUBRAMANIAN S, HICKS M W, MCKINLEY K S. Dynamic software updates: a VM-centric approach [C]∥Proceedings of the 2009 ACM SIGPLAN Conference on Programming Language Design and Implementation. New York, USA: ACM, 2009: 1-12.
MALABARBA S, PANDEY R, GRAGG J, et al. Runtime support for type-safe dynamic Java classes [C]∥Proceedings of the ECOOP. Berlin, Germany: Springer-Verlag, 2000: 337-361.
BETTINI L, BONO V, VENNERI B. Delegation by object composition [J]. Science of Computer Programming, 2011, 76(11): 992-1014.
ZHAO Y L. Granule-oriented programming [J]. ACM SIGPLAN Notices, 2004, 39(12): 107-118.
ZHAO Yinliang, ZHU Changpeng, HAN bo, et al. A calculus using fitness testing for method redirection [J]. Journal of Software, 2013, 24(7):1495-1511.
APPELTAUER M, HIRSCHFELD R, HAUPT M, et al. A comparison of context-oriented programming languages [C]∥Proceedings of the International Workshop on Context-Oriented Programming. New York, USA: ACM, 2009: 1-6.
KNIESEL G. Type-safe delegation for run-time component adaptation [C]∥Proceedings of the ECOOP. Berlin, Germany: Springer-Verlag, 1999: 351-366.
TANG Lei, ZHOU Xingshe, YU Zhiwen, et al, Research and implementation of adaptive entity under ubiquitous computing environment [J]. Journal of Xi'an Jiaotong University, 2011, 45(2): 102-106.
EKMAN T, HEDIN G. The Jastadd extensible Java compiler [C]∥Proceedings of the 22nd Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications. New York, USA: ACM, 2007: 1-18.
BULL J M, SMITH L A, WESTHEAD M D, et al. A methodology for benchmarking Java Grande applications [C]∥Proceedings of the ACM 1999 Conference on Java Grande. New York, USA: ACM, 1999: 81-88.
DELICATO F C, SANTOS I L A, PIRES P F, et al. Using aspects and dynamic composition to provide context-aware adaptation for mobile applications [C]∥Proceedings of ACM SAC. New York, USA: ACM, 2009: 456-460.