Programming-by-Demonstration for Long-Horizon Robot Tasks
Noah Patton, Kia Rahmani, Meghana Missula, Joydeep Biswas, Isil Dillig
Abstract
The goal of programmatic Learning from Demonstration (LfD) is to learn a policy in a programming language that can be used to control a robot’s behavior from a set of user demonstrations. This paper presents a new programmatic LfD algorithm that targets long-horizon robot tasks which require synthesizing programs with complex control flow structures, including nested loops with multiple conditionals. Our proposed method first learns a program sketch that captures the target program’s control flow and then completes this sketch using an LLM-guided search procedure that incorporates a novel technique for proving unrealizability of programming-by-demonstration problems. We have implemented our approach in a new tool called prolex and present the results of a comprehensive experimental evaluation on 120 benchmarks involving complex tasks and environments. We show that, given a 120 second time limit, prolex can find a program consistent with the demonstrations in 80% of the cases. Furthermore, for 81% of the tasks for which a solution is returned, prolex is able to find the ground truth program with just one demonstration. In comparison, CVC5, a syntaxguided synthesis tool, is only able to solve 25% of the cases even when given the ground truth program sketch , and an LLM-based approach, GPT-Synth, is unable to solve any of the tasks due to the environment complexity.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext d917c952-c0e8-42cc-a380-3068fa62dbd5Cited by top-tier papers3
- Control-Flow Deobfuscation using Trace-Informed Compositional Program SynthesisBenjamin Mariano, Ziteng Wang, Shankara Pailoor, Christian S. Collberg et al.OOPSLA 2024 · 5 citations
- Abstraction Refinement-Guided Program Synthesis for Robot Learning from DemonstrationsGuofeng Cui, Yuning Wang, Wensen Mao, Yuanlin Duan et al.OOPSLA 2025 · 1 citation
- Direct Manipulation and Natural Language Programming, Together at Last?Parker Ziegler, David Minh-Duy Cao, Justin Lubin, Sarah E. ChasinsOOPSLA 2026
Builds on25
- Jigsaw: Large Language Models meet Program SynthesisNaman Jain, Skanda Vaidyanath, Arun Iyer, Nagarajan Natarajan et al.ICSE 2022 · 134 citations
- Multi-modal synthesis of regular expressionsQiaochu Chen, Xinyu Wang, Xi Ye, Greg Durrett et al.PLDI 2020 · 81 citations
- Synthesizing structured CAD models with equality saturation and inverse transformationsChandrakana Nandi, Max Willsey, Adam Anderson, James R. Wilcox et al.PLDI 2020 · 65 citations
- Bottom-up synthesis of recursive functional programs using angelic executionAnders Miltner, Adrian Trejo Nuñez, Ana Brendel, Swarat Chaudhuri et al.POPL 2022 · 38 citations
- Multi-modal program inference: a marriage of pre-trained language models and component-based synthesisKia Rahmani, Mohammad Raza, Sumit Gulwani, Vu Le et al.OOPSLA 2021 · 32 citations
Related papers
- Neuro-symbolic Hierarchical Learning for Long-Horizon Robotic TasksYu Huang, Ziji Wu, Zhengyi Ma, Kexin Ma et al.PLDI 2026
- Demo2Code: From Summarizing Demonstrations to Synthesizing Code via Extended Chain-of-ThoughtYuki Wang, Gonzalo Gonzalez-Pumariega, Yash Sharma, Sanjiban ChoudhuryNeurIPS 2023 · 67 citations
- Reward-Guided Synthesis of Intelligent Agents with Control StructuresGuofeng Cui, Yuning Wang, Wenjie Qiu, He ZhuPLDI 2024 · 3 citations
- HYSYNTH: Context-Free LLM Approximation for Guiding Program SynthesisShraddha Barke, Emmanuel Anaya Gonzalez, Saketh Ram Kasibatla, Taylor Berg-Kirkpatrick et al.NeurIPS 2024 · 34 citations
- Incremental Program Synthesis from Event LogsJinwoo Kim, Victor Nicolet, Joey Dodds, Loris D'AntoniOOPSLA 2026
