arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1909.12795cs.PL
收藏

JavaScript静态分析中不精确原因的自动追踪

Automatically Tracing Imprecision Causes in JavaScript Static Analysis

Hongki Lee, Changhee Park, Sukyoung Ryu

摘要:

研究人员开发了各种技术来静态分析JavaScript,以提高分析精度。为了开发这种技术,他们首先确定未经证实的属性的精度损失的原因。虽然大多数现有工作已经通过人工调查诊断出静态分析中不精确的主要原因,但人工追踪不精确原因是具有挑战性的,因为它需要分析仪内部的详细知识。最近,一些研究提出了自动定位分析不精确的原因,但这些定位技术只适用于特定的分析技术。在本文中,我们提出了一种自动技术,可以跟踪分析不精确的原因,JavaScript应用程序从用户选择的变量。给定一组程序变量,当任何变量得到不精确的分析值时,我们的技术停止分析。然后,它使用中间分析结果将不精确的分析值追溯到不精确首次开始的程序点。我们的技术显示了跟踪信息与一个新的表示称为跟踪图,其节点和边缘一起表示从不精确点到精确点的轨迹。为了自动检测分析不精确的主要原因,我们提出了四个节点/边模式跟踪图常见的不精确的原因。我们形式化了生成跟踪图和识别模式的技术,并在SAFE上实现了它们,SAFE是一个最先进的JavaScript静态分析器,具有各种分析配置,如上下文敏感性,循环敏感性和堆克隆。我们的评估表明,该技术可以很容易地找到96%的主要原因的不精确的问题,在17个应用程序中,只有自动检测跟踪图使用的模式,并有选择地采用各种先进的技术,可以消除发现的原因不精确。

英文摘要:

Researchers have developed various techniques for static analysis of JavaScript to improve analysis precision. To develop such techniques, they first identify causes of the precision losses for unproven properties. While most of the existing work has diagnosed main causes of imprecision in static analysis by manual investigation, manually tracing the imprecision causes is challenging because it requires detailed knowledge of analyzer internals. Recently, several studies proposed to localize the analysis imprecision causes automatically, but these localization techniques work for only specific analysis techniques. In this paper, we present an automatic technique that can trace analysis imprecision causes of JavaScript applications starting from user-selected variables. Given a set of program variables, our technique stops an analysis when any of the variables gets imprecise analysis values. It then traces the imprecise analysis values using intermediate analysis results back to program points where the imprecision first started. Our technique shows the trace information with a new representation called tracing graphs, whose nodes and edges together represent traces from imprecise points to precise points. In order to detect major causes of analysis imprecision automatically, we present four node/edge patterns in tracing graphs for common imprecision causes. We formalized the technique of generating tracing graphs and identifying patterns, and implemented them on SAFE, a state-of-the-art JavaScript static analyzer with various analysis configurations, such as context-sensitivity, loop-sensitivity, and heap cloning. Our evaluation demonstrates that the technique can easily find 96 % of the major causes of the imprecision problems in 17 applications by only automatic detection in tracing graphs using the patterns, and selectively adopting various advanced techniques can eliminate the found causes of imprecision.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑