能耗是制约便携式智能设备发展的重要瓶颈.随着嵌入式操作系统的广泛应用,因不能合理使用操作系统的API而导致的能耗错误已经成为各种嵌入式应用开发过程中不容忽视的因素.为减少应用中的能耗错误,以符号执行技术为基础,根据禁止休眠类能耗错误的特点,设计了对应的能耗错误检测方法.该方法首先利用过程内分析,获得单个函数的符号执行信息.然后借助过程间分析对单个函数的符号执行信息进行全局综合,得到更为精确的执行开销、锁变量匹配等相关信息,以更好的检测能耗错误.同时,符号执行记录了对应的分支路径信息,利用该信息能够结合约束求解器较为方便的生成出错的测试用例,进而定位错误位置.通过示例和实验,验证了该方法在能耗错误检测方面的可行性和有效性.
Energy is one important bottleneck to the development of intelligent portable device. With the wide use of embedded operation system, the energy bug caused by unsuitablely using the API of the operation system has become the im- portant factor in the designment of the embedded application. According to the characteristics of the No-Sleeping energy bug, a symbolic execution based energy bug detecting method is proposed to reduce the energy bug. It first uses intraproce- dural analysis technology to analyze one function independently to get the energy information of the function. Then, the inter- procedural analysis technology is applied to get the globe analysis of the program by the information of intraprocedural anal- ysis which can get more accuate information for energy bug detection. Meanwhile, constraint solver can be combined to ob- tain the counter-example for locating the position of the error. Example and experiment results verify that the method is feasi- ble and effective in energy bug detection.