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 条
  • [31] Cyberaide Java']JavaScript: A Java']JavaScript Commodity Grid Kit
    von Laszewski, Gregor
    Wang, Fugang
    Younge, Andrew
    He, Xi
    Guo, Zhenhua
    Pierce, Marlon
    GCE: 2008 GRID COMPUTING ENVIRONMENTS WORKSHOP, 2008, : 89 - +
  • [32] State-Sensitive Points-to Analysis for the Dynamic Behavior of Java']JavaScript Objects
    Wei, Shiyi
    Ryder, Barbara G.
    ECOOP 2014 - OBJECT-ORIENTED PROGRAMMING, 2014, 8586 : 1 - 26
  • [33] Fast and Precise Hybrid Type Inference for Java']JavaScript
    Hackett, Brian
    Guo, Shu-yu
    ACM SIGPLAN NOTICES, 2012, 47 (06) : 239 - 249
  • [34] Improving Java']JavaScript Performance by Deconstructing the Type System
    Ahn, Wonsun
    Choi, Jiho
    Shull, Thomas
    Garzaran, Maria J.
    Torrellas, Josep
    ACM SIGPLAN NOTICES, 2014, 49 (06) : 496 - 507
  • [35] Towards a type system for analyzing Java']JavaScript programs
    Thiemann, P
    PROGRAMMING LANGUAGES AND SYSTEMS, PROCEEDINGS, 2005, 3444 : 408 - 422
  • [36] Learning analysis of mobile Java']JavaScript frameworks
    Brito, Hugo
    Santos, Alvaro
    Bernardino, Jorge
    Gomes, Anabela
    2019 14TH IBERIAN CONFERENCE ON INFORMATION SYSTEMS AND TECHNOLOGIES (CISTI), 2019,
  • [37] Analysis and Identification of Malicious Java']JavaScript Code
    Fraiwan, Mohammad
    Al-Salman, Rami
    Khasawneh, Natheer
    Conrad, Stefan
    INFORMATION SECURITY JOURNAL, 2012, 21 (01): : 1 - 11
  • [38] Conventionality Analysis of Array Objects in Java']JavaScript
    Younang, Astrid
    Lu, Lunjin
    2017 IEEE 24TH INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION, AND REENGINEERING (SANER), 2017, : 561 - 562
  • [39] Fixpoint Reuse for Incremental Java']JavaScript Analysis
    Nichols, Lawton
    Emre, Mehmet
    Hardekopf, Ben
    SOAP'19: PROCEEDINGS OF THE 8TH ACM SIGPLAN INTERNATIONAL WORKSHOP ON STATE OF THE ART IN PROGRAM ANALYSIS, 2019, : 2 - 7
  • [40] CSRF protection in Java']JavaScript frameworks and the security of Java']JavaScript applications
    Peguero, Ksenia
    Cheng, Xiuzhen
    HIGH-CONFIDENCE COMPUTING, 2021, 1 (02):