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 条
  • [41] Using Java']Java reflection to automate extension language parsing
    Parson, D
    USENIX ASSOCIATION PROCEEDINGS OF THE 2ND CONFERENCE ON DOMAIN-SPECIFIC LANGUAGES (DSL'99), 1999, : 67 - 80
  • [42] Using Java']Java reflection to automate extension language parsing
    Parson, D
    ACM SIGPLAN NOTICES, 2000, 35 (01) : 67 - 80
  • [43] Java']Java Reflection API: Revealing the Dark Side of the Mirror
    Pontes, Felipe
    Gheyi, Rohit
    Souto, Sabrina
    Garcia, Alessandro
    Ribeiro, Marcio
    ESEC/FSE'2019: PROCEEDINGS OF THE 2019 27TH ACM JOINT MEETING ON EUROPEAN SOFTWARE ENGINEERING CONFERENCE AND SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING, 2019, : 636 - 646
  • [44] Analyzing the characteristic of java objects
    Li, Junyi
    Chen, Jingyu
    Fong, Anthony S.
    Applied Mechanics and Materials, 2013, 303-306 : 2329 - 2332
  • [45] LonWorks gets Java']Java connectivity with memorandum of understanding
    不详
    CONTROL AND INSTRUMENTATION, 2000, 32 (07): : 8 - 8
  • [46] Students' Understanding of Advanced Properties of Java']Java Exceptions
    Rashkovits, Rami
    Lavy, Liana
    JOURNAL OF INFORMATION TECHNOLOGY EDUCATION-INNOVATIONS IN PRACTICE, 2012, 11 : 327 - 352
  • [47] Analyzing Conflict Predictors in Open-Source Java']Java Projects
    Accioly, Paola
    Borba, Paulo
    Silva, Leuson
    Cavalcanti, Guilherme
    2018 IEEE/ACM 15TH INTERNATIONAL CONFERENCE ON MINING SOFTWARE REPOSITORIES (MSR), 2018, : 576 - 586
  • [48] An integrated solution for testing and analyzing Java']Java applications in an industrial setting
    Wong, WE
    Li, J
    12TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE, PROCEEDINGS, 2005, : 576 - 583
  • [49] A Reflection on "An Exploratory Study on Exception Handling Bugs in Java']Java Programs"
    Ebert, Felipe
    Castor, Fernando
    Serebrenikt, Alexander
    PROCEEDINGS OF THE 2020 IEEE 27TH INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION, AND REENGINEERING (SANER '20), 2020, : 552 - 556
  • [50] Reflection Analysis for Java']Java: Uncovering More Reflective Targets Precisely
    Liu, Jie
    Li, Yue
    Tan, Tian
    Xue, Jingling
    2017 IEEE 28TH INTERNATIONAL SYMPOSIUM ON SOFTWARE RELIABILITY ENGINEERING (ISSRE), 2017, : 12 - 23