ENQUIRE PROJECT DETAILS BY GENERAL PUBLIC

Project Details
Funding Scheme : General Research Fund
Project Number : 612210
Project Title(English) : Detecting Adaptation Faults in Context-aware Pervasive Applications 
Project Title(Chinese) : 普適計算中的適應性錯誤測試 
Principal Investigator(English) : Prof Cheung, Shing-chi 
Principal Investigator(Chinese) :  
Department : Dept of Computer Science & Engineering
Institution : The Hong Kong University of Science and Technology
E-mail Address : scc@cse.ust.hk 
Tel : 2358 7016 
Co - Investigator(s) :
Dr Xu, Chang
Panel : Engineering
Subject Area : Computing Science & Information Technology
Exercise Year : 2010 / 11
Fund Approved : 965,738
Project Status : Completed
Completion Date : 30-6-2014
Project Objectives :
To identify the patterns of common adaptation faults in context-aware pervasive applications and study their effects on the context-aware ability of these applications.
To derive a framework to detect adaptation faults dynamically for context-aware pervasive applications, and locate these detected faults.
To implement the proposed framework, and evaluate it based on simulated and real-life context-aware pervasive applications.
Abstract as per original application
(English/Chinese):
Context-aware pervasive applications feature themselves by perceiving changes in their environments and making adaptations to realize seamless integration between users and environments. In such a computing paradigm, contexts play an important role by capturing the characteristics of a continually changing environment, and indicating when an application needs to adapt its behavior accordingly. An application is, however, prone to adaptation faults when there are unexpected context changes not being taken care of at design time. Unfortunately, modeling precisely the variety of contexts and their continual changes and inherent noises is a challenging, sometimes impossible task. The lack of handy and effective tool support for ensuring logic correctness makes adaptation faults common to context-aware pervasive applications. The presence of adaptation faults can have catastrophic effects, making such applications behave unpredictably, and denying their original objective of context awareness. Although adaptation faults can be discovered statically at a design level, such results are usually plagued with false alarms. However, detecting adaptation faults at runtime imposes unique challenges to context-aware pervasive applications. Such applications require high efficiency for reacting to continual context changes in a timely manner, which is inevitably hindered by the complexity of a runtime fault detection mechanism. In this project, we propose to study the following research questions: What are the common patterns of adaptation faults specific to context-aware pervasive applications? What causes the false alarms of adaptation fault detection? Could these false alarms be affected by compounding factors such as variable dependency, physical constraints and runtime behavior in an application? Are there any effective approaches to alleviating or eliminating such false alarms? In addition to the effectiveness of adaptation fault detection, can one make runtime fault detection efficient and scalable for large-scale context-aware pervasive applications? The study of these questions will help us to develop an effective framework for detecting adaptation faults in context-aware pervasive applications that are subject to continual context changes. The framework would enable software engineers to detect adaptation faults automatically and collect analysis results for fault-fixing advice. Prototype tools will be developed to support the proposed framework. To evaluate the applicability of our research results, we will apply our framework to both simulated and real-life pervasive applications.
上下文相關的普適應用持續地感知它們的環境變化,並作出自適應的改變以實現與用戶和環境的無縫結合。在這樣的計算模式下,上下文扮演了很重要的角色,因爲它們描述了環境的特點並指明何時需要作出何種自適應的改變。然而,在設計階段所考慮的上下文可能與實際不符,從而導致應用程序産生錯誤的自適應改變。困難的是,要在設計階段准確地考慮每種可能的上下文,並對它們的變化和內在的噪音進行建模,這具有相當的挑戰性並有可能無法完成。由于缺乏合適的、有效的工具支持,上下文相關的普適應用常常在設計邏輯上有所缺陷。這些缺陷可能會有災難性的後果,使應用程序的行爲不可預測,從而違背設計這些應用最初的目的。盡管這些自適應改變的內在缺陷可以在設計階段用靜態分析的方法予以發現,分析的結果往往包含過多的虛假警報。如果嘗試在運行階段檢測這些缺陷,則需要克服一些特有的困難。比如,普適應用需要對環境上下文的變化作出快速的反應,這可能與在運行階段仔細地檢測自適應改變的缺陷這樣的需求相違背。針對這樣的困難,在本項目中我們計劃研究如下的問題:上下文相關的普適應用具有怎麽樣的自適應缺陷模式?靜態檢測中的虛假警報是如何發生的?這些警報是否與一個應用中的變量相關性、物理規則、和運行時行爲有關聯?是否有有效的方法來減少甚至消除虛假警報?在自適應改變的缺陷檢測方面,能否做到既結果有效又檢測迅速,並對大型應用具有可擴展性?對以上問題的解答將有助于我們開發出普適應用自適應改變缺陷的有效檢測方法。這項工作將幫助軟件開發人員自動地檢測普適應用中的自適應改變缺陷,並提出修複這些缺陷的建議。我們也將提供原型工具以支持該項工作的開展。最後,我們將使用模擬實驗以及真實案例來評估我們工作的實際適用性。
Realisation of objectives: All three objectives have been successfully accomplished in the project. To pursue the first objective, we conducted an archival study of three active context-aware Android applications, which are capable of adapting their behaviors with respect to changes in environmental contexts. The study involved 80 releases of these applications and 285 reported failures. Three types of faults based on adaptation predictability, adaptation stability and the misperception of environmental changes. These faults arise from non-deterministic adaptive states, auto-cycling among a set of adaptive states, and non-robust handling of noisy sensory data. Patterns of these faults were characterized based on their causes and symptoms. At the end of the project, we started to investigate the issue of non-functional adaptive faults, such as inappropriate use of battery energy. We carried out another archival study of 33 popular Android applications that have been reported to suffer severe battery consumption problems. Patterns of inefficient using of sensor operations were collected and formulated. To achieve the second objective, we proposed a formal model that is capable to precisely express the intended adaptive behavior of a context-aware applications. The model was developed on top of first-order logic, and can be used to detect the adaptive faults. We derived an efficient algorithm and leveraged the intrinsic concurrency support by existing Intel processors to detect adaptation faults. We also proposed a technique to realign an application’s internal adaptive state with its actual environmental state. We also explore a machine learning approach to detect adaptation faults as behavior outliers. To accomplish the third objective, we build an adaptation fault detection tool (ADAM) on top of Java, several robot-cars on top of Cirrus Logic EDB9302 boards with ultrasonic and speed sensors, and a tool (GreenDroid) on top of Java PathFinder to evaluate the effectiveness of using sensor operation. During this project, a PhD student has been trained and has successfully passed his PhD qualifying examination.
Summary of objectives addressed:
Objectives Addressed Percentage achieved
1.To identify the patterns of common adaptation faults in context-aware pervasive applications and study their effects on the context-aware ability of these applications.Yes100%
2.To derive a framework to detect adaptation faults dynamically for context-aware pervasive applications, and locate these detected faults.Yes100%
3.To implement the proposed framework, and evaluate it based on simulated and real-life context-aware pervasive applications.Yes100%
Research Outcome
Major findings and research outcome: This project made the following findings and research outcome. - Majority of adaptation faults manifest themselves as non-deterministic adaptive states, auto-cycling among a set of adaptive states, and non-robust handling of noisy sensory data. In our archival study of the 285 reported failures of three popular context-aware applications, the proportion of failures related to adaptation faults ranges from 58.6% to 77.5% [J1]. - A formal model based on first-order logic is proposed to express adaptive behavior of context-aware applications. Our model allows more precise detection of adaptation faults due to the enhanced treatment on the impact of variable dependency and physical constraints [J2]. - Experimental evaluation using robot-cars shows that our fault detection algorithm is able to timely detect 80% of adaptation anomalies within 1.1ms, and 90% of them within 2.3ms [J2]. The robot-cars were built on top of Cirrus Logic EDB9302 board with a TelosB mote for wireless communication. Each car is equipped with ultrasonic and speed sensors that sense their environment every 350ms. - An enhanced version of detection algorithm is proposed to leverage the intrinsic concurrency support of existing processors. Evaluation was conducted on a 24-hour taxi tracking data in Shenzhen city. The data were collected from 760 taxis, which transmit their GPS locations continually to a transportation organization. A speedup of more than two folds can be achieved using a quad-core processor. Theorems are provided to guarantee the soundness of the detected faults [J3]. - As an attempt to relieve users from specifying the intended adaptive behavior, we deployed machine learning to detect anomalies as behavior outliers. We propose a technique to clean data noise based on application-level events, and apply it to sensor motes. Experiments show that our technique can improve the detection speed by 11 times and identify real anomalies within the top three ranked warnings [J4]. - An archival study of 33 popular Android applications suffering from severe energy problems reveals that many applications fail to adapt their energy-consuming sensory operations to changed scenarios. Experiments show that our proposed technique can detect real energy faults. Some of them have not yet been discovered by the application developers. These reports have been readily confirmed by the developers with subsequent fixes [C1]. - A technique is proposed to realign an application’s internal adaptive state with its actual environmental state. Evaluation based on 12 applications on robot-cars show that the technique improves dependability by 30.3% [C2].
Potential for further development of the research
and the proposed course of action:
The project confirms the popularity of adaptation faults in context-aware applications. We found in this project many Android applications need to adapt their non-functional behaviors such as energy consumption to changing scenarios; otherwise scarce battery power can be unnecessarily wasted. A further development of this project is to investigate non-functional anomalies of context-aware applications.
Layman's Summary of
Completion Report:
Many modern applications are context-aware. They adapt their behavior based on their environmental changes, which are captured by means of environmental contexts. However, programming adaptive behaviors is non-trivial and error-prone. Timely detection of such failures is critical to prevent them from making non-compensable consequences. We made the first archival study of such faults based on real bug reports, and identified these faults commonly arise from the anomalies in adaptation predictability and adaptation stability as well as the misperception of environmental changes. Techniques were proposed with tool supports. Experimental evaluation using real applications shows that our techniques are effective and efficient. New bugs in real applications were found using our tools and confirmed by their developers. Project results were disseminated in four journal and two conference articles.
Research Output
Peer-reviewed journal publication(s)
arising directly from this research project :
(* denotes the corresponding author)
Year of
Publication
Author(s) Title and Journal/Book
2012 Chang Xu, S.C. Cheung, Xiaoxing Ma, Chun Cao, and Jian Lu [cited as J1]  ADAM: Identifying Defects in Context-aware Adaptation, Journal of Systems and Software (JSS), vol. 85, no. 12, December 2012, pp. 2812-2828 
2013 Chang Xu, S.C. Cheung, Xiaoxing Ma, Chun Cao, and Jian Lu [cited as J2]  Detecting Faults in Context-aware Adaptation, International Journal of Software and Informatics (IJSI), vol. 7, no. 1, January 2013, pp. 85-111 
2013 Chang Xu*, Yepang Liu, S. C. Cheung, Chun Cao, Jian Lv [cited as J3]  Towards context consistency by concurrent checking for Internetware applications. Science China Information Sciences, vol. 56, no. 8, August 2013, 1-20 
2013 Yu-Xia Sun, Mary Jean Harrold, Shing-Chi Cheung and Yong Tang [cited as J4]  An Effective Testing Approach for Sensor Network Application, Chinese Journal of Computers, Vol. 36, No. 12, December 2013, pp. 2371-2389. 
Recognized international conference(s)
in which paper(s) related to this research
project was/were delivered :
Month/Year/City Title Conference Name
March/2013/San Diego [cited as C1] Where Has My Battery Gone? Finding Sensor Related Energy Black Holes in Smartphone Applications  11th IEEE International Conference on Pervasive Computing and Communications (PERCOM 2013) 
November/2013/Silicon Valley [cited as C2] Environment rematching: Toward dependability improvement for self-adaptive applications  28th IEEE/ACM International Conference on Automated Software Engineering (ASE 2013) 
Other impact
(e.g. award of patents or prizes,
collaboration with other research institutions,
technology transfer, etc.):
N/A

  SCREEN ID: SCRRM00542