Equivalence by Canonicalization for Synthesis-Backed Refactoring

Author:

Lubin Justin1ORCID,Ferguson Jeremy1ORCID,Ye Kevin1ORCID,Yim Jacob1ORCID,Chasins Sarah E.1ORCID

Affiliation:

1. University of California at Berkeley, Berkeley, USA

Abstract

We present an enumerative program synthesis framework called component-based refactoring that can refactor "direct" style code that does not use library components into equivalent "combinator" style code that does use library components. This framework introduces a sound but incomplete technique to check the equivalence of direct code and combinator code called equivalence by canonicalization that does not rely on input-output examples or logical specifications. Moreover, our approach can repurpose existing compiler optimizations, leveraging decades of research from the programming languages community. We instantiated our new synthesis framework in two contexts: (i) higher-order functional combinators such as and in the statically-typed functional programming language Elm and (ii) high-performance numerical computing combinators provided by the NumPy library for Python. We implemented both instantiations in a tool called Cobbler and evaluated it on thousands of real programs to test the performance of the component-based refactoring framework in terms of execution time and output quality. Our work offers evidence that synthesis-backed refactoring can apply across a range of domains without specification beyond the input program.

Funder

NSF

Publisher

Association for Computing Machinery (ACM)

Reference119 articles.

1. M. B. S. Ahmad J. Ragan-Kelley A. Cheung and S. Kamil. 2019. Automatically Translating Image Processing Libraries to Halide. In TOG. https://doi.org/10.1145/3355089.3356549 10.1145/3355089.3356549

2. T. Akiba K. Imajo H. Iwami Y. Iwata T. Kataoka N. Takahashi M. Moskal and N. Swamy. 2013. Calibrating Research in Program Synthesis Using 72 000 Hours of Programmer Time. Microsoft Research.

3. A. Albarghouthi S. Gulwani and Z. Kincaid. 2013. Recursive Program Synthesis. In CAV.

4. F. E. Allen and J. Cocke. 1971. A Catalogue of Optimizing Transformations.

5. R. Alur P. Černý and A. Radhakrishna. 2015. Synthesis Through Unification. In CAV.

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3