JSSpe: A Symbolic Partial Evaluator for JavaScript
Abstract
Currently, JavaScript is one of the mostly used programming languages for Web and Mobile platforms. This brings a large demand for optimization and smarter resource allocation of the applications written in JavaScript. Partial evaluation is a program transformation technique which rewrites a program by evaluating it with respect to its known variables. Recently, Facebook proposed Prepack: A partial evaluator for JavaScript which will make original program shorter and faster by performing both concrete and symbolic evaluation (concolic evaluation). Although it is proposed as a planned improvement, symbolic evaluation engine currently does not implement an SMT solver. In this work, a JavaScript symbolic partial evaluator (JSSpe) is designed using Babel plugin and it is connected to the Microsoft-Z3 SMT solver to investigate its contribution to its performance. Several test scenarios are experimented in order to show the performance enhancements through using an SMT solver in partial evaluator design.