Understanding and Analyzing Java']Java Reflection

被引:29
|
作者
Li, Yue [1 ,3 ]
Tan, Tian [1 ,3 ]
Xue, Jingling [2 ]
机构
[1] UNSW Sydney, Sydney, NSW 2052, Australia
[2] UNSW Sydney, Sch Comp Sci & Engn, Sydney, NSW 2052, Australia
[3] Aarhus Univ, Dept Comp Sci, IT Pk,Aabogade 34, DK-8200 Aarhus N, Denmark
基金
欧盟地平线“2020”; 澳大利亚研究理事会; 欧洲研究理事会;
关键词
!text type='Java']Java[!/text] reflection; static analysis; reflection analysis; points-to analysis; POINTS-TO ANALYSIS; PRECISE; SENSITIVITY; RESOLUTION; EFFICIENT;
D O I
10.1145/3295739
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Java reflection has been widely used in a variety of applications and frameworks. It allows a software system to inspect and change the behaviour of its classes, interfaces, methods, and fields at runtime, enabling the software to adapt to dynamically changing runtime environments. However, this dynamic language feature imposes significant challenges to static analysis, because the behaviour of reflection-rich software is logically complex and statically hard to predict. As a result, existing static analysis tools either ignore reflection or handle it partially, resulting in missed, important behaviours, i.e., unsound results. Therefore, improving or even achieving soundness in static reflection analysis-an analysis that infers statically the behaviour of reflective code-will provide significant benefits to many analysis clients, such as bug detectors, security analyzers, and program verifiers. In this article, we provide a comprehensive understanding of Java reflection through examining its underlying concept, API, and real-world usage, and, building on this, we introduce a new static approach to resolving Java reflection effectively in practice. We have implemented our reflection analysis in an open-source tool, called Solar, and evaluated its effectiveness extensively with large Java programs and libraries. Our experimental results demonstrate that Solar is able to (1) resolve reflection more soundly than the state-of-the-art reflection analyses; (2) automatically and accurately identify the parts of the program where reflection is resolved unsoundly or imprecisely; and (3) guide users to iteratively refine the analysis results by using lightweight annotations until their specific requirements are satisfied.
引用
收藏
页数:50
相关论文
共 50 条
  • [31] Understanding and Finding Java']Java Decompiler Bugs
    Lu, Yifei
    Hou, Weidong
    Pan, Minxue
    Li, Xuandong
    Su, Zhendong
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2024, 8 (OOPSLA):
  • [32] Understanding Threads in an Advanced Java']Java Course
    Benaya, Tamar
    Zur, Ela
    ITICSE 2007: 12TH ANNUAL CONFERENCE ON INNOVATION & TECHNOLOGY IN COMPUTER SCIENCE EDUCATION, 2007, : 323 - 323
  • [33] Understanding the syntactic rule usage in java']java
    Qiu, Dong
    Li, Bixin
    Barr, Earl T.
    Su, Zhendong
    JOURNAL OF SYSTEMS AND SOFTWARE, 2017, 123 : 160 - 172
  • [34] JAN -: Java']Java animation for program understanding
    Löhr, KP
    Vratislavsky, A
    200S IEEE SYMPOSIUM ON HUMAN CENTRIC COMPUTING LANGUAGES AND ENVIRONMENTS, 2003, : 67 - 75
  • [35] import java.*: Understanding Java exceptions
    C/C++ Users Journal, 2001, 19 (4 SUPPL.):
  • [36] Analyzing Prerequisites of known Deserialization Vulnerabilities on Java']Java Applications
    Kreyssig, Bruno
    Bartel, Alexandre
    PROCEEDINGS OF 2024 28TH INTERNATION CONFERENCE ON EVALUATION AND ASSESSMENT IN SOFTWARE ENGINEERING, EASE 2024, 2024, : 28 - 37
  • [37] Analyzing syntactic constructs of Java']Java programs with machine learning
    Ortin, Francisco
    Facundo, Guillermo
    Garcia, Miguel
    EXPERT SYSTEMS WITH APPLICATIONS, 2023, 215
  • [38] An Approach to Analyzing Execution Preservation in Java']Java Program Refactoring
    Thi-Huong Dao
    Hong Anh Le
    Ninh Thuan Truong
    CONTEXT-AWARE SYSTEMS AND APPLICATIONS (ICCASA 2016), 2017, 193 : 101 - 110
  • [39] Java']Java reflection & smalltalk-like method dispatching
    Feigenbaum, B
    DR DOBBS JOURNAL, 2004, 29 (07): : 42 - 45
  • [40] Java reflection performance analysis using different java development
    Tudose, C. (catalin_tudose@yahoo.com), 1600, Springer Verlag (187 AISC):