Synthesizing Iterators from Abstraction Functions
Author(s)
Rayside, Derek; Motaghami, Vajihollah; Leung, Francesca; Yuen, Albert; Xu, Kevin; Jackson, Daniel; ... Show more Show less
DownloadJackson_Synthesizing iterators.pdf (324.2Kb)
OPEN_ACCESS_POLICY
Open Access Policy
Creative Commons Attribution-Noncommercial-Share Alike
Terms of use
Metadata
Show full item recordAbstract
A technique for synthesizing iterators from declarative abstraction functions written in a relational logic specification language is described. The logic includes a transitive closure operator that makes it convenient for expressing reachability queries on linked data structures. Some optimizations, including tuple elimination, iterator flattening, and traversal state reduction, are used to improve performance of the generated iterators.
A case study demonstrates that most of the iterators in the widely used JDK Collections classes can be replaced with code synthesized from declarative abstraction functions. These synthesized iterators perform competitively with the hand-written originals.
In a user study the synthesized iterators always passed more test cases than the hand-written ones, were almost always as efficient, usually took less programmer effort, and were the qualitative preference of all participants who provided free-form comments.
Date issued
2012-09Department
Massachusetts Institute of Technology. Computer Science and Artificial Intelligence Laboratory; Massachusetts Institute of Technology. Department of Electrical Engineering and Computer ScienceJournal
Proceedings of the 11th International Conference on Generative Programming and Component Engineering (GPCE '12)
Publisher
Association for Computing Machinery (ACM)
Citation
Derek Rayside, Vajihollah Montaghami, Francesca Leung, Albert Yuen, Kevin Xu, and Daniel Jackson. 2012. Synthesizing iterators from abstraction functions. In Proceedings of the 11th International Conference on Generative Programming and Component Engineering (GPCE '12). ACM, New York, NY, USA, 31-40.
Version: Author's final manuscript
ISBN
978-1-4503-1129-8