Synthesizing iterators from abstraction functions Article (Web of Science)

abstract

  • 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.

authors

  • Rayside, Derek
  • Montaghami, Vajihollah
  • Leung, Francesca
  • Yuen, Albert
  • Xu, Kevin S
  • Jackson, Daniel

publication date

  • 2013

published in

number of pages

  • 9

start page

  • 31

end page

  • 40

volume

  • 48

issue

  • 3