Synthesizing pattern programs from examples

Sunbeom So, Hakjoo Oh

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

Abstract

We describe a programming-by-example system that automatically generates pattern programs from examples. Writing pattern programs, which produce various patterns of characters, is one of the most popular programming exercises for entry-level students. However, students often find it difficult to write correct solutions by themselves. In this paper, we present a method for synthesizing pattern programs from examples, allowing students to improve their programming skills efficiently. To that end, we first design a domain-specific language that supports a large class of pattern programs that students struggle with. Next, we develop a synthesis algorithm that efficiently finds a desired program by combining enumerative search, constraint solving, and program analysis. We implemented the algorithm in a tool and evaluated it on 40 exercises gathered from online forums. The experimental results and user study show that our tool can synthesize instructive solutions from 1-3 example patterns in 1.2 seconds on average.

Original languageEnglish
Title of host publicationProceedings of the 27th International Joint Conference on Artificial Intelligence, IJCAI 2018
EditorsJerome Lang
PublisherInternational Joint Conferences on Artificial Intelligence
Pages1618-1624
Number of pages7
ISBN (Electronic)9780999241127
Publication statusPublished - 2018 Jan 1
Event27th International Joint Conference on Artificial Intelligence, IJCAI 2018 - Stockholm, Sweden
Duration: 2018 Jul 132018 Jul 19

Publication series

NameIJCAI International Joint Conference on Artificial Intelligence
Volume2018-July
ISSN (Print)1045-0823

Other

Other27th International Joint Conference on Artificial Intelligence, IJCAI 2018
CountrySweden
CityStockholm
Period18/7/1318/7/19

Fingerprint

Students

ASJC Scopus subject areas

  • Artificial Intelligence

Cite this

So, S., & Oh, H. (2018). Synthesizing pattern programs from examples. In J. Lang (Ed.), Proceedings of the 27th International Joint Conference on Artificial Intelligence, IJCAI 2018 (pp. 1618-1624). (IJCAI International Joint Conference on Artificial Intelligence; Vol. 2018-July). International Joint Conferences on Artificial Intelligence.

Synthesizing pattern programs from examples. / So, Sunbeom; Oh, Hakjoo.

Proceedings of the 27th International Joint Conference on Artificial Intelligence, IJCAI 2018. ed. / Jerome Lang. International Joint Conferences on Artificial Intelligence, 2018. p. 1618-1624 (IJCAI International Joint Conference on Artificial Intelligence; Vol. 2018-July).

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

So, S & Oh, H 2018, Synthesizing pattern programs from examples. in J Lang (ed.), Proceedings of the 27th International Joint Conference on Artificial Intelligence, IJCAI 2018. IJCAI International Joint Conference on Artificial Intelligence, vol. 2018-July, International Joint Conferences on Artificial Intelligence, pp. 1618-1624, 27th International Joint Conference on Artificial Intelligence, IJCAI 2018, Stockholm, Sweden, 18/7/13.
So S, Oh H. Synthesizing pattern programs from examples. In Lang J, editor, Proceedings of the 27th International Joint Conference on Artificial Intelligence, IJCAI 2018. International Joint Conferences on Artificial Intelligence. 2018. p. 1618-1624. (IJCAI International Joint Conference on Artificial Intelligence).
So, Sunbeom ; Oh, Hakjoo. / Synthesizing pattern programs from examples. Proceedings of the 27th International Joint Conference on Artificial Intelligence, IJCAI 2018. editor / Jerome Lang. International Joint Conferences on Artificial Intelligence, 2018. pp. 1618-1624 (IJCAI International Joint Conference on Artificial Intelligence).
@inproceedings{c16907fcc459443a9ac66132c76400cb,
title = "Synthesizing pattern programs from examples",
abstract = "We describe a programming-by-example system that automatically generates pattern programs from examples. Writing pattern programs, which produce various patterns of characters, is one of the most popular programming exercises for entry-level students. However, students often find it difficult to write correct solutions by themselves. In this paper, we present a method for synthesizing pattern programs from examples, allowing students to improve their programming skills efficiently. To that end, we first design a domain-specific language that supports a large class of pattern programs that students struggle with. Next, we develop a synthesis algorithm that efficiently finds a desired program by combining enumerative search, constraint solving, and program analysis. We implemented the algorithm in a tool and evaluated it on 40 exercises gathered from online forums. The experimental results and user study show that our tool can synthesize instructive solutions from 1-3 example patterns in 1.2 seconds on average.",
author = "Sunbeom So and Hakjoo Oh",
year = "2018",
month = "1",
day = "1",
language = "English",
series = "IJCAI International Joint Conference on Artificial Intelligence",
publisher = "International Joint Conferences on Artificial Intelligence",
pages = "1618--1624",
editor = "Jerome Lang",
booktitle = "Proceedings of the 27th International Joint Conference on Artificial Intelligence, IJCAI 2018",

}

TY - GEN

T1 - Synthesizing pattern programs from examples

AU - So, Sunbeom

AU - Oh, Hakjoo

PY - 2018/1/1

Y1 - 2018/1/1

N2 - We describe a programming-by-example system that automatically generates pattern programs from examples. Writing pattern programs, which produce various patterns of characters, is one of the most popular programming exercises for entry-level students. However, students often find it difficult to write correct solutions by themselves. In this paper, we present a method for synthesizing pattern programs from examples, allowing students to improve their programming skills efficiently. To that end, we first design a domain-specific language that supports a large class of pattern programs that students struggle with. Next, we develop a synthesis algorithm that efficiently finds a desired program by combining enumerative search, constraint solving, and program analysis. We implemented the algorithm in a tool and evaluated it on 40 exercises gathered from online forums. The experimental results and user study show that our tool can synthesize instructive solutions from 1-3 example patterns in 1.2 seconds on average.

AB - We describe a programming-by-example system that automatically generates pattern programs from examples. Writing pattern programs, which produce various patterns of characters, is one of the most popular programming exercises for entry-level students. However, students often find it difficult to write correct solutions by themselves. In this paper, we present a method for synthesizing pattern programs from examples, allowing students to improve their programming skills efficiently. To that end, we first design a domain-specific language that supports a large class of pattern programs that students struggle with. Next, we develop a synthesis algorithm that efficiently finds a desired program by combining enumerative search, constraint solving, and program analysis. We implemented the algorithm in a tool and evaluated it on 40 exercises gathered from online forums. The experimental results and user study show that our tool can synthesize instructive solutions from 1-3 example patterns in 1.2 seconds on average.

UR - http://www.scopus.com/inward/record.url?scp=85055703281&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=85055703281&partnerID=8YFLogxK

M3 - Conference contribution

AN - SCOPUS:85055703281

T3 - IJCAI International Joint Conference on Artificial Intelligence

SP - 1618

EP - 1624

BT - Proceedings of the 27th International Joint Conference on Artificial Intelligence, IJCAI 2018

A2 - Lang, Jerome

PB - International Joint Conferences on Artificial Intelligence

ER -