Synthesizing Concurrent Graph Data Structures: A Case Study R. Manevich, R. Kaleem, and K. Pingali The University of Texas as Austin, roman@ices.utexas.edu, {rashid,pingali}@cs.utexas.edu Abstract. In this paper, we describe our experience with Autograph — a compiler for synthesizing concurrent graph data structure implemen- tations in Java. The input to Autograph is a high-level declarative spec- ification of an abstract data type (ADT), expressed in terms of relations and relational operations. The output is a concurrent implementation of that ADT with conflict detection and rollback baked in. Autograph also provides application programmers with a high-level constraint language for tuning the performance of the generated implementation. We present a case study in which we use Autograph to synthesize a parallel graph data structure for a parallel implementation of Boruvka’s minimal spanning tree algorithm taken from the Lonestar benchmark suite. In particular, we discuss a number of techniques used to specialize the graph data structure implementation for the application and the performance benefit from these specializations. Our results show that these techniques improve overall performance by 38% when compared to a library implementation in the Lonestar benchmark suite, and produce an implementation that runs as fast as a handwritten version of this benchmark that uses fine-grain locking. 1 Introduction One of the more formidable challenges in parallel programming is the implemen- tation of efficient parallel data structures. An easy way to build a parallel data structure is to use a single lock but this usually comes in the way of getting good parallel performance; conversely, fine-grain locking may give good perfor- mance but ensuring correctness of such implementations is usually very difficult. The implementation of efficient parallel data structures is even more complex in systems that use optimistic parallelization, such as the Galois system [5] and boosted transactional memory systems [8]. In these systems, the ADT imple- mentation is responsible for detecting conflicts between concurrently executing computations, and for handling a conflict by rolling back some of the conflict- ing computations so that others can make progress. There are many approaches to detecting conflicts, such as commutativity conditions and abstract locks, and many ways of handling conflicts, such as undo actions, but all of them complicate the job of the data structure implementor substantially. At present, these problems are addressed by hiring expert programmers to implement libraries of parallel data structures. These libraries usually have just a