在具有单调语义的程序综合问题中自动化自顶向下枚举的剪枝
Automating Pruning in Top-Down Enumeration for Program Synthesis Problems with Monotonic Semantics
AI总结:
本文提出在通用SemGuS框架下,利用语言语义的单调性属性,自动从具体语义获取基于区间的抽象语义以实现自动化剪枝,无需手动设计抽象域,有效提升了程序综合的搜索效率。
摘要:
在程序综合的自顶向下枚举中,基于抽象的剪枝使用抽象域来近似部分程序在完成后对给定输入可能输出的值集合。如果该集合不包含期望的输出,则可以剪枝该部分程序及其所有可能的补全。在其一般形式中,基于抽象的剪枝需要手动设计的、特定领域的抽象域和语义,因此仅被用于特定领域的综合器。本文提供了充分条件,在此条件下,可以在通用 Semantics-Guided Synthesis (SemGuS) 框架中,对任意综合问题自动化执行一种形式的基于抽象的剪枝,而无需手动定义抽象域。我们证明,如果我们要为其综合程序的语言语义表现出某些单调性属性,就可以从编程语言的具体语义中免费获得基于区间的抽象语义,并使用这种语义有效地剪枝搜索空间。我们还确定了一个条件,该条件确保此类抽象语义可用于计算精确的抽象,该抽象是可从部分程序中给定 hole 派生的程序所能产生的值集合的抽象。这些精确的抽象使基于抽象的剪枝更加有效。我们在工具 Moito 中实现了我们的方法,该工具可以处理在 SemGuS 框架中定义的综合问题。Moito 可以在没有任何问题领域先验知识的情况下自动化基于区间的剪枝,并解决以前需要特定领域的、基于抽象的综合器的综合问题——例如,正则表达式、CSV 文件模式以及从示例中综合命令式程序。
英文摘要:
In top-down enumeration for program synthesis, abstraction-based pruning uses an abstract domain to approximate the set of possible values that a partial program, when completed, can output on a given input. If the set does not contain the desired output, the partial program and all its possible completions can be pruned. In its general form, abstraction-based pruning requires manually designed, domain-specific abstract domains and semantics, and thus has only been used in domain-specific synthesizers. This paper provides sufficient conditions under which a form of abstraction-based pruning can be automated for arbitrary synthesis problems in the general-purpose Semantics-Guided Synthesis (SemGuS) framework without requiring manually-defined abstract domains. We show that if the semantics of the language for which we are synthesizing programs exhibits some monotonicity properties, one can obtain an abstract interval-based semantics for free from the concrete semantics of the programming language, and use such semantics to effectively prune the search space. We also identify a condition that ensures such abstract semantics can be used to compute a precise abstraction of the set of values that a program derivable from a given hole in a partial program can produce. These precise abstractions make abstraction-based pruning more effective. We implement our approach in a tool, Moito, which can tackle synthesis problems defined in the SemGuS framework. Moito can automate interval-based pruning without any a-priori knowledge of the problem domain, and solve synthesis problems that previously required domain-specific, abstraction-based synthesizers -- e.g., synthesis of regular expressions, CSV file schema, and imperative programs from examples.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。