Font Size: a A A

Design And Implementation Of JavaScript Dynamic Program Slicing Technique

Posted on:2017-10-10Degree:MasterType:Thesis
Country:ChinaCandidate:J B YeFull Text:PDF
GTID:2428330590991626Subject:Software engineering
Abstract/Summary:PDF Full Text Request
JavaScript is currently one of the most popular programming languages.Due to the highly dynamic feature of JavaScript,it can be utilized in rapid development of client-side web application.However,JavaScript programs are hard for maintenance because of that reason.JavaScript programs executed in the browser need to interact with HTML code,DOM and some other interfaces provided by the browser,which make it even more difficult for programmers to debug and maintain JavaScript programs.In this paper,we design a dynamic program slicing technique on JavaScript programs,which helps programmers to debug JavaScript programs.This technique bases on the construction of JavaScript system dependence graph,which transforms the JavaScript program slicing problem into a graph reachability problem.Three types of dependence are involved in JavaScript system dependence graph: data dependence,control dependence and DOM dependence.In this dependence graph,data dependence and control dependence are common types of dependence in traditional analysis of program dependence,and analysis of dependences in both types is optimized in terms of JavaScript programs.During the execution of JavaScript programs,DOMs in the browser may interact with JavaScript objects and produce dependence relationship.Based on this feature,we propose a new type of dependence in this paper : DOM dependence and we also design an algorithm of computing DOM dependence.Combining three types of dependences,we can eventually construct a complete JavaScript system dependence graph,and user can specify some node which corresponds to a statement in a JavaScript program to perform program slicing.Based on this dynamic slicing technique,we implemented a tool for JavaScript dynamic program slicing,which is capable of slicing real world JavaScript applications.We tested 6JavaScript applications by using this tool,and three of them are real world JavaScript applications and the rest three are commonly-used JavaScript libraries.Experiment result shows that the slicing tool can efficiently perform dynamic program slicing on JavaScript programs,and the size of slicing result is only 5% of the original program.
Keywords/Search Tags:program slicing, program analysis, JavaScript
PDF Full Text Request
Related items