ABSTRACT
The dynamics of mobile networks make it difficult for mobile apps to deliver a seamless user experience. In particular, intermittent connections and weak signals pose challenges for app developers. While recent network libraries have simplified network programming, much expert knowledge is still required. However, most mobile app developers are relative novices and tend to assume a reliable network connection, paying little attention to handling network errors in programming until users complain and leave bad reviews.
We argue that the difficulty of avoiding such software defects can be mitigated through an annotation language that allows developers to declaratively state desired and actual properties of the application, largely without reference to fault-tolerant concepts, much less implementation. A pre-compiler can process these annotations, replacing calls to standard networking libraries with customized calls to a specialized library that enhances the reliability. This paper presents ANEL, a declarative language and middleware for Android that enables non-experts. We demonstrate the expressiveness and practicability of ANEL annotation through case studies and usability studies on real-world networked mobile apps. We also show that the ANEL middleware introduces negligible runtime performance overhead.
- Android Asynchrounous Http Library. http://loopj.com/android-async-http/.Google Scholar
- Android network libraries. http://www.appbrain.com/stats/libraries/tag/network/android-network-libraries.Google Scholar
- AndroidAnnotaions. http://androidannotations.org/Google Scholar
- App Developers Who Are Too Young to Drive. http://online.wsj.com/articles/SB10001424052702303410404577468670147772802.Google Scholar
- Bitstrips. http://www.bitstrips.com/.Google Scholar
- ButterKnife. http://jakewharton.github.io/butterknife/Google Scholar
- Creating a Sync Adapter. https://developer.android.com/training/sync-adapters/creating-sync-adapter.htmlGoogle Scholar
- DownloadManager. https://developer.android.com/reference/android/app/DownloadManager.htmlGoogle Scholar
- Fun Run 2. http://play.google.com/store/apps/details?id=com.dirtybit.funrun2.Google Scholar
- GpsLogger. http://code.mendhak.com/gpslogger/Google Scholar
- Hacker news. https://github.com/manmal/hn-androidGoogle Scholar
- Instagram photo viewer. https://github.com/tanlnm512/InstagramPhotoViewerGoogle Scholar
- JobScheduler. https://developer.android.com/reference/android/app/job/JobScheduler.html/.Google Scholar
- Kangaroo. https://github.com/mehikmat/KangarooGoogle Scholar
- Lexical and Dynamic Scoping. https://courses.cs.washington.edu/courses/cse341/09wi/general-concepts/scoping.htmlGoogle Scholar
- Mobile development is tougher than people think-A brief look at what makes mobile app development so tricky. http://www.itworld.com/article/2701225/mobile/mobile-development-is-tougher-than-people-think.html.Google Scholar
- New York Times search. https://github.com/tanlnm512/NewYorkTimesNewsSearchGoogle Scholar
- OkHttp. http://square.github.io/okhttp/.Google Scholar
- Retrofit. http://square.github.io/retrofit/.Google Scholar
- State of The Developer Nation Q3 2014. http://www.visionmobile.com/product/developer-economics-q3-2014/.Google Scholar
- Steam. https://play.google.com/store/apps/details?id=com.valvesoftware.android.steam.community.Google Scholar
- Trepn Power Profiler. https://developer.qualcomm.com/software/trepn-power-profilerGoogle Scholar
- Twitter Lite. https://github.com/tanlnm512/TwitterGoogle Scholar
- UK App Economy 2014. http://www.visionmobile.com/product/uk-app-economy-2014/.Google Scholar
- Volley. http://developer.android.com/training/volley/index.html.Google Scholar
- Ebuddy + weak signal = battery death. http://androidforums.com/threads/ebuddy-weak-signal-battery-death.85643/.Google Scholar
- Android App not seeing Server over wifi. https://forums.plex.tv/index.php/topic/103094-android-app-not-seeing-server-over-wifi.Google Scholar
- Steven Arzt, Siegfried Rasthofer, Christian Fritz, Eric Bodden, Alexandre Bartel, Jacques Klein, Yves Le Traon, Damien Octeau, and Patrick McDaniel. 2014. FlowDroid: Precise Context, Flow, Field, Object-sensitive and Lifecycle-aware Taint Analysis for Android Apps. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'14). ACM, Edinburgh, United Kingdom, 259--269. Google ScholarDigital Library
- Michael Backes, Sebastian Gerling, Christian Hammer, Matteo Maffei, and Philipp von Styp-Rekowsky. 2013. AppGuard: Enforcing User Requirements on Android Apps. In Proceedings of the 19th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS'13). Springer-Verlag, Berlin, Heidelberg, 543--548. <sub>3</sub>9 Google ScholarDigital Library
- Eric Bodden. 2013. Easily Instrumenting Android Applications for Security Purposes. In Proceedings of the 2013 ACM SIGSAC Conference on Computer & Communications Security (CCS '13). ACM, New York, NY, USA, 1499--1502. Google ScholarDigital Library
- Nathan Cooprider, Will Archer, Eric Eide, David Gay, and John Regehr. 2007. Efficient Memory Safety for TinyOS. In Proceedings of the 5th International Conference on Embedded Networked Sensor Systems (SenSys '07). ACM, New York, NY, USA, 205--218. Google ScholarDigital Library
- Haryadi S. Gunawi, Cindy Rubio-González, Andrea C. Arpaci-Dusseau, Remzi H. Arpaci-Dussea, and Ben Liblit. 2008. EIO: Error Handling is Occasionally Correct. In Proceedings of the 6th USENIX Conference on File and Storage Technologies (FAST'08). USENIX Association, Berkeley, CA, USA, Article 14, 16 pages. http://dl.acm.org/citation.cfm?id=1364813.1364827 Google ScholarDigital Library
- Samuel Z. Guyer and Calvin Lin. 1999. An Annotation Language for Optimizing Software Libraries. In Proceedings of the 2Nd Conference on Domain-specific Languages (DSL '99). ACM, New York, NY, USA, 39--52. Google ScholarDigital Library
- Peng Huang, Tianyin Xu, Xinxin Jin, and Yuanyuan Zhou. 2016. DefDroid: Towards a More Defensive Mobile OS Against Disruptive App Behavior. In Proceedings of the 14th Annual International Conference on Mobile Systems, Applications, and Services (MobiSys '16). ACM, New York, NY, USA, 221--234. Google ScholarDigital Library
- Konrad Jamrozik and Andreas Zeller. 2016. DroidMate: A Robust and Extensible Test Generator for Android. In Proceedings of the International Conference on Mobile Software Engineering and Systems (MOBILESoft '16). ACM, New York, NY, USA, 293--294. Google ScholarDigital Library
- Xinxin Jin, Peng Huang, Tianyin Xu, and Yuanyuan Zhou. 2016. NChecker: Saving Mobile App Developers from Network Disruptions. In Proceedings of the Eleventh European Conference on Computer Systems (EuroSys '16). ACM, New York, NY, USA, Article 22, 16 pages. Google ScholarDigital Library
- Rob Johnson and David Wagner. 2004. Finding User/Kernel Pointer Bugs with Type Inference. In Proceedings of the 13th Conference on USENIX Security Symposium - Volume 13 (SSYM'04). USENIX Association, Berkeley, CA, USA, 9--9. http://dl.acm.org/citation.cfm?id=1251375.1251384 Google ScholarDigital Library
- Mary Beth Kery, Claire Le Goues, and Brad A. Myers. 2016. Examining Programmer Practices for Locally Handling Exceptions. In Proceedings of the 13th International Conference on Mining Software Repositories (MSR '16). ACM, New York, NY, USA, 484--487. Google ScholarDigital Library
- Hammad Khalid. 2013. On Identifying User Complaints of iOS Apps. In Proceedings of the 2013 International Conference on Software Engineering (ICSE'13). IEEE Press, San Francisco, CA, USA, 1474--1476. http://dl.acm.org/citation.cfm?id=2486788.2487044 Google ScholarDigital Library
- Sarfraz Khurshid, Darko Marinov, and Daniel Jackson. 2002. An Analyzable Annotation Language. In Proceedings of the 17th ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications (OOPSLA '02). ACM, New York, NY, USA, 231--245. Google ScholarDigital Library
- G. Kiczales. 1996. Beyond the Black Box: Open Implementation. IEEE Softw. 13, 1 (Jan. 1996), 8, 10--11. Google ScholarDigital Library
- Gregor Kiczales and Erik Hilsdale. 2001. Aspect-oriented Programming. SIGSOFT Softw. Eng. Notes 26, 5 (Sept. 2001), 313--. Google ScholarDigital Library
- Chieh-Jan Mike Liang, Nicholas D. Lane, Niels Brouwers, Li Zhang, Börje F. Karlsson, Hao Liu, Yan Liu, Jun Tang, Xiang Shan, Ranveer Chandra, and Feng Zhao. 2014. Caiipa: Automated Large-scale Mobile App Testing Through Contextual Fuzzing. In Proceedings of the 20th Annual International Conference on Mobile Computing and Networking (MobiCom '14). ACM, Maui, Hawaii, USA, 519--530. Google ScholarDigital Library
- Victor B. Lortz and Kang G. Shin. 1994. Combining Contracts and Exemplar-based Programming for Class Hiding and Customization. In Proceedings of the Ninth Annual Conference on Object-oriented Programming Systems, Language, and Applications (OOPSLA '94). ACM, New York, NY, USA, 453--467. Google ScholarDigital Library
- Chris Maeda, Arthur Lee, Gail Murphy, and Gregor Kiczales. 1997. Open Implementation Analysis and Design. In Proceedings of the 1997 Symposium on Software Reusability (SSR '97). ACM, New York, NY, USA, 44--52. Google ScholarDigital Library
- Ke Mao, Mark Harman, and Yue Jia. 2016. Sapienz: Multi-objective Automated Testing for Android Applications. In Proceedings of the 25th International Symposium on Software Testing and Analysis (ISSTA 2016). ACM, New York, NY, USA, 94--105. Google ScholarDigital Library
- K. Moran, M. Linares-VÃąsquez, C. Bernal-CÃąrdenas, C. Vendome, and D. Poshyvanyk. 2016. Automatically Discovering, Reporting and Reproducing Android Application Crashes. In 2016 IEEE International Conference on Software Testing, Verification and Validation (ICST). 33--44.Google Scholar
- Nima Nikzad, Octav Chipara, and William G. Griswold. 2014. APE: An Annotation Language and Middleware for Energy-efficient Mobile Application Development. In Proceedings of the 36th International Conference on Software Engineering (ICSE 2014). ACM, New York, NY, USA, 515--526. Google ScholarDigital Library
- Nima Nikzad, Marjan Radi, Octav Chipara, and William G. Griswold. 2015. Managing the Energy-Delay Tradeoff in Mobile Applications with Tempus. In Proceedings of the 16th Annual Middleware Conference (Middleware '15). ACM, New York, NY, USA, 259--270. Google ScholarDigital Library
- F. Palomba, M. Linares-VÃąsquez, G. Bavota, R. Oliveto, M. Di Penta, D. Poshyvanyk, and A. De Lucia. 2015. User reviews matter! Tracking crowdsourced reviews to support evolution of successful apps. In 2015 IEEE International Conference on Software Maintenance and Evolution (ICSME). 291--300. Google ScholarDigital Library
- Xiaohu Qie, Ruoming Pang, and Larry Peterson. 2002. Defensive Programming: Using an Annotation Toolkit to Build DoS-resistant Software. SIGOPS Oper. Syst. Rev. 36, SI (Dec. 2002), 45--60. Google ScholarDigital Library
- D. Quinlan, M. Schordan, R. Vuduc, and Qing Yi. 2006. Annotating user-defined abstractions for optimization. In Proceedings 20th IEEE International Parallel Distributed Processing Symposium. 8 pp.-. Google ScholarDigital Library
- Lenin Ravindranath, Sharad Agarwal, Jitendra Padhye, and Chris Riederer. 2014. Procrastinator: Pacing Mobile Apps' Usage of the Network. In Proceedings of the 12th Annual International Conference on Mobile Systems, Applications, and Services (MobiSys '14). ACM, New York, NY, USA, 232--244. Google ScholarDigital Library
- Lenin Ravindranath, Suman Nath, Jitendra Padhye, and Hari Balakrishnan. 2014. Automatic and Scalable Fault Detection for Mobile Applications. In Proceedings of the 12th Annual International Conference on Mobile Systems, Applications, and Services (MobiSys'14). ACM, Bretton Woods, New Hampshire, USA, 190--203. Google ScholarDigital Library
- Hina Shah, Carsten Görg, and Mary Jean Harrold. 2008. Why Do Developers Neglect Exception Handling?. In Proceedings of the 4th International Workshop on Exception Handling (WEH '08). ACM, New York, NY, USA, 62--68. Google ScholarDigital Library
- Alok Tongaonkar, Shuaifu Dai, Antonio Nucci, and Dawn Song. 2013. Understanding Mobile App Usage Patterns Using In-app Advertisements. In Proceedings of the 14th International Conference on Passive and Active Measurement (PAM'13). Springer-Verlag, Hong Kong, China, 63--72. <sub>7</sub> Google ScholarDigital Library
- Raja Vallée-Rai, Phong Co, Etienne Gagnon, Laurie Hendren, Patrick Lam, and Vijay Sundaresan. 1999. Soot - a Java Bytecode Optimization Framework. In Proceedings of the 1999 Conference of the Centre for Advanced Studies on Collaborative Research (CASCON'99). IBM Press, Mississauga, Ontario, Canada, 13--. http://dl.acm.org/citation.cfm?id=781995.782008 Google ScholarDigital Library
- Ding Yuan, Yu Luo, Xin Zhuang, Guilherme Renna Rodrigues, Xu Zhao, Yongle Zhang, Pranay U. Jain, and Michael Stumm. 2014. Simple Testing Can Prevent Most Critical Failures: An Analysis of Production Failures in Distributed Data-Intensive Systems. In 11th USENIX Symposium on Operating Systems Design and Implementation (OSDI 14). USENIX Association, Broomfield, CO, 249--265. https://www.usenix.org/conference/osdi14/technical-sessions/presentation/yuan Google ScholarDigital Library
- Feng Zhou, Jeremy Condit, Zachary Anderson, Ilya Bagrak, Rob Ennals, Matthew Harren, George Necula, and Eric Brewer. 2006. SafeDrive: Safe and Recoverable Extensions Using Language-based Techniques. In Proceedings of the 7th USENIX Symposium on Operating Systems Design and Implementation - Volume 7 (OSDI '06). USENIX Association, Berkeley, CA, USA, 4--4. http://dl.acm.org/citation.cfm?id=1267308.1267312 Google ScholarDigital Library
Recommendations
Layout-sensitive language extensibility with SugarHaskell
Haskell '12: Proceedings of the 2012 Haskell SymposiumProgrammers need convenient syntax to write elegant and concise programs. Consequently, the Haskell standard provides syntactic sugar for some scenarios (e.g., do notation for monadic code), authors of Haskell compilers provide syntactic sugar for more ...
Layout-sensitive language extensibility with SugarHaskell
Haskell '12Programmers need convenient syntax to write elegant and concise programs. Consequently, the Haskell standard provides syntactic sugar for some scenarios (e.g., do notation for monadic code), authors of Haskell compilers provide syntactic sugar for more ...
Languages as libraries
PLDI '11Programming language design benefits from constructs for extending the syntax and semantics of a host language. While C's string-based macros empower programmers to introduce notational shorthands, the parser-level macros of Lisp encourage ...
Comments