Specification-Guided Component-Based Synthesis from Effectful Libraries

09/06/2022
by   Ashish Mishra, et al.
0

Component-based synthesis seeks to build programs using the APIs provided by a set of libraries. Oftentimes, these APIs have effects, which make it challenging to reason about the correctness of potential synthesis candidates. This is because changes to global state made by effectful library procedures affect how they may be composed together, yielding an intractably large search space that can confound typical enumerative synthesis techniques. If the nature of these effects are exposed as part of their specification, however, deductive synthesis approaches can be used to help guide the search for components. In this paper, we present a new specification-guided synthesis procedure that uses Hoare-style pre- and post-conditions to express fine-grained effects of potential library component candidates to drive a bi-directional synthesis search strategy. The procedure alternates between a forward search process that seeks to build larger terms given an existing context but which is otherwise unaware of the actual goal, alongside a backward search mechanism that seeks terms consistent with the desired goal but which is otherwise unaware of the context from which these terms must be synthesized. To further improve efficiency and scalability, we integrate a conflict-driven learning procedure into the synthesis algorithm that provides a semantic characterization of previously encountered unsuccessful search paths that is used to prune the space of possible candidates as synthesis proceeds. We have implemented our ideas in a tool called Cobalt and demonstrate its effectiveness on a number of challenging synthesis problems defined over OCaml libraries equipped with effectful specifications.

READ FULL TEXT
research
06/18/2021

Leveraging Language to Learn Program Abstractions and Search Heuristics

Inductive program synthesis, or inferring programs from examples of desi...
research
11/21/2017

Program Synthesis using Conflict-Driven Learning

We propose a new conflict-driven program synthesis technique that is cap...
research
08/10/2021

Data-Driven Abductive Inference of Library Specifications

Programmers often leverage data structure libraries that provide useful ...
research
02/13/2018

Reconciling Enumerative and Symbolic Search in Syntax-Guided Synthesis

Syntax-guided synthesis aims to find a program satisfying semantic speci...
research
11/11/2019

Program Synthesis by Type-Guided Abstraction Refinement

We consider the problem of type-directed component based synthesis where...
research
11/29/2022

Top-Down Synthesis for Library Learning

This paper introduces corpus-guided top-down synthesis as a mechanism fo...
research
07/14/2020

Dependency-based Compositional Synthesis (Full Version)

Despite many recent advances, reactive synthesis is still not really a p...

Please sign up or login with your details

Forgot password? Click here to reset