|
\renewcommand{\raggedright}{\leftskip=0pt \rightskip=0pt plus 0cm}\raggedright Nowadays, modern context aware applications are increasingly expected to adapt their behaviors to the surrounding environmental changes autonomously to meet their desired needs at run-time, especially in the fields of pervasive and ubiquitous computing. However, since unforeseen context variations mostly arise at runtime, which are unknown to the developers, applications have to suffer from dynamic changes to hard-to-predict behaviors which cannot be explicitly specified after initially deployed. Most existing context-based languages can only provide anticipated adaptation which is usually predefined at the initial design time, resulting in the program is running on the wrong context. In this work, we propose a fitness test programming model to address the problem. The model enables detect the unfitness between program behavior and its related context, and then automatically adjust program behavior to adapt the current context, making the program perform dynamic evolution. To validate the feasibility and effectiveness of the model, we have developed a case study and run it in the GranuleJ language framework successfully.%From the perspective of language-level, language extension is an efficient and prompt approach to conduct those adaptable applications. However, the existing context-based languages can only provide anticipated adaptation which is usually predefined at the initial design time, and they also lack appropriate programming language abstractions of dynamic flavor to support context uncertainty at runtime.}%In this paper, we present a novel fitness test programming model, which enables implicit context checks to be aware of the adaptation of the program and carry out program evolution when the program is no longer satisfied with the current context. GranuleJ introduces \emph{context variable} to identify context changes clearly, \emph{fitness tests} to detect the adaptation points where unsuitable behaviors in the program happen relying on context variables and \emph{granules} that modularize behavior variations as reuse building blocks to be freely assembled or disassembled at runtime. We have already implemented the language framework of GranuleJ and validated the feasibility and effectiveness of it through case study and performance evaluation. |
|
Keywords:Programming model; granule oriented programming; fitness test; context variable; similar granule substitution; dynamic evolution |
|