Sip4J: Statically inferring permission-based specifications for sequential Java programs

02/14/2019
by   Ayesha Sadiq, et al.
0

In mainstream programming languages such as Java, a common way to enable concurrency is to manually introduce explicit concurrency constructs such as multi-threading. Given the intricacies in creating these constructs, it is very likely for a programmer to omit important dependencies (constraints) or to create wrong or misspelled specifications that may lead to problems such as race conditions and deadlocks. With these considerations in mind, access permission-based dependencies have been investigated as an alternative approach to formally verify the correctness of multi-threaded programs and to exploit the implicit concurrency present in sequential programs. Access permissions are abstract capabilities that model read and write effects of a reference on a referenced object in the presence or absence of aliases. However, significant annotation overhead can arise from manually adding permission-based specifications in a source program, diminishing the effectiveness of existing permission-based approaches. In this paper, we present a framework, Sip4J to automatically extract implicit dependencies from sequential Java programs in the form of access permissions, by performing inter-procedural static analysis of the source code. We have integrated an existing tool Pulse to automatically verify correctness of the inferred specifications and to reason about their concurrent behaviors. Our evaluation on some widely-used benchmarks gives strong evidence of the correctness of the inferred annotations and their effectiveness in enabling concurrency in sequential programs.

READ FULL TEXT
research
02/13/2018

A Concurrent Constraint Programming Interpretation of Access Permissions

A recent trend in object oriented (OO) programming languages is the use ...
research
05/07/2022

Can We Run in Parallel? Automating Loop Parallelization for TornadoVM

With the advent of multi-core systems, GPUs and FPGAs, loop parallelizat...
research
01/29/2020

Concise Read-Only Specifications for Better Synthesis of Programs with Pointers – Extended Version

In program synthesis there is a well-known trade-off between concise and...
research
06/21/2023

Automatic Inference of Resource Leak Specifications

A resource leak occurs when a program fails to free some finite resource...
research
11/09/2017

Active Learning of Points-To Specifications

When analyzing programs, large libraries pose significant challenges to ...
research
03/11/2022

Veracity: Declarative Multicore Programming with Commutativity

There is an ongoing effort to provide programming abstractions that ease...
research
07/28/2023

Error Localization for Sequential Effect Systems (Extended Version)

We describe a new concrete approach to giving predictable error location...

Please sign up or login with your details

Forgot password? Click here to reset