Abstract
We present an analysis which takes as its input a sequential program, augmented with annotations indicating potential parallelization opportunities, and a sequential proof, written in separation logic, and produces a correctly-synchronized parallelized program and proof of that program. Unlike previous work, ours is not an independence analysis; we insert synchronization constructs to preserve relevant dependencies found in the sequential program that may otherwise be violated by a naive translation. Separation logic allows us to parallelize fine-grained patterns of resource-usage, moving beyond straightforward points-to analysis. Our analysis works by using the sequential proof to discover dependencies between different parts of the program. It leverages these discovered dependencies to guide the insertion of synchronization primitives into the parallelized program, and to ensure that the resulting parallelized program satisfies the same specification as the original sequential program, and exhibits the same sequential behaviour. Our analysis is built using frame inference and abduction, two techniques supported by an increasing number of separation logic tools.
Supplemental Material
- C. J. Bell, A. Appel, and D. Walker. Concurrent Separation Logic for Pipelined Parallelization. In SAS, pages 151--166, 2009. Google Scholar
Digital Library
- J. Berdine, C. Calcagno, and P. W. O'Hearn. Smallfoot: Modular automatic assertion checking with separation logic. In FMCO, pages 115--137, 2005. Google Scholar
Digital Library
- T. Bergan, O. Anderson, J. Devietti, L. Ceze, and D. Grossman. Core-Det: A Compiler and Runtime System for Deterministic Multithreaded Execution. SIGPLAN Not., 45(3):53--64, 2010. Google Scholar
Digital Library
- E. D. Berger, T. Yang, T. Liu, and G. Novark. Grace: Safe multithreaded programming for C/C++. In OOPSLA, pages 81--96, 2010. Google Scholar
Digital Library
- R. L. Bocchino, Jr., V. S. Adve, D. Dig, S. V. Adve, S. Heumann, R. Komuravelli, J. Overbey, P. Simmons, H. Sung, and M. Vakilian. A Type and Effect System for Deterministic Parallel Java. In OOPSLA, pages 91--116, 2009. Google Scholar
Digital Library
- R. Bornat, C. Calcagno, P. O'Hearn, and M. Parkinson. Permission Accounting in Separation Logic. In POPL, pages 259--270, 2005. Google Scholar
Digital Library
- M. Botincan, D. Distefano, M. Dodds, R. Griore, Naudzifiuniene, and M. Parkinson. coreStar: The Core of jStar. In Boogie, pages 65--77, 2011.Google Scholar
- M. Botincan, M. Dodds, and S. Jagannathan. Resource-Sensitive Synchronization Inference by Abduction. Technical Report 808, University of Cambridge Computer Laboratory, 2011.Google Scholar
- J. Burnim and K. Sen. Asserting and Checking Determinism for Multithreaded Programs. Commun. ACM, 53:97--105, June 2010. Google Scholar
Digital Library
- C. Calcagno, P. W. O'Hearn, and H. Yang. Local Action and Abstract Separation Logic. In LICS, pages 366--378, 2007. Google Scholar
Digital Library
- C. Calcagno, D. Distefano, P. O'Hearn, and H. Yang. Compositional Shape Analysis by Means of Bi-Abduction. In POPL, pages 289--300, 2009. Google Scholar
Digital Library
- C. Calcagno, D. Distefano, and V. Vafeiadis. Bi-abductive Resource Invariant Synthesis. In APLAS, pages 259--274, 2009. Google Scholar
Digital Library
- B. Cook, S. Magill, M. Raza, J. Simsa, and S. Singh. Making Fast Hardware with Separation Logic, 2010. Unpublished, http://cs.cmu.edu/~smagill/papers/fast-hardware.pdf.Google Scholar
- J. V. Deshmukh, G. Ramalingam, V. P. Ranganath, and K. Vaswani. Logical Concurrency Control from Sequential Proofs. In ESOP, pages 226--245, 2010. Google Scholar
Digital Library
- D. Distefano and I. Filipovic. Memory Leaks Detection in Java by Bi-abductive Inference. In FASE, pages 278--292, 2010. Google Scholar
Digital Library
- D. Distefano and M. J. Parkinson J. jStar: Towards Practical Verification for Java. In OOPSLA, pages 213--226, 2008. Google Scholar
Digital Library
- M. Dodds, S. Jagannathan, and M. J. Parkinson. Modular Reasoning for Deterministic Parallelism. In POPL, pages 259--270, 2011. Google Scholar
Digital Library
- T. Elmas, S. Qadeer, and S. Tasiran. A Calculus of Atomic Actions. In POPL, pages 2--15, 2009. Google Scholar
Digital Library
- A. Gotsman, J. Berdine, B. Cook, N. Rinetzky, and M. Sagiv. Local Reasoning for Storable Locks and Threads. In APLAS, pages 19--37, 2007. Google Scholar
Digital Library
- C. Haack, M. Huisman, and C. Hurlin. Reasoning about Java's Reentrant Locks. In APLAS, pages 171--187, 2008. Google Scholar
Digital Library
- T. Harris, J. Larus, and R. Rajwar. Transactional Memory, 2nd edition. Morgan-Claypool, 2010. Google Scholar
Digital Library
- C. A. R. Hoare and P. W. O'Hearn. Separation Logic Semantics for Communicating Processes. ENTCS, 212:3--25, 2008. Google Scholar
Digital Library
- A. Hobor, A. W. Appel, and F. Zappa Nardelli. Oracle semantics for concurrent separation logic. In ESOP, 2008. Google Scholar
Digital Library
- C. Hurlin. Automatic Parallelization and Optimization of Programs by Proof Rewriting. In SAS, pages 52--68, 2009. Google Scholar
Digital Library
- B. Jacobs and F. Piessens. Modular full functional specification and verification of lock-free data structures. Technical Report CW 551, Katholieke Universiteit Leuven, Dept. of Computer Science, 2009.Google Scholar
- K. R. M. Leino, P. Muller, and J. Smans. Deadlock-free Channels and Locks. In ESOP, pages 407--426, 2010. Google Scholar
Digital Library
- A. Navabi, X. Zhang, and S. Jagannathan. Quasi-static Scheduling for Safe Futures. In PPoPP, pages 23--32. ACM, 2008. Google Scholar
Digital Library
- P. W. O'Hearn. Resources, Concurrency and Local Reasoning. TCS, 375:271--307, 2007. Google Scholar
Digital Library
- G. Ottoni, R. Rangan, A. Stoler, and D. I. August. Automatic Thread Extraction with Decoupled Software Pipelining. In MICRO, pages 105--118, 2005. Google Scholar
Digital Library
- K. Pingali, D. Nguyen, M. Kulkarni, M. Burtscher, M. A. Hassaan, R. Kaleem, T.-H. Lee, A. Lenharth, R. Manevich, M. Mendez-Lojo, D. Prountzos, and X. Sui. The Tao of Parallelism in Algorithms. In PLDI, pages 12--25, 2011. Google Scholar
Digital Library
- M. Raza, C. Calcagno, and P. Gardner. Automatic Parallelization with Separation Logic. In ESOP, pages 348--362, 2009. Google Scholar
Digital Library
- J. C. Reynolds. Separation Logic: A Logic for Shared Mutable Data Structures. In LICS, pages 55--74, 2002. Google Scholar
Digital Library
- P. Tang, P. Tang, J. N. Zigman, and J. N. Zigman. Reducing Data Communication Overhead for DOACROSS Loop Nests. In International Conference on Supercomputing, pages 44--53, 1993. Google Scholar
Digital Library
- J. Villard, E. Lozes, and C. Calcagno. Tracking Heaps That Hop with Heap-Hop. In TACAS, pages 275--279, 2010. Google Scholar
Digital Library
Index Terms
Resource-sensitive synchronization inference by abduction
Recommendations
Resource-sensitive synchronization inference by abduction
POPL '12: Proceedings of the 39th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languagesWe present an analysis which takes as its input a sequential program, augmented with annotations indicating potential parallelization opportunities, and a sequential proof, written in separation logic, and produces a correctly-synchronized parallelized ...
Proof-Directed Parallelization Synthesis by Separation Logic
We present an analysis which takes as its input a sequential program, augmented with annotations indicating potential parallelization opportunities, and a sequential proof, written in separation logic, and produces a correctly synchronized parallelized ...
Interactive proofs in higher-order concurrent separation logic
POPL '17: Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming LanguagesWhen using a proof assistant to reason in an embedded logic -- like separation logic -- one cannot benefit from the proof contexts and basic tactics of the proof assistant. This results in proofs that are at a too low level of abstraction because they ...







Comments