{"title":"自动重构Android应用程序,提高能源效率","authors":"Abhijeet Banerjee, Abhik Roychoudhury","doi":"10.1145/2897073.2897086","DOIUrl":null,"url":null,"abstract":"Mobile devices, such as smartphones and tablets, are energy constrained by nature. Therefore, apps targeted for such platforms must be energy-efficient. However, due to the use of energy oblivious design practices often this is not the case. In this paper, we present a light-weight re-factoring technique that can assist in energy-aware app development. Our technique relies on a set of energy-efficiency guidelines that encodes the optimal usage of energy-intensive (hardware) resources in an app. Given a prototype for an app, our technique begins by generating a design-expression for it. A design-expression can be described as a regular-expression representing the ordering of energy-intensive resource usages and invocation of key functionalities (event-handlers) within the app. It also generates a set of defect-expressions that are design-expressions representing the negation of energy-efficiency guidelines. A non-empty intersection between an app’s design-expression and a defect expression indicates violation of a guideline (and therefore, potential for re-factoring). To evaluate the efficacy of our re-factoring technique we analyzed a suite of open-source Android apps using our technique. The resultant re-factoring when applied reduced the energy-consumption of these apps between 3 % to 29 %. We also present a case study for one of our subject apps, that captures its design evolution over a period of two-years and more than 200 commits. Our framework found re-factoring opportunities in a number of these commits, that could have been implemented earlier on in the development stages had the developer used an energy-aware re-factoring technique such as the one presented in this work.","PeriodicalId":296509,"journal":{"name":"2016 IEEE/ACM International Conference on Mobile Software Engineering and Systems (MOBILESoft)","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2016-05-14","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"66","resultStr":"{\"title\":\"Automated Re-factoring of Android Apps to Enhance Energy-Efficiency\",\"authors\":\"Abhijeet Banerjee, Abhik Roychoudhury\",\"doi\":\"10.1145/2897073.2897086\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Mobile devices, such as smartphones and tablets, are energy constrained by nature. Therefore, apps targeted for such platforms must be energy-efficient. However, due to the use of energy oblivious design practices often this is not the case. In this paper, we present a light-weight re-factoring technique that can assist in energy-aware app development. Our technique relies on a set of energy-efficiency guidelines that encodes the optimal usage of energy-intensive (hardware) resources in an app. Given a prototype for an app, our technique begins by generating a design-expression for it. A design-expression can be described as a regular-expression representing the ordering of energy-intensive resource usages and invocation of key functionalities (event-handlers) within the app. It also generates a set of defect-expressions that are design-expressions representing the negation of energy-efficiency guidelines. A non-empty intersection between an app’s design-expression and a defect expression indicates violation of a guideline (and therefore, potential for re-factoring). To evaluate the efficacy of our re-factoring technique we analyzed a suite of open-source Android apps using our technique. The resultant re-factoring when applied reduced the energy-consumption of these apps between 3 % to 29 %. We also present a case study for one of our subject apps, that captures its design evolution over a period of two-years and more than 200 commits. Our framework found re-factoring opportunities in a number of these commits, that could have been implemented earlier on in the development stages had the developer used an energy-aware re-factoring technique such as the one presented in this work.\",\"PeriodicalId\":296509,\"journal\":{\"name\":\"2016 IEEE/ACM International Conference on Mobile Software Engineering and Systems (MOBILESoft)\",\"volume\":\"1 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2016-05-14\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"66\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2016 IEEE/ACM International Conference on Mobile Software Engineering and Systems (MOBILESoft)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/2897073.2897086\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2016 IEEE/ACM International Conference on Mobile Software Engineering and Systems (MOBILESoft)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2897073.2897086","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Automated Re-factoring of Android Apps to Enhance Energy-Efficiency
Mobile devices, such as smartphones and tablets, are energy constrained by nature. Therefore, apps targeted for such platforms must be energy-efficient. However, due to the use of energy oblivious design practices often this is not the case. In this paper, we present a light-weight re-factoring technique that can assist in energy-aware app development. Our technique relies on a set of energy-efficiency guidelines that encodes the optimal usage of energy-intensive (hardware) resources in an app. Given a prototype for an app, our technique begins by generating a design-expression for it. A design-expression can be described as a regular-expression representing the ordering of energy-intensive resource usages and invocation of key functionalities (event-handlers) within the app. It also generates a set of defect-expressions that are design-expressions representing the negation of energy-efficiency guidelines. A non-empty intersection between an app’s design-expression and a defect expression indicates violation of a guideline (and therefore, potential for re-factoring). To evaluate the efficacy of our re-factoring technique we analyzed a suite of open-source Android apps using our technique. The resultant re-factoring when applied reduced the energy-consumption of these apps between 3 % to 29 %. We also present a case study for one of our subject apps, that captures its design evolution over a period of two-years and more than 200 commits. Our framework found re-factoring opportunities in a number of these commits, that could have been implemented earlier on in the development stages had the developer used an energy-aware re-factoring technique such as the one presented in this work.