[Paper Review] Representing Partial Programs with Blended Abstract Semantics
This paper proposes a neuro-symbolic method for representing partial programs using a learned, modular neural network that blends concrete execution states with approximate semantics, enabling more effective program synthesis. The approach improves accuracy in synthesizing programs with complex constructs like loops and higher-order functions within a fixed search budget compared to pure neural methods.
Synthesizing programs from examples requires searching over a vast, combinatorial space of possible programs. In this search process, a key challenge is representing the behavior of a partially written program before it can be executed, to judge if it is on the right track and predict where to search next. We introduce a general technique for representing partially written programs in a program synthesis engine. We take inspiration from the technique of abstract interpretation, in which an approximate execution model is used to determine if an unfinished program will eventually satisfy a goal specification. Here we \emph{learn} an approximate execution model implemented as a modular neural network. By constructing compositional program representations that implicitly encode the interpretation semantics of the underlying programming language, we can represent partial programs using a flexible combination of concrete execution state and learned neural representations, using the learned approximate semantics when concrete semantics are not known (in unfinished parts of the program). We show that these hybrid neuro-symbolic representations enable execution-guided synthesizers to use more powerful language constructs, such as loops and higher-order functions, and can be used to synthesize programs more accurately for a given search budget than pure neural approaches in several domains.
Motivation & Objective
- To address the challenge of representing partially written programs during synthesis when full execution is impossible.
- To improve search efficiency in program synthesis by enabling better prediction of promising program paths.
- To support richer language constructs—such as loops and higher-order functions—within synthesis engines.
- To combine symbolic execution with learned semantics for more accurate and scalable synthesis.
Proposed method
- Leverage abstract interpretation principles to construct an approximate execution model for incomplete programs.
- Train a modular neural network to learn the semantics of programming language constructs, especially in incomplete or unexecutable code segments.
- Construct hybrid program representations that combine concrete execution states with learned neural approximations where semantics are unknown.
- Use compositional program representations that encode language semantics implicitly, enabling generalization across program structures.
- Integrate the learned semantics into execution-guided synthesis engines to guide search toward valid, correct programs.
- Enable the synthesis engine to reason about partial programs even when they contain unbound variables or incomplete control flow.
Experimental results
Research questions
- RQ1Can a learned neural model effectively approximate the semantics of incomplete programs in a way that supports accurate synthesis?
- RQ2How does combining concrete execution with learned semantics improve synthesis performance compared to pure neural or symbolic methods?
- RQ3To what extent can this hybrid representation enable the synthesis of programs with complex constructs like loops and higher-order functions?
- RQ4Does the proposed method maintain or improve search efficiency and accuracy under constrained computational budgets?
Key findings
- The hybrid neuro-symbolic representation enables synthesis engines to effectively reason about partial programs that would otherwise be unexecutable.
- The approach supports the use of advanced language constructs such as loops and higher-order functions more reliably than pure neural methods.
- For a given search budget, the method achieves higher program synthesis accuracy than purely neural approaches across multiple domains.
- The learned neural component provides effective semantic approximation in unbound or incomplete code regions, improving search guidance.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.