Keith J. C. Johnson, Rahul Krishnan, Thomas Reps, Loris D'Antoni
{"title":"Automating Pruning in Top-Down Enumeration for Program Synthesis Problems with Monotonic Semantics","authors":"Keith J. C. Johnson, Rahul Krishnan, Thomas Reps, Loris D'Antoni","doi":"arxiv-2408.15822","DOIUrl":null,"url":null,"abstract":"In top-down enumeration for program synthesis, abstraction-based pruning uses\nan abstract domain to approximate the set of possible values that a partial\nprogram, when completed, can output on a given input. If the set does not\ncontain the desired output, the partial program and all its possible\ncompletions can be pruned. In its general form, abstraction-based pruning\nrequires manually designed, domain-specific abstract domains and semantics, and\nthus has only been used in domain-specific synthesizers. This paper provides sufficient conditions under which a form of\nabstraction-based pruning can be automated for arbitrary synthesis problems in\nthe general-purpose Semantics-Guided Synthesis (SemGuS) framework without\nrequiring manually-defined abstract domains. We show that if the semantics of\nthe language for which we are synthesizing programs exhibits some monotonicity\nproperties, one can obtain an abstract interval-based semantics for free from\nthe concrete semantics of the programming language, and use such semantics to\neffectively prune the search space. We also identify a condition that ensures\nsuch abstract semantics can be used to compute a precise abstraction of the set\nof values that a program derivable from a given hole in a partial program can\nproduce. These precise abstractions make abstraction-based pruning more\neffective. We implement our approach in a tool, Moito, which can tackle synthesis\nproblems defined in the SemGuS framework. Moito can automate interval-based\npruning without any a-priori knowledge of the problem domain, and solve\nsynthesis problems that previously required domain-specific, abstraction-based\nsynthesizers -- e.g., synthesis of regular expressions, CSV file schema, and\nimperative programs from examples.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2024-08-28","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Programming Languages","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2408.15822","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
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.