The SyGuS Language Standard Version 2.1

Saswat Padhi,Elizabeth Polgreen,Mukund Raghothaman,Andrew Reynolds,Abhishek Udupa
DOI: https://doi.org/10.48550/arXiv.2312.06001
2023-12-11
Abstract:The classical formulation of the program-synthesis problem is to find a program that meets a correctness specification given as a logical formula. Syntax-guided synthesis (SyGuS) is a standardized format for specifying the correctness specification with a syntactic template that constrains the space of allowed implementations. The input to SyGuS consists of a background theory, a semantic correctness specification for the desired program given by a logical formula, and a syntactic set of candidate implementations given by a grammar. The computational problem then is to find an implementation from the set of candidate expressions that satisfies the specification in the given theory. The formulation of the problem builds on SMT-LIB. This document defines the SyGuS 2.1 standard, which is intended to be used as the standard input and output language for solvers targeting the syntax-guided synthesis problem. It borrows many concepts and language constructs from the standard format for Satisfiability Modulo Theories (SMT) solvers, the SMT-LIB 2.6 standard.
Programming Languages
What problem does this paper attempt to address?
The problem that this paper attempts to solve is to define and standardize a language for specifying instances of Syntax - Guided Synthesis (SyGuS) problems. Specifically, instances of SyGuS problems include the following aspects: 1. **Vocabulary, theory, and basic types**: used to specify: - (a) The semantic constraints of the function to be synthesized. - (b) The definition of the function to be synthesized itself. 2. **A finite number of typed functions \( f_1, \ldots, f_n \)**: These functions need to be synthesized. 3. **Syntactic constraints of each function \( f_i \)**: Use the context - free grammar \( G_i \) to describe the syntactic structure of the candidate solutions of each function. The grammar can only involve function symbols and types in the specified output logic. 4. **Semantic constraints and assumptions**: Describe the behavior of the function to be synthesized. The constraint conditions are represented by the quantifier - free formula \( \varphi \), and the assumptions are represented by the quantifier - free formula \( \alpha \). These formulas can reference the functions to be synthesized and the universally quantified variables \( v_1, \ldots, v_m \) in the input logic. The goal is to find an expression body \( e_i \) for each function \( f_i \) such that: - (a) The expression body belongs to the grammar \( G_i \) used for syntactic constraint solutions. - (b) The constraint condition \( \forall v_1, \ldots, v_m. \alpha \Rightarrow \varphi \) is valid under the background theory, assuming that the functions \( f_1, \ldots, f_n \) are interpreted as returning \( e_1, \ldots, e_n \). Note that each \( e_i \) is an expression containing a fixed set of free variables, which represent the parameter list of the function \( f_i \). In summary, this paper aims to provide a standard input and output language for solvers of syntax - guided synthesis problems by defining and standardizing the SyGuS language. This helps to unify and standardize the description and solution process of such problems.