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 条
  • [41] RATA: Rapid Atomic Type Analysis by Abstract Interpretation - Application to Java']JavaScript Optimization
    Logozzo, Francesco
    Venter, Herman
    COMPILER CONSTRUCTION, PROCEEDINGS, 2010, 6011 : 66 - 83
  • [42] WEB BASED DYNAMIC MODELING BY MEANS OF PHP AND JAVA']JAVASCRIPT
    Valek, Jan
    Sladek, Petr
    INFORMATION AND COMMUNICATION TECHNOLOGY IN EDUCATION, 2012, : 291 - 301
  • [43] Evaluation and Comparison of Dynamic Call Graph Generators for Java']JavaScript
    Herczeg, Zoltan
    Loki, Gabor
    PROCEEDINGS OF THE 14TH INTERNATIONAL CONFERENCE ON EVALUATION OF NOVEL APPROACHES TO SOFTWARE ENGINEERING (ENASE), 2019, : 472 - 479
  • [44] Designing with Java']JavaScript: Creating dynamic Web pages.
    Brooks, TA
    JOURNAL OF THE AMERICAN SOCIETY FOR INFORMATION SCIENCE AND TECHNOLOGY, 2002, 53 (11): : 967 - 968
  • [45] The Essence of Java']JavaScript
    Guha, Arjun
    Saftoiu, Claudiu
    Krishnamurthi, Shriram
    ECOOP 2010: OBJECT-ORIENTED PROGRAMMING, 2010, 6183 : 126 - 150
  • [46] Java']JavaScript.
    Gillespie, T
    LIBRARY JOURNAL, 2000, 125 (13) : 146 - 146
  • [47] The Java']JavaScript Ecosystem
    Frankston, Bob
    IEEE CONSUMER ELECTRONICS MAGAZINE, 2020, 9 (06) : 84 - 89
  • [48] Java']Javanni: A Verifier for Java']JavaScript
    Nordio, Martin
    Calcagno, Cristiano
    Furia, Carlo Alberto
    FUNDAMENTAL APPROACHES TO SOFTWARE ENGINEERING, FASE 2013, 2013, 7793 : 231 - 234
  • [49] Java与Javascript
    张光业
    微电脑世界, 1996, (11) : 62 - 65
  • [50] Java']JavaScript fix
    Burge, MH
    DR DOBBS JOURNAL, 1996, 21 (08): : 12 - 12