English

Synthesizing Imperative Programs from Examples Guided by Static Analysis

Programming Languages 2017-06-14 v2 Artificial Intelligence

Abstract

We present a novel algorithm that synthesizes imperative programs for introductory programming courses. Given a set of input-output examples and a partial program, our algorithm generates a complete program that is consistent with every example. Our key idea is to combine enumerative program synthesis and static analysis, which aggressively prunes out a large search space while guaranteeing to find, if any, a correct solution. We have implemented our algorithm in a tool, called SIMPL, and evaluated it on 30 problems used in introductory programming courses. The results show that SIMPL is able to solve the benchmark problems in 6.6 seconds on average.

Keywords

Cite

@article{arxiv.1702.06334,
  title  = {Synthesizing Imperative Programs from Examples Guided by Static Analysis},
  author = {Sunbeom So and Hakjoo Oh},
  journal= {arXiv preprint arXiv:1702.06334},
  year   = {2017}
}

Comments

The paper is accepted in Static Analysis Symposium (SAS) '17. The submission version is somewhat different from the version in arxiv. The final version will be uploaded after the camera-ready version is ready