On Source Code Optimization for Interpreted Languages using State Models

Jorge López, Natalia Kushik, Nina Yevtushenko

Abstract

The paper is devoted to code optimization techniques with respect to various criteria. Code optimization is well studied for compiled languages; however, interpreted languages can also benefit when using optimization approaches. We provide a work in progress of how the code optimization can be effectively performed for the applications developed with the use of interpreted languages. Methods and techniques proposed in the paper rely on the use of formal models, and in particular state models. We propose some code optimization based on two different state models, namely weighted tree automata, and extended finite automata. The problem of extraction of such models is known to be hard, and in both cases we provide some recommendations of how such models can be derived for a code in an interpreted language. All the optimization techniques proposed in the paper are followed by corresponding illustrative examples.

References

  1. Villa, T., Petrenko, A., Yevtushenko, N., Mishchenko, A. and Brayton, R., 2015. Component-Based Design by Solving Language Equations. Proceedings of the IEEE, DOI: 10.1109/JPROC.2015.2450937, Volume: 103, Issue: 11, P: 2152-2167, 2015.
  2. Jones, J., 2003. Abstract syntax tree implementation idioms. In the proceedings of the 10th conference on pattern languages of programs.
  3. Nentwich, F., Jovanovic, N., Kirda, E., Kruegel, C., Vigna, G., 2007. Cross-Site Scripting Prevention with Dynamic Data Tainting and Static Analysis. In the proceedings of the Network and Distributed System Security Symposium (NDSS'07).
  4. Halfond, W. G. J.,Orso, A., 2005. AMNESIA: Analysis and Monitoring for NEutralizing SQL-injection Attacks. In the proceedings of the 20th IEEE/ACM International Conference on Automated Software Engineering. P: 174-183.
  5. Smith, R., Estan, C.,Jha, S., Kong, S., 2008. Deflating the Big Bang: Fast and Scalable Deep Packet Inspection with Extended Finite Automata. In the proceedings of the ACM SIGCOMM 2008 Conference on Data Communication, P:207-218.
  6. Ivan, I., Boja, C., Vochin, M., Nitescu, I., Toma, C., Popa, M., 2007. Using Genetic Algorithms in Software Optimization. In WSEAS'07, 6th Int. Conference on TELECOMMUNICATIONS and INFORMATICS, Dallas, Texas, USA.
  7. Stallman, R. M. and GCC Developer Community, 2009. Using The Gnu Compiler Collection: A Gnu Manual For Gcc Version 4.3.3, CreateSpace, Paramount, CA, First Edition.
  8. Bakken, S. S., Suraski, Z., Schmid, E., 2000. PHP Manual: Volume 2, iUniverse, Incorporated.
  9. Wall, L., 2000. Programming Perl, O'Reilly & Associates, Inc. 3rd edition. Sebastopol, CA, USA.
  10. Popov N., 2016 PHP Parser, URL: https://github.com/nikic/PHP-Parser, Last visited: 2016-01-14.
  11. Fülöp, Z., Vogler, H., 2009. Weighted Tree Automata and Tree Transducers, P: 313-403, Handbook of Weighted Automata, Springer, Berlin Heidelberg
  12. Giegerich, R., and Graham, S L., 1992. Code Generation - Concepts, Tools, Techniques, the proceedings of the International Workshop on Code Generation, Dagstuhl, Germany, Springer -Verlag London
Download


Paper Citation


in Harvard Style

López J., Kushik N. and Yevtushenko N. (2016). On Source Code Optimization for Interpreted Languages using State Models . In Proceedings of the 11th International Conference on Evaluation of Novel Software Approaches to Software Engineering - Volume 1: ENASE, ISBN 978-989-758-189-2, pages 282-287. DOI: 10.5220/0005917802820287


in Bibtex Style

@conference{enase16,
author={Jorge López and Natalia Kushik and Nina Yevtushenko},
title={On Source Code Optimization for Interpreted Languages using State Models},
booktitle={Proceedings of the 11th International Conference on Evaluation of Novel Software Approaches to Software Engineering - Volume 1: ENASE,},
year={2016},
pages={282-287},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0005917802820287},
isbn={978-989-758-189-2},
}


in EndNote Style

TY - CONF
JO - Proceedings of the 11th International Conference on Evaluation of Novel Software Approaches to Software Engineering - Volume 1: ENASE,
TI - On Source Code Optimization for Interpreted Languages using State Models
SN - 978-989-758-189-2
AU - López J.
AU - Kushik N.
AU - Yevtushenko N.
PY - 2016
SP - 282
EP - 287
DO - 10.5220/0005917802820287