Publication Type

Conference Proceeding Article

Version

publishedVersion

Publication Date

9-2020

Abstract

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 thread-safe 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.

Keywords

concurrency, locking policy, thread safe class

Discipline

Software Engineering

Research Areas

Software and Cyber-Physical Systems

Publication

2020 35th IEEE/ACM International Conference on Automated Software Engineering (ASE): Virtual, September 21-25: Proceedings

First Page

943

Last Page

955

ISBN

9781450367684

Identifier

10.1145/3324884.3416625

Publisher

ACM

City or Country

New York

Embargo Period

5-17-2021

Copyright Owner and License

Publisher

Additional URL

https://doi.org/10.1145/3324884.3416625

Share

COinS