Interpretable Program Synthesis

Tianyi Zhang, Zhiyang Chen, Yuanli Zhu, Priyan Vaithilingam, Xinyu Wang and Elena L. Glassman

Abstract

Program synthesis, which generates programs based on user-provided specifications, can be obscure and brittle: users have few ways to understand and recover from synthesis failures. We propose interpretable program synthesis, a novel approach that unveils the synthesis process and enables users to monitor and guide a synthesizer. We designed three representations that explain the underlying synthesis process with different levels of fidelity. We implemented an interpretable synthesizer for regular expressions and conducted a within-subjects study with eighteen participants on three challenging regex tasks. With interpretable synthesis, participants were able to reason about synthesis failures and provide strategic feedback, achieving a significantly higher success rate compared with a state-of-the-art synthesizer. In particular, participants with a high engagement tendency (as measured by NCS-6) preferred a deductive representation that shows the synthesis process in a search tree, while participants with a relatively low engagement tendency preferred an inductive representation that renders representative samples of programs enumerated during synthesis.

Venue
CHI 2021
Volume
Proceedings of the 2021 CHI Conference on Human Factors in Computing Systems
DOI
10.1145/3411764.3445646
PDF
https://dl.acm.org/doi/pdf/10.1145/3411764.3445646
Anthology ID
2021.chi.600

Cite

@inproceedings{zhang-etal-2021-interpretable,
    title = {{Interpretable Program Synthesis}},
    author = {Tianyi Zhang and Zhiyang Chen and Yuanli Zhu and Priyan Vaithilingam and Xinyu Wang and Elena L. Glassman},
    booktitle = {Proceedings of the 2021 CHI Conference on Human Factors in Computing Systems},
    isbn = {9781450380966},
    year = {2021},
    publisher = {Association for Computing Machinery},
    address = {New York, NY, USA},
    doi = {10.1145/3411764.3445646},
    url = {https://doi.org/10.1145/3411764.3445646},
    abstract = {Program synthesis, which generates programs based on user-provided specifications, can be obscure and brittle: users have few ways to understand and recover from synthesis failures. We propose interpretable program synthesis, a novel approach that unveils the synthesis process and enables users to monitor and guide a synthesizer. We designed three representations that explain the underlying synthesis process with different levels of fidelity. We implemented an interpretable synthesizer for regular expressions and conducted a within-subjects study with eighteen participants on three challenging regex tasks. With interpretable synthesis, participants were able to reason about synthesis failures and provide strategic feedback, achieving a significantly higher success rate compared with a state-of-the-art synthesizer. In particular, participants with a high engagement tendency (as measured by NCS-6) preferred a deductive representation that shows the synthesis process in a search tree, while participants with a relatively low engagement tendency preferred an inductive representation that renders representative samples of programs enumerated during synthesis.}
}