Synthesizing imperative programs from examples guided by static analysis

Sunbeom So, Hakjoo Oh

Research output: Chapter in Book/Report/Conference proceedingConference contribution

22 Citations (Scopus)


We present a novel algorithm for efficiently synthesizing imperative programs from examples. Given a set of input-output examples and a partial program, our algorithm generates a complete program that is consistent with every example. Our algorithm is based on enumerative synthesis, which explores all candidate programs in increasing size until it finds a solution. This algorithm, however, is too slow to be used in practice. Our key idea to accelerate the speed is to perform static analysis alongside the enumerative search, in order to “statically” identify and safely prune out partial programs that eventually fail to be a solution. We have implemented our algorithm in a tool, SIMPL, and evaluated it on 30 introductory programming problems gathered from online forums. The results show that our static analysis approach improves the speed of enumerative synthesis by 25x on average.

Original languageEnglish
Title of host publicationStatic Analysis - 24th International Symposium, SAS 2017, Proceedings
EditorsFrancesco Ranzato
PublisherSpringer Verlag
Number of pages18
ISBN (Print)9783319667058
Publication statusPublished - 2017
Event24th International Symposium on Static Analysis, SAS 2017 - New York, United States
Duration: 2017 Aug 302017 Sept 1

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume10422 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349


Conference24th International Symposium on Static Analysis, SAS 2017
Country/TerritoryUnited States
CityNew York

ASJC Scopus subject areas

  • Theoretical Computer Science
  • General Computer Science


Dive into the research topics of 'Synthesizing imperative programs from examples guided by static analysis'. Together they form a unique fingerprint.

Cite this