摘要
程序切片技术可以有效地运用在程序调试之中,但因为JavaScript语言动态的特性,传统的程序切片技术难以直接运用在JavaScript程序上。本文提出一种新的动态切片技术,结合JavaScript自身的语言特性,扩展了系统依赖图对于JavaScript程序的定义,设计并实现了系统依赖图的构建算法,最后基于系统依赖图进行了程序的切片工作。实验结果表明,该技术可以有效地运用在JavaScript程序的动态程序切片中,切片结果占原程序的比重较小。
Program slicing technique can effectively facilitate program debugging,but traditional slicing technique is difficult to be directly utilized on JavaScript programs because of the dynamic feature introduced by JavaScript. In this paper,we propose a new dynamic program slicing technique. Combining with the features of Java Script,this paper extends the definition of system dependence graph for JavaScript programs and includes the design and implementation of constructing algorithm. Based on this system dependence graph,we can perform program slicing work. The experimental result shows this technique can be effectively used in slicing Java Script program and the slicing result occupies a small proportion of the original program.
出处
《计算机与现代化》
2016年第5期100-105,共6页
Computer and Modernization
基金
国家自然科学基金资助项目(61572313)