Automatic Inference of Symbolic Permissions for Sequential Java Programs

In mainstream programming languages such as Java, a common way to enable concurrency is to manually introduce explicit concurrency constructs such as multi-threading. In multi-threaded programs, managing synchronization between threads is a complicated and challenging task for the programmers due to thread interleaving and heap interference that leads to problems such as deadlocks, data races. With these considerations in mind, access permission-based dependencies have been investigated as an alternative approach to verify the correctness of multi-threaded programs and to exploit the implicit concurrency present in sequential programs without using explicit concurrency constraints. 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 access permission-based implicit dependencies from sequential Java programs, by performing inter-procedural static analysis of the source code. Moreover, we integrate and extend an existing permission-based verification 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.

[1]  Marieke Huisman,et al.  The VerCors project: setting up basecamp , 2012, PLPV '12.

[2]  K. Rustan M. Leino,et al.  Abstract Read Permissions: Fractional Permissions without the Fractions , 2013, VMCAI 2013.

[3]  Lorna Smith,et al.  A benchmark suite for high performance Java , 2000 .

[4]  Matthew J. Parkinson,et al.  Explicit Stabilisation for Modular Rely-Guarantee Reasoning , 2010, ESOP.

[5]  Seraiah Walter Automatic Inference of Quantified Permissions by Abstract Interpretation , 2016 .

[6]  Alejandro Duran,et al.  Barcelona OpenMP Tasks Suite: A Set of Benchmarks Targeting the Exploitation of Task Parallelism in OpenMP , 2009, 2009 International Conference on Parallel Processing.

[7]  Jonathan Aldrich,et al.  Verifying correct usage of atomic blocks and typestate , 2008, OOPSLA.

[8]  John C. Reynolds,et al.  Separation logic: a logic for shared mutable data structures , 2002, Proceedings 17th Annual IEEE Symposium on Logic in Computer Science.

[9]  K. Rustan M. Leino,et al.  A Basis for Verifying Multi-threaded Programs , 2009, ESOP.

[10]  Frank Piessens,et al.  VeriFast: A Powerful, Sound, Predictable, Fast Verifier for C and Java , 2011, NASA Formal Methods.

[11]  John Tang Boyland,et al.  Checking Interference with Fractional Permissions , 2003, SAS.

[12]  Jonathan Aldrich,et al.  Practical API Protocol Checking with Access Permissions , 2009, ECOOP.

[13]  Sea Ling,et al.  Extracting Permission-Based Specifications from a Sequential Java Program , 2016, 2016 21st International Conference on Engineering of Complex Computer Systems (ICECCS).

[14]  Robert E. Strom,et al.  Typestate: A programming language concept for enhancing software reliability , 1986, IEEE Transactions on Software Engineering.

[15]  Néstor Cataño,et al.  A case study on the lightweight verification of a multi-threaded task server , 2014, Sci. Comput. Program..

[16]  Paulo Marques,et al.  Concurrency by default: using permissions to express dataflow in stateful programs , 2009, OOPSLA Companion.

[17]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.