Abstract
We present a new algorithm that synthesizes functional reactive programs from observation data. The key novelty is to iterate between a functional synthesis step, which attempts to generate a transition function over observed states, and an automata synthesis step, which adds any additional latent state necessary to fully account for the observations. We develop a functional reactive DSL called Autumn that can express a rich variety of causal dynamics in time-varying, Atari-style grid worlds, and apply our method to synthesize Autumn programs from data. We evaluate our algorithm on a benchmark suite of 30 Autumn programs as well as a third-party corpus of grid-world-style video games. We find that our algorithm synthesizes 27 out of 30 programs in our benchmark suite and 21 out of 27 programs from the third-party corpus, including several programs describing complex latent state transformations, and from input traces containing hundreds of observations. We expect that our approach will provide a template for how to integrate functional and automata synthesis in other induction domains.
Supplemental Material
Available for Download
Paper Supplement.
- Dana Angluin. 1987. Learning Regular Sets from Queries and Counterexamples. Inf. Comput., 75, 2 (1987), 87–106. https://doi.org/10.1016/0890-5401(87)90052-6
Google Scholar
Digital Library
- Suguman Bansal, Kedar S. Namjoshi, and Yaniv Sa’ar. 2018. Synthesis of Asynchronous Reactive Programs from Temporal Specifications. In Computer Aided Verification - 30th International Conference, CAV 2018, Held as Part of the Federated Logic Conference, FloC 2018, Oxford, UK, July 14-17, 2018, Proceedings, Part I, Hana Chockler and Georg Weissenbacher (Eds.) (Lecture Notes in Computer Science, Vol. 10981). Springer, 367–385. https://doi.org/10.1007/978-3-319-96145-3_20
Google Scholar
Cross Ref
- Tewodros A. Beyene, Swarat Chaudhuri, Corneliu Popeea, and Andrey Rybalchenko. 2014. A constraint-based approach to solving games on infinite graphs. In The 41st Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’14, San Diego, CA, USA, January 20-21, 2014, Suresh Jagannathan and Peter Sewell (Eds.). ACM, 221–234. https://doi.org/10.1145/2535838.2535860
Google Scholar
Digital Library
- Roderick Bloem, Barbara Jobstmann, Nir Piterman, Amir Pnueli, and Yaniv Sa’ar. 2012. Synthesis of Reactive(1) designs. J. Comput. Syst. Sci., 78, 3 (2012), 911–938. https://doi.org/10.1016/j.jcss.2011.08.007
Google Scholar
Digital Library
- Chia Yuan Cho, Domagoj Babic, Eui Chul Richard Shin, and Dawn Song. 2010. Inference and analysis of formal models of botnet command and control protocols. In Proceedings of the 17th ACM Conference on Computer and Communications Security, CCS 2010, Chicago, Illinois, USA, October 4-8, 2010, Ehab Al-Shaer, Angelos D. Keromytis, and Vitaly Shmatikov (Eds.). ACM, 426–439. https://doi.org/10.1145/1866307.1866355
Google Scholar
Digital Library
- Wonhyuk Choi, Bernd Finkbeiner, Ruzica Piskac, and Mark Santolucito. 2022. Can reactive synthesis and syntax-guided synthesis be friends? In PLDI ’22: 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation, San Diego, CA, USA, June 13 - 17, 2022, Ranjit Jhala and Isil Dillig (Eds.). ACM, 229–243. https://doi.org/10.1145/3519939.3523429
Google Scholar
Digital Library
- François Chollet. 2019. On the Measure of Intelligence. https://doi.org/10.48550/ARXIV.1911.01547
Google Scholar
- François Chollet. 2019. On the Measure of Intelligence. CoRR, abs/1911.01547 (2019), arXiv:1911.01547. arxiv:1911.01547
Google Scholar
- David Combe, Colin de la Higuera, and Jean-Christophe Janodet. 2010. Zulu: An Interactive Learning Competition. In Finite-State Methods and Natural Language Processing, Anssi Yli-Jyrä, András Kornai, Jacques Sakarovitch, and Bruce Watson (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg. 139–146. isbn:978-3-642-14684-8
Google Scholar
- Evan Czaplicki and Stephen Chong. 2013. Asynchronous functional reactive programming for GUIs. In ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’13, Seattle, WA, USA, June 16-19, 2013, Hans-Juergen Boehm and Cormac Flanagan (Eds.). ACM, 411–422. https://doi.org/10.1145/2491956.2462161
Google Scholar
Digital Library
- Samuel Drews and Loris D’Antoni. 2017. Learning Symbolic Automata. In Tools and Algorithms for the Construction and Analysis of Systems - 23rd International Conference, TACAS 2017, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2017, Uppsala, Sweden, April 22-29, 2017, Proceedings, Part I, Axel Legay and Tiziana Margaria (Eds.) (Lecture Notes in Computer Science, Vol. 10205). 173–189. https://doi.org/10.1007/978-3-662-54577-5_10
Google Scholar
Cross Ref
- Tao Du, Jeevana Priya Inala, Yewen Pu, Andrew Spielberg, Adriana Schulz, Daniela Rus, Armando Solar-Lezama, and Wojciech Matusik. 2018. InverseCSG: automatic conversion of 3D models to CSG trees. ACM Trans. Graph., 37, 6 (2018), 213. https://doi.org/10.1145/3272127.3275006
Google Scholar
Digital Library
- Kevin Ellis, Adam Albright, Armando Solar-Lezama, Joshua B. Tenenbaum, and Timothy J. O’Donnell. 2022. Synthesizing theories of human language with Bayesian program induction.. Nature Communications, 13, 5024 (2022), https://doi.org/10.1038/s41467-022-32012-w
Google Scholar
Cross Ref
- Kevin Ellis, Armando Solar-Lezama, and Joshua B. Tenenbaum. 2015. Unsupervised Learning by Program Synthesis. In Advances in Neural Information Processing Systems 28: Annual Conference on Neural Information Processing Systems 2015, December 7-12, 2015, Montreal, Quebec, Canada, Corinna Cortes, Neil D. Lawrence, Daniel D. Lee, Masashi Sugiyama, and Roman Garnett (Eds.). 973–981. https://proceedings.neurips.cc/paper/2015/hash/b73dfe25b4b8714c029b37a6ad3006fa-Abstract.html
Google Scholar
- Kevin Ellis, Catherine Wong, Maxwell Nye, Mathias Sablé-Meyer, Lucas Morales, Luke Hewitt, Luc Cary, Armando Solar-Lezama, and Joshua B Tenenbaum. 2021. Dreamcoder: Bootstrapping inductive program synthesis with wake-sleep library learning. In Proceedings of the 42nd acm sigplan international conference on programming language design and implementation. 835–850.
Google Scholar
Digital Library
- Richard Evans, José Hernández-Orallo, Johannes Welbl, Pushmeet Kohli, and Marek J. Sergot. 2020. Evaluating the Apperception Engine. ArXiv, abs/2007.05367 (2020).
Google Scholar
- Richard Evans, José Hernández-Orallo, Johannes Welbl, Pushmeet Kohli, and Marek Sergot. 2021. Making sense of sensory input. Artificial Intelligence, 293 (2021), 103438. issn:0004-3702 https://doi.org/10.1016/j.artint.2020.103438
Google Scholar
Cross Ref
- Bernd Finkbeiner, Felix Klein, Ruzica Piskac, and Mark Santolucito. 2019. Synthesizing functional reactive programs. In Proceedings of the 12th ACM SIGPLAN International Symposium on Haskell, [email protected] 2019, Berlin, Germany, August 18-23, 2019, Richard A. Eisenberg (Ed.). ACM, 162–175. https://doi.org/10.1145/3331545.3342601
Google Scholar
Digital Library
- Alison Gopnik and Henry M Wellman. 2012. Reconstructing constructivism: causal models, Bayesian learning mechanisms, and the theory theory.. Psychological bulletin, 138, 6 (2012), 1085.
Google Scholar
- Matthew Guzdial, Boyang Li, and Mark O Riedl. 2017. Game Engine Learning from Video.. In IJCAI. 3707–3713.
Google Scholar
- Ali Sinan Köksal, Yewen Pu, Saurabh Srivastava, Rastislav Bodík, Jasmin Fisher, and Nir Piterman. 2013. Synthesis of biological models from mutation experiments. In The 40th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’13, Rome, Italy - January 23 - 25, 2013, Roberto Giacobazzi and Radhia Cousot (Eds.). ACM, 469–482. https://doi.org/10.1145/2429069.2429125
Google Scholar
Digital Library
- John Levine, Clare Bates Congdon, Marc Ebner, Graham Kendall, Simon M Lucas, Risto Miikkulainen, Tom Schaul, and Tommy Thompson. 2013. General video game playing.
Google Scholar
- Julie L Newcomb and Rastislav Bodik. 2019. Using human-in-the-loop synthesis to author functional reactive programs. https://doi.org/10.48550/ARXIV.1909.11206
Google Scholar
- Amir Pnueli and Roni Rosner. 1990. Distributed Reactive Systems Are Hard to Synthesize. In 31st Annual Symposium on Foundations of Computer Science, St. Louis, Missouri, USA, October 22-24, 1990, Volume II. IEEE Computer Society, 746–757. https://doi.org/10.1109/FSCS.1990.89597
Google Scholar
Digital Library
- Harald Raffelt and Bernhard Steffen. 2006. LearnLib: A Library for Automata Learning and Experimentation. In Fundamental Approaches to Software Engineering, Luciano Baresi and Reiko Heckel (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg. 377–380. isbn:978-3-540-33094-3
Google Scholar
- Armando Solar-Lezama. 2013. Program sketching. Int. J. Softw. Tools Technol. Transf., 15, 5-6 (2013), 475–495. https://doi.org/10.1007/s10009-012-0249-7
Google Scholar
Digital Library
- Megan Tjandrasuwita, Jennifer J Sun, Ann Kennedy, Swarat Chaudhuri, and Yisong Yue. 2021. Interpreting expert annotation differences in animal behavior. arXiv preprint arXiv:2106.06114.
Google Scholar
- Pedro A. Tsividis, Joao Loula, Jake Burga, Nathan Foss, Andres Campero, Thomas Pouncy, Samuel J. Gershman, and Joshua B. Tenenbaum. 2021. Human-Level Reinforcement Learning through Theory-Based Modeling, Exploration, and Planning. https://doi.org/10.48550/ARXIV.2107.12544
Google Scholar
- Tomer D Ullman and Joshua B Tenenbaum. 2020. Bayesian models of conceptual development: Learning as building models of the world. Annual Review of Developmental Psychology.
Google Scholar
- Frits W. Vaandrager. 2017. Model learning. Commun. ACM, 60, 2 (2017), 86–95. https://doi.org/10.1145/2967606
Google Scholar
Digital Library
- Willem Zuidema, Robert M French, Raquel G Alhama, Kevin Ellis, Timothy J O’Donnell, Tim Sainburg, and Timothy Q Gentner. 2020. Five ways in which computational modeling can help advance cognitive science: Lessons from artificial grammar learning. Topics in cognitive science, 12, 3 (2020), 925–941.
Google Scholar
Index Terms
Combining Functional and Automata Synthesis to Discover Causal Reactive Programs
Recommendations
Template-based program verification and program synthesis
Program verification is the task of automatically generating proofs for a program's compliance with a given specification. Program synthesis is the task of automatically generating a program that meets a given specification. Both program verification ...
Program sketching
Sketching is a synthesis methodology that aims to bridge the gap between a programmer's high-level insights about a problem and the computer's ability to manage low-level details. In sketching, the programmer uses a partial program, a sketch, to ...
Can reactive synthesis and syntax-guided synthesis be friends?
PLDI 2022: Proceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and ImplementationWhile reactive synthesis and syntax-guided synthesis (SyGuS) have seen enormous progress in recent years, combining the two approaches has remained a challenge. In this work, we present the synthesis of reactive programs from Temporal Stream Logic ...






Comments