Abstract
Program synthesis is the problem of computing from a specification a program that implements it. New and popular variations on the synthesis problem accept specifications in formats that are easier for the human synthesis user to provide: input-output example pairs, type information, and partial logical specifications. These are all partial specification formats, encoding only a fraction of the expected behavior of the program, leaving many matching programs. This transition into partial specification also changes the mode of work for the user, who now provides additional specifications as long as they are unhappy with the result. This turns synthesis into an iterative, interactive process.
We present a formal model for interactive synthesis, leveraging an abstract domain of predicates on programs in order to describe the iterative refinement of the specifications and reduction of the candidate program space. We use this model to describe the behavior of several real-world synthesizers. Additionally, we present two conditions for termination of a synthesis session, one hinging only on the properties of the available partial specifications, and the other also on the behavior of the user. Finally, we show conditions for realizability of the user’s intent, and show the limitations of backtracking when it is apparent a session will fail.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Alur, R., Bodik, R., Juniwal, G., Martin, M.M., Raghothaman, M., Seshia, S.A., Singh, R., Solar-Lezama, A., Torlak, E., Udupa, A.: Syntax-guided synthesis. Dependable Software Systems Engineering 40, 1–25 (2015)
Anton, T.: Xpath-wrapper induction by generalizing tree traversal patterns. In: Lernen, Wissensentdeckung und Adaptivitt (LWA) 2005, GI Workshops, Saarbrcken, pp. 126–133 (2005)
Cousot, P., Cousot, R.: Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: POPL, pp. 238–252 (1977)
Drachsler-Cohen, D., Shoham, S., Yahav, E.: Synthesis with abstract examples. In: Majumdar, R., Kunčak, V. (eds.) CAV 2017. LNCS, vol. 10426, pp. 254–278. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-63387-9_13
Ernst, M.D., Perkins, J.H., Guo, P.J., McCamant, S., Pacheco, C., Tschantz, M.S., Xiao, C.: The daikon system for dynamic detection of likely invariants. Science of Computer Programming 69(1), 35–45 (2007)
Feng, Y., Martins, R., Wang, Y., Dillig, I., Reps, T.: Component-based synthesis for complex apis. In: Proceedings of the 44th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2017 (2017)
Feser, J.K., Chaudhuri, S., Dillig, I.: Synthesizing data structure transformations from input-output examples. In: ACM SIGPLAN Notices, vol. 50, pp. 229–239. ACM (2015)
Flanagan, C., Leino, K.R.M.: Houdini, an annotation assistant for ESC/Java. In: Oliveira, J.N., Zave, P. (eds.) FME 2001. LNCS, vol. 2021, pp. 500–517. Springer, Heidelberg (2001). https://doi.org/10.1007/3-540-45251-6_29
Galenson, J., Reames, P., Bodik, R., Hartmann, B., Sen, K.: Codehint: dynamic and interactive synthesis of code snippets. In: Proceedings of the 36th International Conference on Software Engineering, pp. 653–663. ACM (2014)
Gulwani, S.: Automating string processing in spreadsheets using input-output examples. In: Proceedings of the 38th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2011, pp. 317–330. ACM, New York (2011)
Gulwani, S.: Synthesis from examples: interaction models and algorithms. In: 2012 14th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing (SYNASC), pp. 8–14. IEEE (2012)
Gvero, T., Kuncak, V., Kuraj, I., Piskac, R.: Complete completion using types and weights. In: ACM SIGPLAN Notices, vol. 48, pp. 27–38. ACM (2013)
Higman, G.: Ordering by divisibility in abstract algebras. Proceedings of the London Mathematical Society 3(1), 326–336 (1952)
Jha, S., Seshia, S.A.: A theory of formal synthesis via inductive learning. Acta Informatica, February 2017
Knuth, D.E.: Computer programming as an art. In: ACM Turing award lectures, pp. 1974. ACM (2007)
Kruskal, J.B.: Well-quasi-ordering, the tree theorem, and vazsonyi’s conjecture. Transactions of the American Mathematical Society 95(2), 210–225 (1960)
Landauer, J., Hirakawa, M.: Visual AWK: a model for text processing by demonstration. In: VL, pp. 267–274 (1995)
Lau, T., Wolfman, S.A., Domingos, P., Weld, D.S.: Learning repetitive text-editing procedures with SMARTedit. Your Wish Is My Command: Giving Users the Power to Instruct Their Software, pp. 209–226 (2001)
Lau, T., Wolfman, S.A., Domingos, P., Weld, D.S.: Programming by demonstration using version space algebra. Machine Learning 53(1), 111–156 (2003)
Le, V., Gulwani, S.: FlashExtract: a framework for data extraction by examples. In: O’Boyle, M.F.P., Pingali, K. (eds.) Proceedings of the 35th Conference on Programming Language Design and Implementation, pp. 55. ACM (2014)
Le, V., Perelman, D., Polozov, O., Raza, M., Udupa, A., Gulwani, S.: Interactive program synthesis (2017)
Löding, C., Madhusudan, P., Neider, D.: Abstract learning frameworks for synthesis. In: Chechik, M., Raskin, J.-F. (eds.) TACAS 2016. LNCS, vol. 9636, pp. 167–185. Springer, Heidelberg (2016). https://doi.org/10.1007/978-3-662-49674-9_10
Omari, A., Shoham, S., Yahav, E.: Cross-supervised synthesis of web-crawlers. In: Proceedings of the 38th International Conference on Software Engineering, ICSE 2016, Austin, TX, USA, May 14–22, 2016, pp. 368–379 (2016)
Osera, P.-M., Zdancewic, S.: Type-and-example-directed program synthesis. In: ACM SIGPLAN Notices, vol. 50, pp. 619–630. ACM (2015)
Peleg, H., Shoham, S., Yahav, E.: \(D^3\): data-driven disjunctive abstraction. In: Jobstmann, B., Leino, K.R.M. (eds.) VMCAI 2016. LNCS, vol. 9583, pp. 185–205. Springer, Heidelberg (2016). https://doi.org/10.1007/978-3-662-49122-5_9
Peleg, H., Shoham, S., Yahav, E.: Programming not only by example (2017)
Perelman, D., Gulwani, S., Ball, T., Grossman, D.: Type-directed completion of partial expressions. In: ACM SIGPLAN Notices, vol. 47, pp. 275–286. ACM (2012)
Polikarpova, N., Kuraj, I., Solar-Lezama, A.: Program synthesis from polymorphic refinement types. In: Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 522–538. ACM (2016)
Polozov, O., Gulwani, S.: Flashmeta: A framework for inductive program synthesis. ACM SIGPLAN Notices 50(10), 107–126 (2015)
Singh, R.: Blinkfill: semi-supervised programming by example for syntactic string transformations, September 2016
Solar-Lezama, A.: Program synthesis by sketching. ProQuest (2008)
Solar-Lezama, A., Jones, C.G., Bodik, R.: Sketching concurrent data structures. In: ACM SIGPLAN Notices, vol. 43, pp. 136–148. ACM (2008)
Solar-Lezama, A., Tancau, L., Bodik, R., Seshia, S., Saraswat, V.: Combinatorial sketching for finite programs. ACM SIGOPS Operating Systems Review 40(5), 404–415 (2006)
Wang, C., Cheung, A., Bodik, R.: Synthesizing highly expressive SQL queries from input-output examples. In: Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 452–466. ACM (2017)
Witten, I.H., Mo, D.: Tels: learning text editing tasks from examples. In: Watch what I do, pp. 183–203. MIT Press (1993)
Wu, S., Liu, J., Fan, J.: Automatic web content extraction by combination of learning and grouping. In: Proceedings of the 24th International Conference on World Wide Web, pp. 1264–1274. ACM (2015)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer International Publishing AG
About this paper
Cite this paper
Peleg, H., Itzhaky, S., Shoham, S. (2018). Abstraction-Based Interaction Model for Synthesis. In: Dillig, I., Palsberg, J. (eds) Verification, Model Checking, and Abstract Interpretation. VMCAI 2018. Lecture Notes in Computer Science(), vol 10747. Springer, Cham. https://doi.org/10.1007/978-3-319-73721-8_18
Download citation
DOI: https://doi.org/10.1007/978-3-319-73721-8_18
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-73720-1
Online ISBN: 978-3-319-73721-8
eBook Packages: Computer ScienceComputer Science (R0)