Fast synthesis of fast collections

Many applications require specialized data structures not found in the standard libraries, but implementing new data structures by hand is tedious and error-prone. This paper presents a novel approach for synthesizing efficient implementations of complex collection data structures from high-level specifications that describe the desired retrieval operations. Our approach handles a wider range of data structures than previous work, including structures that maintain an order among their elements or have complex retrieval methods. We have prototyped our approach in a data structure synthesizer called Cozy. Four large, real-world case studies compare structures generated by Cozy against handwritten implementations in terms of correctness and performance. Structures synthesized by Cozy match the performance of handwritten data structures while avoiding human error.

[1]  D. Batory,et al.  Implementing a Domain Model for Data Structures 1 , 2 , 1992 .

[2]  Rajeev Alur,et al.  TRANSIT: specifying protocols with concolic snippets , 2013, PLDI.

[3]  Jacob T. Schwartz,et al.  Automatic data structure choice in a language of very high level , 1975, CACM.

[4]  Rishabh Singh,et al.  Synthesizing data structure manipulations from storyboards , 2011, ESEC/FSE '11.

[5]  Armando Solar-Lezama,et al.  Program synthesis by sketching , 2008 .

[6]  Sanjit A. Seshia,et al.  Combinatorial sketching for finite programs , 2006, ASPLOS XII.

[7]  Milos Nikolic,et al.  DBToaster: Higher-order Delta Processing for Dynamic, Frequently Fresh Views , 2012, Proc. VLDB Endow..

[8]  Sarfraz Khurshid,et al.  Test generation through programming in UDITA , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[9]  Fritz Henglein,et al.  Type Transformation and Data Structure Choice , 2009 .

[10]  Isil Dillig,et al.  Synthesizing data structure transformations from input-output examples , 2015, PLDI.

[11]  Amir Shaikhha,et al.  DBToaster: higher-order delta processing for dynamic, frequently fresh views , 2012, The VLDB Journal.

[12]  Jeffrey Heer,et al.  Perfopticon: Visual Query Analysis for Distributed Databases , 2015, Comput. Graph. Forum.

[13]  Micha Sharir,et al.  An Automatic Technique for Selection of Data Representations in SETL Programs , 1981, TOPL.

[14]  Alexander Aiken,et al.  Concurrent data representation synthesis , 2012, PLDI.

[15]  Eran Yahav,et al.  Chameleon: adaptive selection of collections , 2009, PLDI '09.

[16]  Alexander Aiken,et al.  Data representation synthesis , 2011, PLDI '11.

[17]  Jeffrey D. Ullman,et al.  Induction variables in very high level languages , 1976, POPL.

[18]  Darko Marinov,et al.  Automated testing of refactoring engines , 2007, ESEC-FSE '07.

[19]  J. Earley High level operations in automatic programming , 1974, SIGPLAN Symposium on Very High Level Languages.

[20]  Jay Earley,et al.  High Level Iterators and a Method for Automatically Designing Data Structure Representation , 1976, Comput. Lang..

[21]  Surajit Chaudhuri,et al.  An Efficient Cost-Driven Index Selection Tool for Microsoft SQL Server , 1997, VLDB.

[22]  Don S. Batory,et al.  Implementing a Domain Model for Data Structures , 1992, Int. J. Softw. Eng. Knowl. Eng..

[23]  Sarfraz Khurshid,et al.  Korat: automated testing based on Java predicates , 2002, ISSTA '02.

[24]  Yannis Smaragdakis,et al.  DiSTiL: A Transformation Library for Data Structures , 1997, DSL.

[25]  Emina Torlak,et al.  Optimizing synthesis with metasketches , 2016, POPL.

[26]  Robert Paige,et al.  Finite Differencing of Computable Expressions , 1982, TOPL.

[27]  Don S. Batory,et al.  Software components in a data structure precompiler , 1992, Proceedings of 1993 15th International Conference on Software Engineering.

[28]  Nikolaj Bjørner,et al.  Z3: An Efficient SMT Solver , 2008, TACAS.

[29]  Sarfraz Khurshid,et al.  TestEra: a novel framework for automated testing of Java programs , 2001, Proceedings 16th Annual International Conference on Automated Software Engineering (ASE 2001).

[30]  Surajit Chaudhuri,et al.  Automated Selection of Materialized Views and Indexes in SQL Databases , 2000, VLDB.