Iterative program synthesis with code knowledge

IF 8.1 1区 计算机科学 0 COMPUTER SCIENCE, INFORMATION SYSTEMS
Jiaxin Liu , Yiwei Li , Jianhua Dai , Rongjia Xu , Yating Zhang , Wei Dong
{"title":"Iterative program synthesis with code knowledge","authors":"Jiaxin Liu ,&nbsp;Yiwei Li ,&nbsp;Jianhua Dai ,&nbsp;Rongjia Xu ,&nbsp;Yating Zhang ,&nbsp;Wei Dong","doi":"10.1016/j.ins.2025.122156","DOIUrl":null,"url":null,"abstract":"<div><div>Component-based synthesis aims to automatically synthesize programs from a collection of components, such as Java programs composed of application programming interfaces (APIs). However, synthesizing complex tasks remains inefficient due to the intractability of program space, which grows exponentially with the length of code. When faced with unfamiliar and complex tasks, programmers often turn to the code available online, reusing existing code knowledge to solve them. Inspired by this, we propose <span>Itas</span>, an explainable iterative program synthesis framework that incorporates code knowledge to reduce the complexity of program space and leverages modular encapsulation to synthesize more functions. Specifically, <span>Itas</span> narrows the program space externally with API knowledge, expands the program space internally with an iterative strategy to improve synthesis efficiency, and encapsulates non-API elements as general APIs to enhance modularity. To evaluate the effectiveness of <span>Itas</span>, we collect a benchmark of real programming tasks and conduct experiments on the conventional program synthesizers <span>SyPet</span> and <span>FrAngel</span>. The experimental results demonstrate that integrating with <span>Itas</span> substantially enhances synthesis efficiency, reducing the synthesis time by 97.02% compared to <span>SyPet</span> and 48.43% compared to <span>FrAngel</span>. Furthermore, comparisons with large language models show that <span>Itas</span> outperforms them in pass rate, successfully solving all tasks.</div></div>","PeriodicalId":51063,"journal":{"name":"Information Sciences","volume":"712 ","pages":"Article 122156"},"PeriodicalIF":8.1000,"publicationDate":"2025-04-02","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Information Sciences","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0020025525002889","RegionNum":1,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"0","JCRName":"COMPUTER SCIENCE, INFORMATION SYSTEMS","Score":null,"Total":0}
引用次数: 0

Abstract

Component-based synthesis aims to automatically synthesize programs from a collection of components, such as Java programs composed of application programming interfaces (APIs). However, synthesizing complex tasks remains inefficient due to the intractability of program space, which grows exponentially with the length of code. When faced with unfamiliar and complex tasks, programmers often turn to the code available online, reusing existing code knowledge to solve them. Inspired by this, we propose Itas, an explainable iterative program synthesis framework that incorporates code knowledge to reduce the complexity of program space and leverages modular encapsulation to synthesize more functions. Specifically, Itas narrows the program space externally with API knowledge, expands the program space internally with an iterative strategy to improve synthesis efficiency, and encapsulates non-API elements as general APIs to enhance modularity. To evaluate the effectiveness of Itas, we collect a benchmark of real programming tasks and conduct experiments on the conventional program synthesizers SyPet and FrAngel. The experimental results demonstrate that integrating with Itas substantially enhances synthesis efficiency, reducing the synthesis time by 97.02% compared to SyPet and 48.43% compared to FrAngel. Furthermore, comparisons with large language models show that Itas outperforms them in pass rate, successfully solving all tasks.
求助全文
约1分钟内获得全文 求助全文
来源期刊
Information Sciences
Information Sciences 工程技术-计算机:信息系统
CiteScore
14.00
自引率
17.30%
发文量
1322
审稿时长
10.4 months
期刊介绍: Informatics and Computer Science Intelligent Systems Applications is an esteemed international journal that focuses on publishing original and creative research findings in the field of information sciences. We also feature a limited number of timely tutorial and surveying contributions. Our journal aims to cater to a diverse audience, including researchers, developers, managers, strategic planners, graduate students, and anyone interested in staying up-to-date with cutting-edge research in information science, knowledge engineering, and intelligent systems. While readers are expected to share a common interest in information science, they come from varying backgrounds such as engineering, mathematics, statistics, physics, computer science, cell biology, molecular biology, management science, cognitive science, neurobiology, behavioral sciences, and biochemistry.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信