Title :
Runtime Support for Type-Safe and Context-Based Behavior Adaptation
Author :
Zhao, Yinliang ; Zhu, Changpeng ; Han, Bo ; Zeng, Qinghua
Author_Institution :
Xi´´an Jiaotong Univ. Xi´´an, Xi´´an, China
Abstract :
Context-awareness has become increasingly important for mobile and ubiquitous computing. However, current mainstream object-oriented languages provide little explicit support for context-awareness. Object composition and delegation are often advocated as a flexible approach to represent dynamic behavior of objects with some dynamic behavior. In this paper, we propose Dynamic Behavior Adaptation Featherweight Java (DBAFJ), an extension of Featherweight Java with object composition and delegation, to support for context-awareness. In DBAFJ, each layer consists of a set of layered classes and a predicate method. The former defines a set of context-specific methods, and the latter describes a specific context. Instances of layered classes are created by the runtime system and are specialized in object composition that is context-based. Objects can be adapted by object composition at runtime to obtain new context-specific methods, and delegation with a static type discipline ensures that these new methods are correctly executed. Therefore, DBAFJ supports that the program dynamically adjust its behavior to the current execution context. The sound type system of DBAFJ assures that no "message-not-understood" errors occur at run-time.
Keywords :
Java; mobile computing; object-oriented programming; type theory; DBAFJ; context-awareness; context-based behavior adaptation; context-oriented programming; context-specific methods; dynamic behavior adaptation featherweight Java; layered classes; mobile computing; object composition; object delegation; object-oriented languages; predicate method; program execution; program supports; runtime support; type-safe behavior adaptation; ubiquitous computing; Context; Java; Programming; Runtime; Search problems; Semantics; Syntactics; Context-Oriented Programming; Delegation; Featherweight Java; Object Composition; Type Systems;
Conference_Titel :
Computer and Information Technology (CIT), 2012 IEEE 12th International Conference on
Conference_Location :
Chengdu
Print_ISBN :
978-1-4673-4873-7
DOI :
10.1109/CIT.2012.232