Synthesizing Formal Semantics from Executable Interpreters
Jiangyi Liu, Charlie Murphy, Anvay Grover, Keith J.C. Johnson, Thomas, Reps, Loris D'Antoni

TL;DR
This paper introduces an algorithm that automatically synthesizes formal, inductively defined semantics from executable interpreters, facilitating verification and synthesis for non-expert users by converting interpreters into logical specifications.
Contribution
The authors present a novel CEGIS-based algorithm that transforms executable interpreters into formal CHC-based semantics, streamlining the creation of formal language descriptions.
Findings
Synthesized semantics for 14 interpreters used in program synthesis.
Uncovered and fixed an inconsistency in a language interpreter, improving efficiency.
Achieved up to 1.2x speedup in synthesis tasks after fixing semantics.
Abstract
Program verification and synthesis frameworks that allow one to customize the language in which one is interested typically require the user to provide a formally defined semantics for the language. Because writing a formal semantics can be a daunting and error-prone task, this requirement stands in the way of such frameworks being adopted by non-expert users. We present an algorithm that can automatically synthesize inductively defined syntax-directed semantics when given (i) a grammar describing the syntax of a language and (ii) an executable (closed-box) interpreter for computing the semantics of programs in the language of the grammar. Our algorithm synthesizes the semantics in the form of Constrained-Horn Clauses (CHCs), a natural, extensible, and formal logical framework for specifying inductively defined relations that has recently received widespread adoption in program…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNatural Language Processing Techniques
