Example-directed synthesis: a type-theoretic interpretation

Author:

Frankle Jonathan1,Osera Peter-Michael2,Walker David1,Zdancewic Steve3

Affiliation:

1. Princeton University, USA

2. Grinnell College, USA

3. University of Pennsylvania, USA

Abstract

Input-output examples have emerged as a practical and user-friendly specification mechanism for program synthesis in many environments. While example-driven tools have demonstrated tangible impact that has inspired adoption in industry, their underlying semantics are less well-understood: what are "examples" and how do they relate to other kinds of specifications? This paper demonstrates that examples can, in general, be interpreted as refinement types. Seen in this light, program synthesis is the task of finding an inhabitant of such a type. This insight provides an immediate semantic interpretation for examples. Moreover, it enables us to exploit decades of research in type theory as well as its correspondence with intuitionistic logic rather than designing ad hoc theoretical frameworks for synthesis from scratch. We put this observation into practice by formalizing synthesis as proof search in a sequent calculus with intersection and union refinements that we prove to be sound with respect to a conventional type system. In addition, we show how to handle negative examples, which arise from user feedback or counterexample-guided loops. This theory serves as the basis for a prototype implementation that extends our core language to support ML-style algebraic data types and structurally inductive functions. Users can also specify synthesis goals using polymorphic refinements and import monomorphic libraries. The prototype serves as a vehicle for empirically evaluating a number of different strategies for resolving the nondeterminism of the sequent calculus---bottom-up theorem-proving, term enumeration with refinement type checking, and combinations of both---the results of which classify, explain, and validate the design choices of existing synthesis systems. It also provides a platform for measuring the practical value of a specification language that combines "examples" with the more general expressiveness of refinements.

Funder

NSF

Publisher

Association for Computing Machinery (ACM)

Subject

Computer Graphics and Computer-Aided Design,Software

Reference27 articles.

1. Logic Programming with Focusing Proofs in Linear Logic

2. Intersection and Union Types: Syntax and Semantics

3. R. Davies. A practical refinement-type checker for standard ml. R. Davies. A practical refinement-type checker for standard ml.

Cited by 50 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Data Extraction via Semantic Regular Expression Synthesis;Proceedings of the ACM on Programming Languages;2023-10-16

2. Passport: Improving Automated Formal Verification Using Identifiers;ACM Transactions on Programming Languages and Systems;2023-06-26

3. Synthesizing MILP Constraints for Efficient and Robust Optimization;Proceedings of the ACM on Programming Languages;2023-06-06

4. Absynthe: Abstract Interpretation-Guided Synthesis;Proceedings of the ACM on Programming Languages;2023-06-06

5. Partial bounding for recursive function synthesis;Formal Methods in System Design;2023-05-16

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

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

www.globalauthorid.com

TOP

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