TypeDevil: Dynamic Type Inconsistency Analysis for Java']JavaScript

被引:48
|
作者
Pradel, Michael [1 ,2 ]
Schuh, Parker [1 ]
Sen, Koushik [1 ]
机构
[1] Univ Calif Berkeley, Dept EECS, Berkeley, CA 94720 USA
[2] Tech Univ Darmstadt, Dept Comp Sci, Darmstadt, Germany
关键词
D O I
10.1109/ICSE.2015.51
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Dynamic languages, such as JavaScript, give programmers the freedom to ignore types, and enable them to write concise code in short time. Despite this freedom, many programs follow implicit type rules, for example, that a function has a particular signature or that a property has a particular type. Violations of such implicit type rules often correlate with problems in the program. This paper presents TypeDevil, a mostly dynamic analysis that warns developers about inconsistent types. The key idea is to assign a set of observed types to each variable, property, and function, to merge types based in their structure, and to warn developers about variables, properties, and functions that have inconsistent types. To deal with the pervasiveness of polymorphic behavior in real-world JavaScript programs, we present a set of techniques to remove spurious warnings and to merge related warnings. Applying TypeDevil to widely used benchmark suites and real-world web applications reveals 15 problematic type inconsistencies, including correctness problems, performance problems, and dangerous coding practices.
引用
下载
收藏
页码:314 / 324
页数:11
相关论文
共 50 条
  • [1] TypeDevil: Dynamic type inconsistency analysis for javascript
    EECS Department, University of California, Berkeley
    CA, United States
    不详
    Proc Int Conf Software Eng, (314-324):
  • [2] Type Analysis for Java']JavaScript
    Jensen, Simon Holm
    Moller, Anders
    Thiemann, Peter
    STATIC ANALYSIS, 2009, 5673 : 238 - +
  • [3] Dynamic Flow Analysis for Java']JavaScript
    Naus, Nico
    Thiemann, Peter
    TRENDS IN FUNCTIONAL PROGRAMMING (TFP 2016), 2019, 10447 : 75 - 93
  • [4] Dynamic Analysis Using Java']JavaScript Proxies
    Christophe, Laurent
    De Roover, Coen
    De Meuter, Wolfgang
    2015 IEEE/ACM 37TH IEEE INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, VOL 2, 2015, : 813 - 814
  • [5] An Analysis of the Dynamic Behavior of Java']JavaScript Programs
    Richards, Gregor
    Lebresne, Sylvain
    Burg, Brian
    Vitek, Jan
    ACM SIGPLAN NOTICES, 2010, 45 (06) : 1 - 12
  • [6] JS']JSFox: Integrating Static and Dynamic Type Analysis of Java']JavaScript Programs
    Tan, Tian Huat
    Xue, Yinxing
    Chen, Manman
    Liu, Shuang
    Yu, Yi
    Sun, Jun
    PROCEEDINGS OF THE 2017 IEEE/ACM 39TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING COMPANION (ICSE-C 2017), 2017, : 256 - 258
  • [7] Type Refinement for Static Analysis of Java']JavaScript
    Kashyap, Vineeth
    Sarracino, John
    Wagner, John
    Wiedermann, Ben
    Hardekopf, Ben
    ACM SIGPLAN NOTICES, 2014, 49 (02) : 17 - 26
  • [8] A Survey of Dynamic Analysis and Test Generation for Java']JavaScript
    Andreasen, Esben
    Gong, Liang
    Moller, Anders
    Pradel, Michael
    Selakovic, Marija
    Sen, Koushik
    Staicu, Cristian-Alexandru
    ACM COMPUTING SURVEYS, 2017, 50 (05)
  • [9] AUGUR: Dynamic Taint Analysis for Asynchronous Java']JavaScript
    Aldrich, Mark W.
    Turcotte, Alexi
    Blanco, Matthew
    Tip, Frank
    PROCEEDINGS OF THE 37TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING, ASE 2022, 2022,
  • [10] Type Checking for Java']JavaScript
    Anderson, Christopher
    Giannini, Paola
    ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2005, 138 (02) : 37 - 58