Computer and Modernization

Previous Articles     Next Articles

JavaScript Static Slicing Tool

  

  1. (School of Software, Shanghai Jiao Tong University, Shanghai 200240, China)
  • Received:2016-01-22 Online:2016-08-18 Published:2016-08-11

Abstract: Program slicing is a traditional decomposition technique in program analysis. Program slicing is aimed to get relative codes for some target by removing unrelated codes. Program slicing is widely used in many software engineering activities such as code understanding, software testing, and program debugging. As the development of network technology, JavaScript has been widely used. However, there are few slicing tools for JavaScript. This paper proposes an algorithm for slicing JavaScript programs based on program dependence graphs, which focuses on specific features of JavaScript language. This paper also discusses the implementation of the proposed algorithm by using WALA program analysis framework. The experimental result shows the effectiveness of the proposed algorithm in the sense that the slicing tool can generate slicing codes with 70% size of original code, and also only 19% larger than the slicing generated by hand writing.

Key words: program slicing, static analysis, program debugging

CLC Number: