Metric Program Synthesis

John Feser, Isil Dillig, Armando Solar-Lezama
6/13/2022
cs.PL

Official code: jfeser/symetric (4 stars, OCaml, GPL-3.0, last commit 2023-10-09).

Abstract

We present a new domain-agnostic synthesis technique for generating programs from input-output examples. Our method, called metric program synthesis, relaxes the well-known observational equivalence idea (used widely in bottom-up enumerative synthesis) into a weaker notion of observational similarity, with the goal of reducing the search space that the synthesizer needs to explore.

Show full abstract

Our method clusters programs into equivalence classes based on a distance metric and constructs a version space that compactly represents "approximately correct" programs. Then, given a "close enough" program sampled from this version space, our approach uses a distance-guided repair algorithm to find a program that exactly matches the given input-output examples. We have implemented our proposed metric program synthesis technique in a tool called SyMetric and evaluate it in three different domains considered in prior work. Our evaluation shows that SyMetric outperforms other domain-agnostic synthesizers that use observational equivalence and that it achieves results competitive with domain-specific synthesizers that are either designed for or trained on those domains.

View on arXivView PDF

Code Implementations(1)

jfeser/symetricOfficial100%
GPL-3.0
40OCaml, PythonJul 11, 20233 years agoGPL-3.0

Similar Papers

Cite this paper

@article{feser2022metric,
  title  = {Metric Program Synthesis},
  author = {John Feser and Isil Dillig and Armando Solar-Lezama},
  year   = {2022},
  eprint = {2206.06164},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2206.06164}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2206.06164.svg)](https://codeofpaper.com/paper/2206.06164)

Discussion