Towards Generating Thread-Safe Classes Automatically

被引:2
|
作者
Wang, Haichi [1 ]
Wang, Zan [1 ]
Sun, Jun [2 ]
Liu, Shuang [1 ]
Sadiq, Ayesha [3 ]
Li, Yuan-Fang [3 ]
机构
[1] Tianjin Univ, Coll Intelligence & Comp, Tianjin, Peoples R China
[2] Singapore Management Univ, Sch Informat Syst, Singapore, Singapore
[3] Monash Univ, Clayton, Vic, Australia
基金
中国国家自然科学基金;
关键词
concurrency; thread safe class; locking policy; CONCURRENCY; EFFICIENT;
D O I
10.1145/3324884.3416625
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
The existing concurrency model for Java (or C) requires programmers to design and implement thread-safe classes by explicitly acquiring locks and releasing locks. Such a model is error-prone and is the reason for many concurrency bugs. While there are alternative models like transactional memory, manually writing locks remains prevalent in practice. In this work, we propose AutoLock, which aims to solve the problem by fully automatically generating threadsafe classes. Given a class which is assumed to be correct with sequential clients, AutoLock automatically generates a thread-safe class which is linearizable, and does it in a way without requiring a specification of the class. AutoLock takes three steps: (1) infer access annotations (i.e., abstract information on how variables are accessed and aliased), (2) synthesize a locking policy based on the access annotations, and (3) consistently implement the locking policy. AutoLock has been evaluated on a set of benchmark programs and the results show that AutoLock generates thread-safe classes effectively and could have prevented existing concurrency bugs.
引用
收藏
页码:943 / 955
页数:13
相关论文
共 50 条
  • [41] Towards automatically generating test paths for Web application testing
    Miao, Huaikou
    Qian, Zhongsheng
    Song, Bo
    TASE 2008: SECOND IFIP/IEEE INTERNATIONAL SYMPOSIUM ON THEORETICAL ASPECTS OF SOFTWARE ENGINEERING, PROCEEDINGS, 2008, : 211 - 218
  • [42] MPJ Express: Towards thread safe Java']Java HPC
    Baker, Mark
    Carpenter, Bryan
    Shafi, Aamir
    2006 IEEE INTERNATIONAL CONFERENCE ON CLUSTER COMPUTING, VOLS 1 AND 2, 2006, : 489 - +
  • [43] Towards Automatically Generating Graphical User Interfaces from openEHR Archetypes
    Schuler, Thilo
    Garde, Sebastian
    Heard, Sam
    Beale, Thomas
    UBIQUITY: TECHNOLOGIES FOR BETTER HEALTH IN AGING SOCIETIES, 2006, 124 : 221 - +
  • [44] Towards automatically generating supply chain maps from natural language text
    Wichmann, Pascal
    Brintrup, Alexandra
    Baker, Simon
    Woodall, Philip
    McFarlane, Duncan
    IFAC PAPERSONLINE, 2018, 51 (11): : 1726 - 1731
  • [45] Thread safe astronomy
    Seaman, R.
    ASTRONOMISCHE NACHRICHTEN, 2008, 329 (03) : 237 - 240
  • [46] AUTOMATICALLY A SAFE LANDING
    JEFFS, E
    ENGINEERING, 1969, 207 (5360): : 94 - &
  • [47] AUTOMATICALLY GENERATING ABSTRACTIONS FOR PLANNING
    KNOBLOCK, CA
    ARTIFICIAL INTELLIGENCE, 1994, 68 (02) : 243 - 302
  • [48] Automatically generating Construction Diary
    不详
    BAUINGENIEUR, 2018, 93 : A35 - A35
  • [49] GENERATING IC MASKS AUTOMATICALLY
    FREITAG, H
    ELECTRONICS, 1967, 40 (18): : 88 - &
  • [50] Automatically Generating Models of IT Systems
    Kovacevic, Ivan
    Gros, Stjepan
    Derek, Ante
    IEEE ACCESS, 2022, 10 : 13536 - 13554