Is This Class Thread-Safe? Inferring Documentation using Graph-Based Learning

被引:6
|
作者
Habib, Andrew [1 ]
Pradel, Michael [1 ]
机构
[1] Tech Univ Darmstadt, Dept Comp Sci, Darmstadt, Germany
来源
PROCEEDINGS OF THE 2018 33RD IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMTED SOFTWARE ENGINEERING (ASE' 18) | 2018年
关键词
inferring documentation; thread-safe class; graph-based learning; SPECIFICATIONS; EFFICIENT; KERNELS;
D O I
10.1145/3238147.3238212
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Thread-safe classes are pervasive in concurrent, object-oriented software. However, many classes lack documentation regarding their safety guarantees under multi-threaded usage. This lack of documentation forces developers who use a class in a concurrent program to either carefully inspect the implementation of the class, to conservatively synchronize all accesses to it, or to optimistically assume that the class is thread-safe. To overcome the lack of documentation, we present TSFinder, an approach to automatically classify classes as supposedly thread-safe or thread-unsafe. The key idea is to combine a lightweight static analysis that extracts a graph representation from classes with a graph-based classifier. After training the classifier with classes known to be thread-safe and thread-unsafe, it achieves an accuracy of 94.5% on previously unseen classes, enabling the approach to infer thread safety documentation with high confidence. The classifier takes about 3 seconds per class, i.e., it is efficient enough to infer documentation for many classes.
引用
收藏
页码:41 / 52
页数:12
相关论文
共 50 条
  • [1] Memory-efficient and thread-safe quasi-destructive graph unification
    van Lohuizen, MP
    38TH ANNUAL MEETING OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS, PROCEEDINGS OF THE CONFERENCE, 2000, : 352 - 359
  • [2] Thread-Safe Dynamic Binary Translation using Transactional Memory
    Chung, JaeWoong
    Dalton, Michael
    Kannan, Hari
    Kozyrakis, Christos
    2008 IEEE 14TH INTERNATIONAL SYMPOSIUM ON HIGH PEFORMANCE COMPUTER ARCHITECTURE, 2008, : 256 - 266
  • [3] Architectural aspects of a thread-safe graphical component system based on Aos
    Frey, TM
    MODULAR PROGRAMMING LANGUAGES, PROCEEDINGS, 2003, 2789 : 188 - 191
  • [4] GRAPH-BASED CLASS TESTING
    HOFFMAN, D
    STROOPER, P
    AUSTRALIAN COMPUTER JOURNAL, 1994, 26 (04): : 158 - 163
  • [5] Graph-Based Class-Imbalance Learning With Label Enhancement
    Du, Guodong
    Zhang, Jia
    Jiang, Min
    Long, Jinyi
    Lin, Yaojin
    Li, Shaozi
    Tan, Kay Chen
    IEEE TRANSACTIONS ON NEURAL NETWORKS AND LEARNING SYSTEMS, 2023, 34 (09) : 6081 - 6095
  • [6] Accurate Graph-Based PU Learning without Class Prior
    Yoo, Jaemin
    Kim, Junghun
    Yoon, Hoyoung
    Kim, Geonsoo
    Jang, Changwon
    Kang, U.
    2021 21ST IEEE INTERNATIONAL CONFERENCE ON DATA MINING (ICDM 2021), 2021, : 827 - 836
  • [7] A Thread-Safe Communication Mechanism for Message-Passing Interface based on MPI Standard
    Gomes Junior, Augusto Mendes
    Kakugawa, Fernando Ryoji
    Bianchini, Calebe de Paula
    Massetto, Francisco Isidro
    JCPC: 2009 JOINT CONFERENCE ON PERVASIVE COMPUTING, 2009, : 173 - +
  • [8] Towards graph-based class-imbalance learning for hospital readmission
    Du, Guodong
    Zhang, Jia
    Ma, Fenglong
    Zhao, Min
    Lin, Yaojin
    Li, Shaozi
    EXPERT SYSTEMS WITH APPLICATIONS, 2021, 176 (176)
  • [9] Graph-based Relational Learning
    NEC Laboratories Europe GmbH, Germany
    不详
    不详
    不详
    NEC Tech. J., 1 (101-105):
  • [10] Graph-based semisupervised learning
    Culp, Mark
    Michailidis, George
    IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, 2008, 30 (01) : 174 - 179