Program synthesis is the task of automatically ﬁnding a program in the underlying programming language that satisﬁes the user intent expressed in the form of some speciﬁcation. Since the inception of artificial intelligence in the 1950s, this problem has been considered the holy grail of Computer Science. Despite inherent challenges in the problem such as ambiguity of user intent and a typically enormous search space of programs, the ﬁeld of program synthesis has developed many diﬀerent techniques that enable program synthesis in diﬀerent real-life application domains. It is now used successfully in software engineering, biological discovery, compute-raided education, end-user programming, and data cleaning. In the last decade, several applications of synthesis in the ﬁeld of programming by examples have been deployed in mass-market industrial products.
This monograph is a general overview of the state-of-the-art approaches to program synthesis, its applications, and subﬁelds. It discusses the general principles common to all modern synthesis approaches such as syntactic bias, oracle-guided inductive search, and optimization techniques. We then present a literature review covering the four most common state-of-the-art techniques in program synthesis: enumerative search, constraint solving, stochastic search, and deduction-based programming by examples. It concludes with a brief list of future horizons for the ﬁeld.