Abstract
TouchDevelop is a novel programming environment and language for mobile devices. These applications are typically developed by non-expert users, rather small, and published on the cloud. In this paper, we introduceTouchCost a new static analysis that infers the cost of loops in TouchDevelop programs.TouchCost (i) infers numerical invariants through an existing generic analyzer, (ii) extracts cost relation systems, and (iii) solves them using an existing upper bound solver.
TouchCost has been applied to all TouchDevelop scripts that are currently published on the cloud. Experimental results show that this tool is both scalable and precise. Studying the outputs of TouchCost we glimpse two major applications: (i) establishing at runtime the cost of a loop, and in case move its execution, and (ii) helping non-expert developers to debug their programs.
References
http://www.businessinsider.com/the-future-of-mobile-slide-deck-2013-3
Albert, E., Arenas, P., Genaim, S., Puebla, G.: Closed-form upper bounds in static cost analysis. Journal of Automated Reasoning 46(2), 161–203 (2011)
Albert, E., Arenas, P., Genaim, S., Puebla, G., Zanardini, D.: Cost analysis of object-oriented bytecode programs. TCS 413(1), 142–159 (2012)
Andersen, L.O.: Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen (1994)
Ben-Amram, A.M., Genaim, S.: On the linear ranking problem for integer linear-constraint loops. In: Proceedings of POPL 2013. ACM (2013)
Benzinger, R.: Automated higher-order complexity analysis. TCS 318, 79–103 (2004)
Bonjour, Y.: Must analysis of collection elements. Master’s thesis, ETH Zurich (September 2013)
Braberman, V., Fernández, F., Garbervetsky, D., Yovine, S.: Parametric prediction of heap memory requirements. In: Proceedings of ISMM 2008. ACM (2008)
Costantini, G., Ferrara, P., Cortesi, A.: Static analysis of string values. In: Qin, S., Qiu, Z. (eds.) ICFEM 2011. LNCS, vol. 6991, pp. 505–521. Springer, Heidelberg (2011)
Cousot, P., Cousot, R.: Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: Proceedings of POPL 1977. ACM (1977)
Debray, S.K., Lin, N.-W.: Cost analysis of logic programs. ACM Transactions on Programming Languages and Systems 15(5), 826–875 (1993)
Ferdinand, C., Heckmann, R., Theiling, H., Wilhelm, R.: Convenient user annotations for a wcet tool. In: Proceedings of WCET 2003 (2003)
Ferrara, P.: Static type analysis of pattern matching by abstract interpretation. In: Hatcliff, J., Zucca, E. (eds.) FMOODS/FORTE 2 2010, Part II. LNCS, vol. 6117, pp. 186–200. Springer, Heidelberg (2010)
Ferrara, P., Fuchs, R., Juhasz, U.: TVAL+: TVLA and value analyses together. In: Eleftherakis, G., Hinchey, M., Holcombe, M. (eds.) SEFM 2012. LNCS, vol. 7504, pp. 63–77. Springer, Heidelberg (2012)
Ferrara, P., Müller, P.: Automatic inference of access permissions. In: Kuncak, V., Rybalchenko, A. (eds.) VMCAI 2012. LNCS, vol. 7148, pp. 202–218. Springer, Heidelberg (2012)
Gabi, D.: Disjunction on demand. Master’s thesis, ETH Zurich (2011)
Gustafsson, J., Ermedahl, A., Sandberg, C., Lisper, B.: Automatic derivation of loop bounds and infeasible paths for wcet analysis using abstract execution. In: Proceedings of RTSS 2006. IEEE Computer Society (2006)
Jeannet, B., Miné, A.: Apron: A library of numerical abstract domains for static analysis. In: Bouajjani, A., Maler, O. (eds.) CAV 2009. LNCS, vol. 5643, pp. 661–667. Springer, Heidelberg (2009)
Karr, M.: On affine relationships among variables of a program. Acta Informatica 6(2), 133–151 (1976)
Li, S., Xie, T., Tillmann, N., Moskal, M., de Halleux, J., Fahndrich, M., Burckhardt, S.: A comprehensive field study of end-user programming on mobile devices. Technical Report TR-2013-3, Microsoft Research (2013)
Mauborgne, L., Rival, X.: Trace partitioning in abstract interpretation based static analyzers. In: Sagiv, M. (ed.) ESOP 2005. LNCS, vol. 3444, pp. 5–20. Springer, Heidelberg (2005)
Tillmann, N., Moskal, M., de Halleux, J., Fahndrich, M.: Touchdevelop - programming cloud-connected mobile devices via touchscreen. Technical Report TR-2011-49, Microsoft Research (2011)
Tillmann, N., Moskal, M., de Halleux, J., Fahndrich, M., Bishop, J., Samuel, A., Xie, T.: Touchdevelop - app development on mobile devices. In: Proceedings of ITiCSE 2012. ACM (2012)
Tillmann, N., Moskal, M., de Halleux, J., Fahndrich, M., Burckhardt, S.: Touchdevelop - app development on mobile devices. In: Proceedings of FSE 2012, Demonstration. ACM (2012)
Wilhelm, R., Engblom, J., Ermedahl, A., Holsti, N., Thesing, S., Whalley, D., Bernat, G., Ferdinand, C., Heckmann, R., Mitra, T., Mueller, F., Puaut, I., Puschner, P., Staschulat, J., Stenström, P.: The worst-case execution-time problem. overview of methods and survey of tools. ACM Transactions on Embedded Computing Systems, 7(3) (2008)
Zanioli, M., Ferrara, P., Cortesi, A.: SAILS: static analysis of information leakage with Sample. In: Proceedings of SAC 2012. ACM (2012)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Ferrara, P., Schweizer, D., Brutschy, L. (2014). TouchCost: Cost Analysis of TouchDevelop Scripts. In: Gnesi, S., Rensink, A. (eds) Fundamental Approaches to Software Engineering. FASE 2014. Lecture Notes in Computer Science, vol 8411. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-54804-8_8
Download citation
DOI: https://doi.org/10.1007/978-3-642-54804-8_8
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-54803-1
Online ISBN: 978-3-642-54804-8
eBook Packages: Computer ScienceComputer Science (R0)