ANPL: Towards Natural Programming with Interactive Decomposition
Di Huang, Ziyuan Nan, Xing Hu, Pengwei Jin, Shaohui Peng, Yuanbo Wen,, Rui Zhang, Zidong Du, Qi Guo, Yewen Pu, Yunji Chen

TL;DR
ANPL introduces an interactive programming system that enables users to iteratively refine generated code through structured decompositions, improving control and correctness in complex programming tasks.
Contribution
It presents a novel interactive framework combining sketching and natural language to decompose and refine programs, enhancing user control and local bug fixing.
Findings
Outperforms baseline systems on ARC tasks
Effective across multiple programming domains
Facilitates local bug resolution and task decomposition
Abstract
Though LLMs are capable of generating plausible programs, it's challenging to interact with the LLMs further to revise the program, especially if the user's specific requirements are different from the initial proposal. In this paper, we introduce ANPL, an interactive programming system that ensures users can always refine the generated code towards their specific programmatic intents via structured decompositions. Borrowing the paradigm of sketching from program synthesis, an ANPL program consists of a set of input-outputs that it must satisfy, a ``sketch'' -- control/data flow expressed in precise code (e.g. Python), and ``holes'' -- sub-modules to be implemented by the LLM specified with natural language. The user revises an ANPL program by either modifying the sketch, changing the language used to describe the holes, or providing additional input-outputs to a particular hole,…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
Taxonomy
TopicsSoftware Engineering Research · Parallel Computing and Optimization Techniques · Software Testing and Debugging Techniques
