ABSTRACT
We describe an approach for synthesizing data representations for concurrent programs. Our compiler takes as input a program written using concurrent relations and synthesizes a representation of the relations as sets of cooperating data structures as well as the placement and acquisition of locks to synchronize concurrent access to those data structures. The resulting code is correct by construction: individual relational operations are implemented correctly and the aggregate set of operations is serializable and deadlock free. The relational specification also permits a high-level optimizer to choose the best performing of many possible legal data representations and locking strategies, which we demonstrate with an experiment autotuning a graph benchmark.
References
- Don Batory and Jeff Thomas. P2: A lightweight DBMS generator. Journal of Intelligent Information Systems, 9: 107--123, 1997. ISSN 0925-9902. 10.1023/A:1008617930959. Google Scholar
Digital Library
- Don Batory, Gang Chen, Eric Robertson, and Tao Wang. Design wizards and visual programming environments for GenVoca generators. IEEE Transactions on Software Engineering, 26 (5): 441--452, May 2000. ISSN 0098-5589. 10.1109/32.846301. Google Scholar
Digital Library
- Nathan G. Bronson, Jared Casper, Hassan Chafi, and Kunle Olukotun. Transactional predication: high-performance concurrent sets and maps for stm. In Proceeding of the 29th ACM SIGACT-SIGOPS Symposium on Principles of Distributed Computing, PODC '10, pages 6--15, New York, NY, USA, 2010. ACM. ISBN 978-1-60558-888-9. 10.1145/1835698.1835703. Google Scholar
Digital Library
- Sigmund Cherem, Trishul Chilimbi, and Sumit Gulwani. Inferring locks for atomic sections. In Proceedings of the ACM SIGPLAN conference on Programming Language Design and Implementation, pages 304--315, New York, NY, USA, 2008. ACM. ISBN 978-1-59593-860-2. 10.1145/1375581.1375619. Google Scholar
Digital Library
- Donald Cohen and Neil Campbell. Automating relational operations on data structures. IEEE Software, 10 (3): 53--60, May 1993. 10.1109/52.210604. Google Scholar
Digital Library
- Dave Cunningham, Khilan Gudka, and Susan Eisenbach. Keep off the grass: Locking the right path for atomicity. In Laurie Hendren, editor, Compiler Construction, volume 4959 of Lecture Notes in Computer Science, pages 276--290. Springer Berlin / Heidelberg, 2008. ISBN 978-3-540-78790--. 10.1007/978-3-540--78791-4_19. Google Scholar
Digital Library
- Robert B. K. Dewar, Arthur Grand, Ssu-Cheng Liu, Jacob T. Schwartz, and Edmond Schonberg. Programming by refinement, as exemplified by the SETL representation sublanguage. ACM Transactions on Programming Languages and Systems (TOPLAS), 1 (1): 27--49, January 1979. ISSN 0164-0925. 10.1145/357062.357064. Google Scholar
Digital Library
- Pedro C. Diniz and Martin C. Rinard. Lock coarsening: Eliminating lock overhead in automatically parallelized object-based programs. Journal of Parallel and Distributed Computing, 49 (2): 218--244, 1998. ISSN 0743-7315. 10.1006/jpdc.1998.1441. Google Scholar
Digital Library
- Michael Emmi, Jeffrey S. Fischer, Ranjit Jhala, and Rupak Majumdar. Lock allocation. In Proceedings of the 34th annual ACM SIGPLAN-SIGACT symposium on Principles of Programming Languages (POPL), pages 291--296, New York, NY, USA, 2007. ACM. ISBN 1-59593-575-4. 10.1145/1190216.1190260. Google Scholar
Digital Library
- K. P. Eswaran, J. N. Gray, R. A. Lorie, and I. L. Traiger. The notions of consistency and predicate locks in a database system. Communications of the ACM, 19: 624--633, November 1976. ISSN 0001-0782. 10.1145/360363.360369. Google Scholar
Digital Library
- Richard L. Halpert, Christopher J. F. Pickett, and Clark Verbrugge. Component-based lock allocation. In Proceedings of the 16th International Conference on Parallel Architecture and Compilation Techniques, PACT '07, pages 353--364, Washington, DC, USA, 2007. IEEE Computer Society. ISBN 0-7695-2944-5. 10.1109/PACT.2007.23. Google Scholar
Digital Library
- Peter Hawkins, Alex Aiken, Kathleen Fisher, Martin Rinard, and Mooly Sagiv. Data representation synthesis. In Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pages 38--49, New York, NY, USA, 2011. ACM. ISBN 978-1-4503-0663-8. 10.1145/1993498.1993504. Google Scholar
Digital Library
- Peter Hawkins, Alex Aiken, Kathleen Fisher, Martin Rinard, and Mooly Sagiv. Reasoning about lock placements. In Proceedings of the European Symposium on Programming (ESOP), LNCS. Springer Berlin / Heidelberg, 2012. To appear. Google Scholar
Digital Library
- Maurice Herlihy, Yossi Lev, Victor Luchangco, and Nir Shavit. A provably correct scalable concurrent skip list. In Conference On Principles of Distributed Systems (OPODIS), 2006.Google Scholar
- Maurice P. Herlihy and Jeannette M. Wing. Linearizability: a correctness condition for concurrent objects. ACM Trans. Program. Lang. Syst., 12: 463--492, July 1990. ISSN 0164-0925. 10.1145/78969.78972. Google Scholar
Digital Library
- Michael Hicks, Jeffrey S. Foster, and Polyvios Pratikakis. Lock inference for atomic sections. In Workshop on Languages, Compilers and Hardware Support for Transactional Computing, 2006.Google Scholar
- Bill McCloskey, Feng Zhou, David Gay, and Eric Brewer. Autolocker: Synchronization inference for atomic sections. In Proceedings of the 33rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), pages 346--358, New York, NY, USA, 2006. ACM. ISBN 1-59593-027-2. 10.1145/1111037.1111068. Google Scholar
Digital Library
- Martin Odersky, Philippe Altherr, Vincent Cremet, Iulian Dragos, Gilles Dubochet, Burak Emir, Sean McDirmid, Stéphane Micheloud, Nikolay Mihaylov, Michel Schinz, Erik Stenman, Lex Spoon, and Matthias Zenger. An Overview of the Scala Programming Language, second edition. Technical Report LAMP-REPORT-2006-001, École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland, 2006.Google Scholar
- Edmond Schonberg, Jacob T. Schwartz, and Micha Sharir. Automatic data structure selection in SETL. In Proceedings of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), pages 197--210, New York, NY, USA, 1979. ACM. 10.1145/567752.567771. Google Scholar
Digital Library
- Ohad Shacham, Nathan Bronson, Alex Aiken, Mooly Sagiv, Martin Vechev, and Eran Yahav. Testing atomicity of composed concurrent operations. In Proceedings of the ACM International Conference on Object Oriented Programming Systems Languages and Applications (OOPSLA), pages 51--64, New York, NY, USA, 2011. ACM. ISBN 978-1-4503-0940-0. 10.1145/2048066.2048073. Google Scholar
Digital Library
- Nir Shavit and Dan Touitou. Software transactional memory. Distributed Computing, 10: 99--116, 1997. ISSN 0178-2770. 10.1007/s004460050028.Google Scholar
Cross Ref
- Yannis Smaragdakis and Don Batory. DiSTiL: A transformation library for data structures. In Conference on Domain-Specific Languages, pages 257--271, October 1997. Google Scholar
Digital Library
- Martin Vechev and Eran Yahav. Deriving linearizable fine-grained concurrent objects. In Proceedings of the ACM SIGPLAN conference on Programming Language Design and Implementation (PLDI), pages 125--135, New York, NY, USA, 2008. ACM. ISBN 978-1-59593-860-2. 10.1145/1375581.1375598. Google Scholar
Digital Library
- Yuan Zhang, Vugranam Sreedhar, Weirong Zhu, Vivek Sarkar, and Guang Gao. Minimum lock assignment: A method for exploiting concurrency among critical sections. In Languages and Compilers for Parallel Computing, volume 5335 of Lecture Notes in Computer Science, pages 141--155. Springer Berlin / Heidelberg, 2008. ISBN 978-3-540-89739-2. 10.1007/978-3-540-89740-8_10. Google Scholar
Digital Library
Index Terms
Concurrent data representation synthesis






Comments