TY - GEN
T1 - E-APK
T2 - 26th Brazilian Symposium on Programming Languages, SBLP2022
AU - Gregório, Nelson
AU - Fernandes, João Paulo
AU - Bispo, João
AU - Medeiros, Sérgio
N1 - Publisher Copyright:
© 2022 ACM.
PY - 2022/10/6
Y1 - 2022/10/6
N2 - Energy efficiency is a non-functional requirement that developers must consider. This requirement is particularly relevant when building software for battery-operated devices like mobile ones: a long-lasting battery is an essential requirement for an enjoyable user experience. It has been shown that many mobile applications include inefficiencies that cause battery to be drained faster than necessary. Some of these inefficiencies result from software patterns that have been catalogued in the literature. The catalogues often provide more energy-efficient alternatives. While the related literature is vast, most approaches so far assume as a fundamental requirement that one has access to the source code of an application in order to be able to analyse it. This requirement makes independent energy analysis challenging, or even impossible, e.g. for a mobile user or, most significantly, an App Store trying to provide information on how efficient an application being submitted for publication is. Our work studies the viability of looking for known energy patterns in applications by decompiling them and analysing the resulting code. For this, we decompiled and analysed 236 open-source applications. We extended an existing tool to aid in this process, making it capable of seamlessly decompiling and analysing android applications. With the collected data, we performed a comparative analysis of the presence of energy patterns between the source code and the decompiled code. While further research is required to more assertively say if this type of static analysis is viable, our results point in a promising direction with 163 applications, approximately 69%, containing the same number of detected patterns in both source code and the release APK.
AB - Energy efficiency is a non-functional requirement that developers must consider. This requirement is particularly relevant when building software for battery-operated devices like mobile ones: a long-lasting battery is an essential requirement for an enjoyable user experience. It has been shown that many mobile applications include inefficiencies that cause battery to be drained faster than necessary. Some of these inefficiencies result from software patterns that have been catalogued in the literature. The catalogues often provide more energy-efficient alternatives. While the related literature is vast, most approaches so far assume as a fundamental requirement that one has access to the source code of an application in order to be able to analyse it. This requirement makes independent energy analysis challenging, or even impossible, e.g. for a mobile user or, most significantly, an App Store trying to provide information on how efficient an application being submitted for publication is. Our work studies the viability of looking for known energy patterns in applications by decompiling them and analysing the resulting code. For this, we decompiled and analysed 236 open-source applications. We extended an existing tool to aid in this process, making it capable of seamlessly decompiling and analysing android applications. With the collected data, we performed a comparative analysis of the presence of energy patterns between the source code and the decompiled code. While further research is required to more assertively say if this type of static analysis is viable, our results point in a promising direction with 163 applications, approximately 69%, containing the same number of detected patterns in both source code and the release APK.
KW - android
KW - code patterns
KW - compilers
KW - decompiler
KW - energy efficiency
KW - metaprogramming
KW - mobile
KW - static analysis
UR - http://www.scopus.com/inward/record.url?scp=85139838867&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85139838867&partnerID=8YFLogxK
U2 - 10.1145/3561320.3561328
DO - 10.1145/3561320.3561328
M3 - Conference contribution
AN - SCOPUS:85139838867
T3 - ACM International Conference Proceeding Series
SP - 50
EP - 58
BT - CBSOFT 2022 - 13th Congresso Brasileiro de Software; Proceedings - 26th Brazilian Symposium on Programming Languages, SBLP2022
PB - Association for Computing Machinery
Y2 - 3 October 2022 through 7 October 2022
ER -