计算机与现代化

• 应用与开发 • 上一篇    下一篇

JavaScript程序动态切片技术的研究

  

  1. 上海交通大学软件学院,上海200240
  • 收稿日期:2015-11-09 出版日期:2016-05-24 发布日期:2016-05-25
  • 作者简介:叶家彬(1991-),男,浙江宁波人,上海交通大学软件学院硕士研究生,研究方向:程序分析与测试; 于海波,女,讲师,研究方向:语义网,个人信息管理,信息检索,多智能体应用。
  • 基金资助:
    国家自然科学基金资助项目(61572313)

Research on Dynamic Slicing Technique of JavaScript Programs

  1. School of Software, Shanghai Jiao Tong University, Shanghai 200240, China
  • Received:2015-11-09 Online:2016-05-24 Published:2016-05-25

摘要: 程序切片技术可以有效地运用在程序调试之中,但因为JavaScript语言动态的特性,传统的程序切片技术难以直接运用在JavaScript程序上。本文提出一种新的动态切片技术,结合JavaScript自身的语言特性,扩展了系统依赖图对于JavaScript程序的定义,设计并实现了系统依赖图的构建算法,最后基于系统依赖图进行了程序的切片工作。实验结果表明,该技术可以有效地运用在JavaScript程序的动态程序切片中,切片结果占原程序的比重较小。

关键词: 程序切片, JavaScript, 动态分析, 程序调试

Abstract: 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 JavaScript, 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 JavaScript program and the slicing result occupies a small proportion of the original program.

Key words: program slicing, JavaScript, dynamic analysis, program debugging

中图分类号: