Article(id=1329419379059568684, tenantId=1146029695717560320, journalId=1324759914146529478, issueId=1329419378451394604, articleNumber=null, orderNo=null, doi=10.7544/issn1000-1239.202550663, pmid=null, cstr=null, oa=null, hot=null, price=null, onlineType=0, articleFormat=0, articleType=null, articleTypeStr=null, receivedDate=1761753600000, receivedDateStr=2025-10-30, revisedDate=1767024000000, revisedDateStr=2025-12-30, acceptedDate=null, acceptedDateStr=null, onlineDate=1794887879385, onlineDateStr=2026-11-17, pubDate=1774972800000, pubDateStr=2026-04-01, doiRegisterDate=null, doiRegisterDateStr=null, onlineIssueDate=1794887879385, onlineIssueDateStr=2026-11-17, onlineJustAcceptDate=null, onlineJustAcceptDateStr=null, onlineFirstDate=null, onlineFirstDateStr=null, sourceXml=null, magXml=null, createTime=1794887879385, creator=13701087609, updateTime=1794887879385, updator=13701087609, issue=Issue{id=1329419378451394604, tenantId=1146029695717560320, journalId=1324759914146529478, year='2026', volume='63', issue='4', pageStart='825', pageEnd='1093', issueExtLink='null', onlineDate='null', pubDate='1774972800000', pubDateStr='2026-04-01', beforeIssueId=null, nextIssueId=null, price=null, status=1, issueComplete=1, articleOrder=1, issueType=-1, specialIssue=null, createTime=1794887879240, creator='13701087609', updateTime=1794887879240, updator='13701087609', preIssue=null, nextIssue=null, articleTotal=null, ext=null, issueFiles=null, downloadFileDto=null}, startPage=854, endPage=867, ext={EN=ArticleExt(id=1329419379290255406, articleId=1329419379059568684, tenantId=1146029695717560320, journalId=1324759914146529478, language=EN, title=RD2ESC: Multi-Agent Embedded Code Generation Framework, columnId=1329419379227340845, journalTitle=Journal of Computer Research and Development, columnName=Special Issue on LLMs and Software Engineering, runingTitle=null, highlight=null, articleAbstract=

Large language models (LLM) are increasingly being applied in software engineering, but current automated code generation research primarily focuses on general-purpose functional code, lacking effective solutions for the specific requirements of embedded systems. We propose RD2ESC (requirements documents to embedded system code), a prompt-based fine-tuning method that enables LLMs to understand the complex relationships between embedded code and requirements documents, and constructs a multi-agent collaborative code generation framework capable of rapidly generating high-quality embedded code using requirements documents and reference code. Experimental results demonstrate that RD2ESC improves the Pass@1 metric from 0.15 to 0.71 compared with the GPT-4o baseline model, achieving a test pass rate of 0.75 and compilation pass rate of 0.96. Sensitivity analysis reveals that the method exhibits certain dependency on reference code quality, with Pass@1 declining from 0.68 to 0.47 under 10%~50% perturbation conditions and dropping to 0.25 without reference code, while still maintaining basic code generation capabilities. Ablation experiments confirm the synergistic effects among multi-agents, with the complete system demonstrating significant performance improvements compared with individual components. This research provides an effective technical framework for embedded code automatic generation, substantially enhancing embedded system development efficiency.

, authors=Shuru Tan1, Hongbin Xiao1, Zhi Li2, *, Xiaolan Xie3, Tianhao Wu3, Fei Tang4, authorsList=Shuru Tan, Hongbin Xiao, Zhi Li, Xiaolan Xie, Tianhao Wu, Fei Tang, authorCompany=null, correspAuthors=Zhi Li, authorNote=

born in 1998. PhD candidate. Student member of CCF. His main research interests include intelligent code generation, intelligent information processing, and requirements engineering

born in 1997. PhD candidate. Student member of CCF. His main research interests include requirements engineering, prompt engineering, and software engineering

born in 1969. PhD, professor, PhD supervisor. Distinguished member of CCF. His main research interests include software engineering and requirements engineering

born in 1974. PhD, professor, PhD supervisor. Her main research interests include big data, cloud computing, and manufacturing informatization

born in 1998. Master. His main research interests include machine learning, graph neural networks, and embedded code generation

born in 1978. Bachelor. Senior member of CCF, and a TOGAF enterprise architect. His main research interests include enterprise architecture, requirements engineering, and prompt engineering

, correspAuthorsNote=null, copyrightStatement=Copyright © 2026 Journal of Computer Research and Development. All rights reserved., copyrightOwner=null, extLink=null, articleAbsUrl=null, sourceXml=null, magXml=null, pdfUrl=null, pdf=null, pdfFileSize=null, pdfExtLink=null, richHtmlUrl=null, mobilePdfUrl=null, reviewReport=null, pdfFirstPage=null, abstractGraph=null, abstractGraphContent=null, abstractVideo=null, citation=null, cebUrl=null, magXmlContent=null, mapNumber=null, fund=null), CN=ArticleExt(id=1329419382213685326, articleId=1329419379059568684, tenantId=1146029695717560320, journalId=1324759914146529478, language=CN, title=RD2ESC:多智能体嵌入式代码生成框架, columnId=1329419379378335791, journalTitle=计算机研究与发展, columnName=大模型与软件工程专题, runingTitle=null, highlight=null, articleAbstract=

大语言模型(LLM)在软件工程中的应用日益广泛,但目前自动化代码生成研究主要集中于通用功能代码,缺乏针对嵌入式系统特殊需求的有效解决方案。提出了RD2ESC(requirements documents to embedded system code)方法,通过基于提示词的微调技术使LLM能够理解嵌入式代码与需求文档之间的复杂关系,并构建了多智能体协同的代码生成框架,能够利用需求文档和参考代码快速生成高质量的嵌入式代码。实验结果表明,RD2ESC相比GPT-4o基线模型在Pass@1指标上从0.15提升至0.71,测试通过率达到0.75,编译通过率达到0.95;敏感性分析显示该方法对参考代码质量存在一定依赖性,在10%~50%扰动条件下Pass@1从0.68降至0.47,完全无参考代码时降至0.25,但仍保持基础代码生成能力;消融实验证实了多智能体间的协同效应,完整系统相比单一组件展现出显著的性能提升。该研究为嵌入式代码自动生成提供了有效的技术框架,提升了嵌入式系统开发效率。

, authors=谭舒孺1, 肖宏彬1, 李智2, *, 谢晓兰3, 武天昊3, 汤飞4, authorsList=谭舒孺, 肖宏彬, 李智, 谢晓兰, 武天昊, 汤飞, authorCompany=null, correspAuthors=李智, authorNote=

1998年生。博士研究生。CCF学生会员。主要研究方向为智能代码生成、智能信息处理、需求工程

1997年生,博士研究生。CCF学生会员。主要研究方向为需求工程、提示工程、软件工程

1969年生。博士,教授,博士生导师。CCF杰出会员。主要研究方向为软件工程、需求工程

1974年生。博士,教授,博士生导师。主要研究方向为大数据、云计算、制造业信息化

1998年生。硕士。主要研究方向为机器学习、图神经网络、嵌入式代码生成

1978年生。学士。CCF高级会员,TOGAF企业架构师。主要研究方向为企业架构、需求工程、提示工程

, correspAuthorsNote=
李智()
, copyrightStatement=版权所有 © 2026 计算机研究与发展编辑部, copyrightOwner=null, extLink=null, articleAbsUrl=null, sourceXml=8vMco1uzLePLJGFtNYr/Ow==, magXml=BppiLlQ5VyO779D5hc6igw==, pdfUrl=null, pdf=dfqQVTsQ388qz/jkL+keEw==, pdfFileSize=1489415, pdfExtLink=null, richHtmlUrl=null, mobilePdfUrl=null, reviewReport=null, pdfFirstPage=null, abstractGraph=DYfNZxsRpQghV7cPvYK8aA==, abstractGraphContent=null, abstractVideo=null, citation=null, cebUrl=null, magXmlContent=H0QjiAYppAvED4plls1wLA==, mapNumber=null, fund=null)}, authors=[Author(id=1329419382805082204, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, orderNo=0, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=1392965146@qq.com, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1329419382872191070, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, authorId=1329419382805082204, language=EN, stringName=Shuru Tan, firstName=Shuru, middleName=null, lastName=Tan, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, address=1Key Lab of Education Blockchain and Intelligent Technology (Guangxi Normal University), Ministry of Education, Guilin, Guangxi 541004, bio={"content":"

born in 1998. PhD candidate. Student member of CCF. His main research interests include intelligent code generation, intelligent information processing, and requirements engineering

"}, bioImg=null, bioContent=

born in 1998. PhD candidate. Student member of CCF. His main research interests include intelligent code generation, intelligent information processing, and requirements engineering

, aboutCorrespAuthor=null), CN=AuthorExt(id=1329419382947688543, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, authorId=1329419382805082204, language=CN, stringName=谭舒孺, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, address=1教育部教育区块链与智能技术重点实验室(广西师范大学) 广西桂林 541004, bio={"img":"IA6Btdrv7yAUb7PqGAy92w==","content":"

1998年生。博士研究生。CCF学生会员。主要研究方向为智能代码生成、智能信息处理、需求工程

"}, bioImg=IA6Btdrv7yAUb7PqGAy92w==, bioContent=

1998年生。博士研究生。CCF学生会员。主要研究方向为智能代码生成、智能信息处理、需求工程

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1329419382440177743, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, xref=1, ext=[AuthorCompanyExt(id=1329419382473732176, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382440177743, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1Key Lab of Education Blockchain and Intelligent Technology (Guangxi Normal University), Ministry of Education, Guilin, Guangxi 541004), AuthorCompanyExt(id=1329419382490509393, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382440177743, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1教育部教育区块链与智能技术重点实验室(广西师范大学) 广西桂林 541004)])]), Author(id=1329419383010603105, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, orderNo=1, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1329419383094489187, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, authorId=1329419383010603105, language=EN, stringName=Hongbin Xiao, firstName=Hongbin, middleName=null, lastName=Xiao, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, address=1Key Lab of Education Blockchain and Intelligent Technology (Guangxi Normal University), Ministry of Education, Guilin, Guangxi 541004, bio={"content":"

born in 1997. PhD candidate. Student member of CCF. His main research interests include requirements engineering, prompt engineering, and software engineering

"}, bioImg=null, bioContent=

born in 1997. PhD candidate. Student member of CCF. His main research interests include requirements engineering, prompt engineering, and software engineering

, aboutCorrespAuthor=null), CN=AuthorExt(id=1329419383157403748, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, authorId=1329419383010603105, language=CN, stringName=肖宏彬, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, address=1教育部教育区块链与智能技术重点实验室(广西师范大学) 广西桂林 541004, bio={"img":"COjUzP75FSeCtOFEGq71fQ==","content":"

1997年生,博士研究生。CCF学生会员。主要研究方向为需求工程、提示工程、软件工程

"}, bioImg=COjUzP75FSeCtOFEGq71fQ==, bioContent=

1997年生,博士研究生。CCF学生会员。主要研究方向为需求工程、提示工程、软件工程

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1329419382440177743, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, xref=1, ext=[AuthorCompanyExt(id=1329419382473732176, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382440177743, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1Key Lab of Education Blockchain and Intelligent Technology (Guangxi Normal University), Ministry of Education, Guilin, Guangxi 541004), AuthorCompanyExt(id=1329419382490509393, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382440177743, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1教育部教育区块链与智能技术重点实验室(广西师范大学) 广西桂林 541004)])]), Author(id=1329419383216124006, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, orderNo=2, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=zhili@gxnu.edu.cn, emailSecond=null, emailThird=null, correspondingAuthor=1, authorType=1, ext={EN=AuthorExt(id=1329419383300010088, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, authorId=1329419383216124006, language=EN, stringName=Zhi Li, firstName=Zhi, middleName=null, lastName=Li, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=2, *, address=2College of Computer Science and Engineering, Guangxi Normal University, Guilin, Guangxi 541004, bio={"content":"

born in 1969. PhD, professor, PhD supervisor. Distinguished member of CCF. His main research interests include software engineering and requirements engineering

"}, bioImg=null, bioContent=

born in 1969. PhD, professor, PhD supervisor. Distinguished member of CCF. His main research interests include software engineering and requirements engineering

, aboutCorrespAuthor=null), CN=AuthorExt(id=1329419383354536041, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, authorId=1329419383216124006, language=CN, stringName=李智, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=2, *, address=2广西师范大学计算机科学与工程学院 广西桂林 541004, bio={"img":"nGQyA8Srxj+RuQKmX/1gXA==","content":"

1969年生。博士,教授,博士生导师。CCF杰出会员。主要研究方向为软件工程、需求工程

"}, bioImg=nGQyA8Srxj+RuQKmX/1gXA==, bioContent=

1969年生。博士,教授,博士生导师。CCF杰出会员。主要研究方向为软件工程、需求工程

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1329419382557618258, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, xref=2, ext=[AuthorCompanyExt(id=1329419382566006867, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382557618258, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2College of Computer Science and Engineering, Guangxi Normal University, Guilin, Guangxi 541004), AuthorCompanyExt(id=1329419382574395476, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382557618258, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2广西师范大学计算机科学与工程学院 广西桂林 541004)])]), Author(id=1329419383425839211, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, orderNo=3, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1329419383501336685, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, authorId=1329419383425839211, language=EN, stringName=Xiaolan Xie, firstName=Xiaolan, middleName=null, lastName=Xie, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=3, address=3College of Computer Science and Engineering, Guilin University of Technology,Guilin, Guangxi 541004, bio={"content":"

born in 1974. PhD, professor, PhD supervisor. Her main research interests include big data, cloud computing, and manufacturing informatization

"}, bioImg=null, bioContent=

born in 1974. PhD, professor, PhD supervisor. Her main research interests include big data, cloud computing, and manufacturing informatization

, aboutCorrespAuthor=null), CN=AuthorExt(id=1329419383572639854, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, authorId=1329419383425839211, language=CN, stringName=谢晓兰, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=3, address=3桂林理工大学计算机科学与工程学院 广西桂林 541004, bio={"img":"6GmVdVaBpIYzvkemDFjkPQ==","content":"

1974年生。博士,教授,博士生导师。主要研究方向为大数据、云计算、制造业信息化

"}, bioImg=6GmVdVaBpIYzvkemDFjkPQ==, bioContent=

1974年生。博士,教授,博士生导师。主要研究方向为大数据、云计算、制造业信息化

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1329419382637310037, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, xref=3, ext=[AuthorCompanyExt(id=1329419382670864470, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382637310037, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=3College of Computer Science and Engineering, Guilin University of Technology,Guilin, Guangxi 541004), AuthorCompanyExt(id=1329419382679253079, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382637310037, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=3桂林理工大学计算机科学与工程学院 广西桂林 541004)])]), Author(id=1329419383694274672, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, orderNo=4, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1329419383790743666, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, authorId=1329419383694274672, language=EN, stringName=Tianhao Wu, firstName=Tianhao, middleName=null, lastName=Wu, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=3, address=3College of Computer Science and Engineering, Guilin University of Technology,Guilin, Guangxi 541004, bio={"content":"

born in 1998. Master. His main research interests include machine learning, graph neural networks, and embedded code generation

"}, bioImg=null, bioContent=

born in 1998. Master. His main research interests include machine learning, graph neural networks, and embedded code generation

, aboutCorrespAuthor=null), CN=AuthorExt(id=1329419383857852531, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, authorId=1329419383694274672, language=CN, stringName=武天昊, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=3, address=3桂林理工大学计算机科学与工程学院 广西桂林 541004, bio={"img":"LDRKxFgoOxA/jlRdCfrYMg==","content":"

1998年生。硕士。主要研究方向为机器学习、图神经网络、嵌入式代码生成

"}, bioImg=LDRKxFgoOxA/jlRdCfrYMg==, bioContent=

1998年生。硕士。主要研究方向为机器学习、图神经网络、嵌入式代码生成

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1329419382637310037, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, xref=3, ext=[AuthorCompanyExt(id=1329419382670864470, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382637310037, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=3College of Computer Science and Engineering, Guilin University of Technology,Guilin, Guangxi 541004), AuthorCompanyExt(id=1329419382679253079, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382637310037, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=3桂林理工大学计算机科学与工程学院 广西桂林 541004)])]), Author(id=1329419383933350005, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, orderNo=5, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1329419384008847479, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, authorId=1329419383933350005, language=EN, stringName=Fei Tang, firstName=Fei, middleName=null, lastName=Tang, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=4, address=4Huawei Technologies Co., Ltd., Shenzhen, Guangdong 518000, bio={"content":"

born in 1978. Bachelor. Senior member of CCF, and a TOGAF enterprise architect. His main research interests include enterprise architecture, requirements engineering, and prompt engineering

"}, bioImg=null, bioContent=

born in 1978. Bachelor. Senior member of CCF, and a TOGAF enterprise architect. His main research interests include enterprise architecture, requirements engineering, and prompt engineering

, aboutCorrespAuthor=null), CN=AuthorExt(id=1329419384067567736, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, authorId=1329419383933350005, language=CN, stringName=汤飞, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=4, address=4华为技术有限公司 广东深圳 518000, bio={"img":"On7iwepYDHTNOKkikId4kg==","content":"

1978年生。学士。CCF高级会员,TOGAF企业架构师。主要研究方向为企业架构、需求工程、提示工程

"}, bioImg=On7iwepYDHTNOKkikId4kg==, bioContent=

1978年生。学士。CCF高级会员,TOGAF企业架构师。主要研究方向为企业架构、需求工程、提示工程

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1329419382737973336, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, xref=4, ext=[AuthorCompanyExt(id=1329419382746361945, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382737973336, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=4Huawei Technologies Co., Ltd., Shenzhen, Guangdong 518000), AuthorCompanyExt(id=1329419382754750554, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382737973336, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=4华为技术有限公司 广东深圳 518000)])])], keywords=[Keyword(id=1329419384164036729, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=EN, orderNo=1, keyword=embedded system code generation), Keyword(id=1329419384231145594, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=EN, orderNo=2, keyword=multi-agent collaboration), Keyword(id=1329419384289865851, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=EN, orderNo=3, keyword=large language models), Keyword(id=1329419384344391804, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=EN, orderNo=4, keyword=prompt engineering), Keyword(id=1329419384407306365, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=EN, orderNo=5, keyword=compiling feedback optimization), Keyword(id=1329419384478609534, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=CN, orderNo=1, keyword=嵌入式系统代码生成), Keyword(id=1329419384537329791, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=CN, orderNo=2, keyword=多智能体协作), Keyword(id=1329419384612827264, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=CN, orderNo=3, keyword=大语言模型), Keyword(id=1329419384675741825, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=CN, orderNo=4, keyword=提示工程), Keyword(id=1329419384738656386, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=CN, orderNo=5, keyword=编译反馈优化)], refs=[Reference(id=1329419386894528666, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=1, rfOrder=0, authorNames=null, journalName=null, refType=null, unstructuredReference=Moreira T G, Wehrmeister M A, Pereira C E, et al. Automatic code generation for embedded systems: From UML specifications to VHDL code[C]//Proc of the 2010 8th IEEE Int Conf on Industrial Informatics. Piscataway, NJ: IEEE, 2010: 1085−1090, articleTitle=null, refAbstract=null), Reference(id=1329419386965831835, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=2, rfOrder=1, authorNames=null, journalName=null, refType=null, unstructuredReference=Chen Mark, Tworek Jerry, Jun Heewoo, et al. Evaluating large language models trained on code[J]. arXiv preprint, arXiv: 2107.03374, 2021, articleTitle=null, refAbstract=null), Reference(id=1329419387024552092, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=3, rfOrder=2, authorNames=null, journalName=null, refType=null, unstructuredReference=Li Jia, Zhao Yunfei, Li Yongmin, et al. Acecoder: An effective prompting technique specialized in code generation[J]. ACM Transactions on Software Engineering and Methodology, 2024, 33(8): 1−26, articleTitle=null, refAbstract=null), Reference(id=1329419387095855261, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=4, rfOrder=3, authorNames=null, journalName=null, refType=null, unstructuredReference=Li Jia, Li Ge, Li Yongmin, et al. Structured chain-of-thought prompting for code generation[J]. ACM Transactions on Software Engineering and Methodology, 2025, 34(2): 1−23, articleTitle=null, refAbstract=null), Reference(id=1329419387167158430, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=5, rfOrder=4, authorNames=null, journalName=null, refType=null, unstructuredReference=Bambagini M, Di N M. A code generation framework for distributed real-time embedded systems[C]//Proc of the 2012 IEEE 17th Int Conf on Emerging Technologies & Factory Automation. Piscataway, NJ: IEEE, 2012: 1−10, articleTitle=null, refAbstract=null), Reference(id=1329419387225878687, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=6, rfOrder=5, authorNames=null, journalName=null, refType=null, unstructuredReference=Vidal J, De Lamotte F, Gogniat G, et al. A co-design approach for embedded system modeling and code generation with UML and MARTE[C]//Proc of the 2009 Design, Automation & Test in Europe Conf & Exhibition. Piscataway, NJ: IEEE, 2009: 226−231, articleTitle=null, refAbstract=null), Reference(id=1329419387292987552, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=7, rfOrder=6, authorNames=null, journalName=null, refType=null, unstructuredReference=Staron M, Durisic D. Autosar Standard[M]//Automotive Software Architectures: An Introduction. Berlin: Springer, 2017: 81−116, articleTitle=null, refAbstract=null), Reference(id=1329419387435593889, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=8, rfOrder=7, authorNames=null, journalName=null, refType=null, unstructuredReference=Dunne M, Schram K, Fischmeister S. Weaknesses in LLM-generated code for embedded systems networking[C]//Proc of the 2024 IEEE 24th Int Conf on Software Quality, Reliability and Security. Piscataway, NJ: IEEE, 2024: 250−261, articleTitle=null, refAbstract=null), Reference(id=1329419387523674274, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=9, rfOrder=8, authorNames=null, journalName=null, refType=null, unstructuredReference=Dong Yihong, Li Ge, Jin Zhi. CODEP: Grammatical seq2seq model for general-purpose code generation[C]//Proc of the ISSTA. New York: ACM, 2023: 188−198, articleTitle=null, refAbstract=null), Reference(id=1329419387599171747, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=10, rfOrder=9, authorNames=null, journalName=null, refType=null, unstructuredReference=Rozière B, Gehring J, Gloeckle F, et al. Code Llama: Open foundation models for code[J]. arXiv preprint, arXiv: 2308.12950, 2023, articleTitle=null, refAbstract=null), Reference(id=1329419387666280612, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=11, rfOrder=10, authorNames=null, journalName=null, refType=null, unstructuredReference=Nijkamp E, Pang Bo, Hayashi H, et al. Codegen: An open large language model for code with multi-turn program synthesis[C]//Proc of the ICLR. OpenReview. net, 2023: 1−25, articleTitle=null, refAbstract=null), Reference(id=1329419387729195173, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=12, rfOrder=11, authorNames=null, journalName=null, refType=null, unstructuredReference=Fried D, Aghajanyan A, Lin J, et al. Incoder: A generative model for code infilling and synthesis[J]. arXiv preprint, arXiv: 2204.05999, 2022, articleTitle=null, refAbstract=null), Reference(id=1329419387892773030, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=13, rfOrder=12, authorNames=null, journalName=null, refType=null, unstructuredReference=Jiang Xue, Dong Yihong, Wang L, et al. Self-planning code generation with large language models[J]. ACM Transactions on Software Engineering and Methodology, 2024, 33(7): 1−36, articleTitle=null, refAbstract=null), Reference(id=1329419388001824935, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=14, rfOrder=13, authorNames=null, journalName=null, refType=null, unstructuredReference=Jiang Xue, Dong Yihong, Jin Zhi, et al. SEED: Customize large language models with sample-efficient adaptation for code generation[J]. arXiv preprint, arXiv: 2403.00046, 2024, articleTitle=null, refAbstract=null), Reference(id=1329419388136042664, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=15, rfOrder=14, authorNames=null, journalName=null, refType=null, unstructuredReference=Zhang Tianyi, Yu Tao, Hashimoto T, et al. Coder reviewer reranking for code generation[C]//Proc of the ICML. New York: PMLR, 2023: 41832−41846, articleTitle=null, refAbstract=null), Reference(id=1329419388203151529, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=16, rfOrder=15, authorNames=null, journalName=null, refType=null, unstructuredReference=GitHub. Copilot[EB/OL]. 2022[2024-12-25]. https://github.com/features/copilot, articleTitle=null, refAbstract=null), Reference(id=1329419388282843306, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=17, rfOrder=16, authorNames=null, journalName=null, refType=null, unstructuredReference=Dohmke T, Iansiti Ma, Richards G. Sea change in software development: Economic and productivity analysis of the Ai-powered developer lifecycle[J]. arXiv preprint, arXiv: 2306.15033, 2023, articleTitle=null, refAbstract=null), Reference(id=1329419388400283819, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=18, rfOrder=17, authorNames=null, journalName=null, refType=null, unstructuredReference=Ahmad W U, Chakraborty S, Ray B, et al. Unified pre-training for program understanding and generation[C]//Proc of the NAACL-HLT. Stroudsburg, PA: ACL, 2021: 2655−2668, articleTitle=null, refAbstract=null), Reference(id=1329419388488364204, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=19, rfOrder=18, authorNames=null, journalName=null, refType=null, unstructuredReference=Wang Yue, Wang Weishi, Joty S R, et al. CodeT5: Identifier-aware unified pre-trained encoder-decoder models for code understanding and generation[C]//Proc of the 2021 Conf on Empirical Methods in Natural Language Processing. Stroudsburg, PA: ACL, 2021: 8696−8708, articleTitle=null, refAbstract=null), Reference(id=1329419388605804717, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=20, rfOrder=19, authorNames=null, journalName=null, refType=null, unstructuredReference=Li YuJia, Choi D, Chung J Y, et al. Competition level code generation with AlphaCode[J]. arXiv preprint, arXiv: 2203.07814, 2022, articleTitle=null, refAbstract=null), Reference(id=1329419388685496494, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=21, rfOrder=20, authorNames=null, journalName=null, refType=null, unstructuredReference=Black S, Biderman S, Hallahan E, et al. GPT-NeoX−20B: An open-source autoregressive language model[J]. arXiv preprint, arXiv: 2204.06745, 2022, articleTitle=null, refAbstract=null), Reference(id=1329419388752605359, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=22, rfOrder=21, authorNames=null, journalName=null, refType=null, unstructuredReference=Xu F F, Alon U, Neubig G, et al. A systematic evaluation of large language models of code[C]//Proc of the 6th ACM SIGPLAN Int Symp on Machine Programming. New York: ACM, 2022: 1−10, articleTitle=null, refAbstract=null), Reference(id=1329419388811325616, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=23, rfOrder=22, authorNames=null, journalName=null, refType=null, unstructuredReference=OpenAI. ChatGPT[EB/OL]. 2022. [2024-11-17]. https://openai.com/blog/chatgpt, articleTitle=null, refAbstract=null), Reference(id=1329419388865851569, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=24, rfOrder=23, authorNames=null, journalName=null, refType=null, unstructuredReference=OpenAI. GPT−4 technical report[J]. arXiv preprint, arXiv: 2303.08774, 2023, articleTitle=null, refAbstract=null), Reference(id=1329419388949737651, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=25, rfOrder=24, authorNames=null, journalName=null, refType=null, unstructuredReference=Jiang Xue, Dong Yihong, Tao Yingwei, et al. Rocode: Integrating backtracking mechanism and program analysis in large language models for code generation[J]. arXiv preprint, arXiv: 2411.07112, 2024, articleTitle=null, refAbstract=null), Reference(id=1329419389021040820, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=26, rfOrder=25, authorNames=null, journalName=null, refType=null, unstructuredReference=Shi F, Fried D, Ghazvininejad M, et al. Natural language to code translation with execution[J]. arXiv preprint, arXiv: 2204.11454, 2022, articleTitle=null, refAbstract=null), Reference(id=1329419389079761077, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=27, rfOrder=26, authorNames=null, journalName=null, refType=null, unstructuredReference=Agrawal L A, Kanade A, Goyal N, et al. Guiding language models of code with global context using monitors[J]. arXiv preprint, arXiv: 2306.10763, 2023, articleTitle=null, refAbstract=null), Reference(id=1329419389163647158, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=28, rfOrder=27, authorNames=null, journalName=null, refType=null, unstructuredReference=Brown T B, Mann B, Ryder N, et al. Language models are few-shot learners[C]//Proc of the 34th Annual Conf on Neural Information Processing Systems. Red Hook, NY: Curran Associates, 2020: 1877−1901, articleTitle=null, refAbstract=null), Reference(id=1329419389239144631, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=29, rfOrder=28, authorNames=null, journalName=null, refType=null, unstructuredReference=Dong Yihong, Jiang Xue, Jin Zhi, et al. Self-collaboration code generation via ChatGPT[J]. arXiv preprint, arXiv: 2304.07590, 2023, articleTitle=null, refAbstract=null), Reference(id=1329419389314642104, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=30, rfOrder=29, authorNames=null, journalName=null, refType=null, unstructuredReference=Liu Chao, Bao XuanLin, Zhang Hongyu, et al. Improving ChatGPT prompt for code generation[J]. arXiv preprint, arXiv: 2305.08360, 2023, articleTitle=null, refAbstract=null), Reference(id=1329419389377556665, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=31, rfOrder=30, authorNames=null, journalName=null, refType=null, unstructuredReference=Nashid N, Sintaha M, Mesbah A. Retrieval-based prompt selection for code-related few-shot learning[C]//Proc of the 45th IEEE/ACM Int Conf on Software Engineering. Piscataway, NJ: IEEE, 2023: 2450−2462, articleTitle=null, refAbstract=null), Reference(id=1329419389524357306, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=32, rfOrder=31, authorNames=null, journalName=null, refType=null, unstructuredReference=Shrivastava D, Larochelle H, Tarlow D. Repository-level prompt generation for large language models of code[J]. arXiv preprint, arXiv: 2206.12839, 2022, articleTitle=null, refAbstract=null), Reference(id=1329419389604049083, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=33, rfOrder=32, authorNames=null, journalName=null, refType=null, unstructuredReference=Wei J, Wang Xuezhi, Schuurmans D, et al. Chain of thought prompting elicits reasoning in large language models[J]. arXiv preprint, arXiv: 2201.11903, 2022, articleTitle=null, refAbstract=null), Reference(id=1329419389675352252, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=34, rfOrder=33, authorNames=null, journalName=null, refType=null, unstructuredReference=Kojima T, Gu S S, Reid M, et al. Large language models are zero-shot reasoners[J]. arXiv preprint, arXiv: 2205.11916, 2022, articleTitle=null, refAbstract=null), Reference(id=1329419389792792765, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=35, rfOrder=34, authorNames=null, journalName=null, refType=null, unstructuredReference=Li Jia, Li Ge, Li Yongmin, et al. Enabling programming thinking in large language models toward code generation[J]. arXiv preprint, arXiv: 2305.06599, 2023, articleTitle=null, refAbstract=null), Reference(id=1329419389864095934, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=36, rfOrder=35, authorNames=null, journalName=null, refType=null, unstructuredReference=Wang Chaozheng, Yang Yuanhang, Gao Cuiyun, et al. Prompt tuning in code intelligence: An experimental evaluation[J]. IEEE Trans on Software Engineering, 2023, 49(11): 4869−4885, articleTitle=null, refAbstract=null), Reference(id=1329419389968953535, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=37, rfOrder=36, authorNames=null, journalName=null, refType=null, unstructuredReference=Mu Fangwen, Shi Lin, Wang Shuai, et al. Clarifygpt: A framework for enhancing LLM-based code generation via requirements clarification[J]. Proceedings of the ACM on Software Engineering, 2024, 1(FSE): 2332−2354, articleTitle=null, refAbstract=null), Reference(id=1329419390136725696, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=38, rfOrder=37, authorNames=null, journalName=null, refType=null, unstructuredReference=Liu Jiawei, Xia C S, Wang Yuyao, et al. Is your code generated by ChatGPT really correct? Rigorous evaluation of large language models for code generation[J]. arXiv preprint, arXiv: 2305.01210, 2023, articleTitle=null, refAbstract=null), Reference(id=1329419390233194689, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=39, rfOrder=38, authorNames=null, journalName=null, refType=null, unstructuredReference=Chen Qian, Liu Wei, Liu Hongzhang, et al. ChatDev: Communicative agents for software development[C]//Proc of the 2024 Conf on Empirical Methods in Natural Language Processing. Stroudsburg, PA: ACL, 2024: 1−15, articleTitle=null, refAbstract=null), Reference(id=1329419390300303554, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=40, rfOrder=39, authorNames=null, journalName=null, refType=null, unstructuredReference=Huang Dong, Zhang J M, Luck M, et al. AgentCoder: Multi-agent code generation with effective testing and self-optimisation[J]. arXiv preprint, arXiv: 2312.13010, 2024, articleTitle=null, refAbstract=null), Reference(id=1329419390359023811, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, doi=null, pmid=null, pmcid=null, year=null, volume=null, issue=null, pageStart=null, pageEnd=null, url=null, language=null, rfNumber=41, rfOrder=40, authorNames=null, journalName=null, refType=null, unstructuredReference=Anysphere Inc. Cursor Documentation[EB/OL]. [2024-11-17]. https://cursor.com/docs, articleTitle=null, refAbstract=null)], funds=null, companyList=[AuthorCompany(id=1329419382440177743, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, xref=1, ext=[AuthorCompanyExt(id=1329419382473732176, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382440177743, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1Key Lab of Education Blockchain and Intelligent Technology (Guangxi Normal University), Ministry of Education, Guilin, Guangxi 541004), AuthorCompanyExt(id=1329419382490509393, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382440177743, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1教育部教育区块链与智能技术重点实验室(广西师范大学) 广西桂林 541004)]), AuthorCompany(id=1329419382557618258, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, xref=2, ext=[AuthorCompanyExt(id=1329419382566006867, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382557618258, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2College of Computer Science and Engineering, Guangxi Normal University, Guilin, Guangxi 541004), AuthorCompanyExt(id=1329419382574395476, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382557618258, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2广西师范大学计算机科学与工程学院 广西桂林 541004)]), AuthorCompany(id=1329419382637310037, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, xref=3, ext=[AuthorCompanyExt(id=1329419382670864470, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382637310037, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=3College of Computer Science and Engineering, Guilin University of Technology,Guilin, Guangxi 541004), AuthorCompanyExt(id=1329419382679253079, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382637310037, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=3桂林理工大学计算机科学与工程学院 广西桂林 541004)]), AuthorCompany(id=1329419382737973336, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, xref=4, ext=[AuthorCompanyExt(id=1329419382746361945, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382737973336, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=4Huawei Technologies Co., Ltd., Shenzhen, Guangdong 518000), AuthorCompanyExt(id=1329419382754750554, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382737973336, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=4华为技术有限公司 广东深圳 518000)])], figs=[ArticleFig(id=1329419384856096899, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=EN, label=Figure 1, caption=Multi-agent embedded code generation framework, figureFileSmall=pxgLunznIyYg9KJA+Qd0uQ==, figureFileBig=DYfNZxsRpQghV7cPvYK8aA==, tableContent=null), ArticleFig(id=1329419384944177284, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=CN, label=图1, caption=多智能体嵌入式代码生成框架, figureFileSmall=pxgLunznIyYg9KJA+Qd0uQ==, figureFileBig=DYfNZxsRpQghV7cPvYK8aA==, tableContent=null), ArticleFig(id=1329419385195835525, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=EN, label=Figure 2, caption=Key prompts for initial code agent, figureFileSmall=G657EiXO+jaElFI55+SHEA==, figureFileBig=pOItf0hLvufAVSCgb1x5Fg==, tableContent=null), ArticleFig(id=1329419385258750086, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=CN, label=图2, caption=初始代码智能体关键提示词, figureFileSmall=G657EiXO+jaElFI55+SHEA==, figureFileBig=pOItf0hLvufAVSCgb1x5Fg==, tableContent=null), ArticleFig(id=1329419385321664647, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=EN, label=Figure 3, caption=Key prompts for reference code generation agent, figureFileSmall=BQ4pfF0M4vfCO0Aov164Iw==, figureFileBig=tfymOb7VRA1DY/gHfdN5FQ==, tableContent=null), ArticleFig(id=1329419385384579208, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=CN, label=图3, caption=参考代码生成智能体的关键提示词, figureFileSmall=BQ4pfF0M4vfCO0Aov164Iw==, figureFileBig=tfymOb7VRA1DY/gHfdN5FQ==, tableContent=null), ArticleFig(id=1329419385455882377, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=EN, label=Figure 4, caption=Key prompts for code optimization suggestion agent, figureFileSmall=tFeK+R5ZavyaXA19cYTLJQ==, figureFileBig=y9/Juae0Topn4Mp2Elxaew==, tableContent=null), ArticleFig(id=1329419385522991242, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=CN, label=图4, caption=代码优化建议智能体关键提示词, figureFileSmall=tFeK+R5ZavyaXA19cYTLJQ==, figureFileBig=y9/Juae0Topn4Mp2Elxaew==, tableContent=null), ArticleFig(id=1329419385585905803, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=EN, label=Figure 5, caption=Communication content sent by code correction agent to requirement-driven code generation agent, figureFileSmall=fVBIWzCxLUTkeFC+8rHgsQ==, figureFileBig=bxjPtwE7HITKradaVrbp8w==, tableContent=null), ArticleFig(id=1329419385720123532, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=CN, label=图5, caption=代码纠正智能体发送给需求驱动代码生成智能体的交流内容, figureFileSmall=fVBIWzCxLUTkeFC+8rHgsQ==, figureFileBig=bxjPtwE7HITKradaVrbp8w==, tableContent=null), ArticleFig(id=1329419385887895693, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=EN, label=Figure 6, caption=Performance comparison of different models on RD2ESC, figureFileSmall=sMlJm3LoutLLUZOYBYb/yQ==, figureFileBig=BTUz4SJTFRRV9sWKK8QJgg==, tableContent=null), ArticleFig(id=1329419385963393166, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=CN, label=图6, caption=不同模型在RD2ESC上的性能对比, figureFileSmall=sMlJm3LoutLLUZOYBYb/yQ==, figureFileBig=BTUz4SJTFRRV9sWKK8QJgg==, tableContent=null), ArticleFig(id=1329419386034696335, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=EN, label=Figure 7, caption=Performance comparison results of RD2ESC under different structures, figureFileSmall=+tMvzZup36zhjBXD49GISA==, figureFileBig=RfrTwhGj6FEUTJBtxVtH4Q==, tableContent=null), ArticleFig(id=1329419386105999504, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=CN, label=图7, caption=不同结构下的RD2ESC性能对比结果, figureFileSmall=+tMvzZup36zhjBXD49GISA==, figureFileBig=RfrTwhGj6FEUTJBtxVtH4Q==, tableContent=null), ArticleFig(id=1329419386189885586, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=EN, label=Figure 8, caption=Evaluation of dependency of RD2ESC on reference code, figureFileSmall=f3MDJbArb9oYx6NH6D3k7g==, figureFileBig=Qr9HWpoFHotWlriEF8S/EQ==, tableContent=null), ArticleFig(id=1329419386269577363, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=CN, label=图8, caption=RD2ESC对参考代码的依赖性评估, figureFileSmall=f3MDJbArb9oYx6NH6D3k7g==, figureFileBig=Qr9HWpoFHotWlriEF8S/EQ==, tableContent=null), ArticleFig(id=1329419386328297620, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=EN, label=Table 1, caption=

Characteristics of Code Compiling with Different Styles

, figureFileSmall=null, figureFileBig=null, tableContent=
方面结构化编程模块化编程面向过程式编程
设计焦点控制结构和
程序逻辑
模块划分和
接口设计
过程抽象和
算法实现
代码组织按控制结构组织
(顺序、选择、循环)
按功能模块组织按过程和函数组织
数据管理局部变量为主,
避免“go to”语句
模块封装数据 +
接口传递
函数参数、局部
变量和返回值
接口设计结构化控制流明确的模块接口
和契约
标准化函数接口
), ArticleFig(id=1329419386403795093, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=CN, label=表1, caption=

不同风格的代码编写特点

, figureFileSmall=null, figureFileBig=null, tableContent=
方面结构化编程模块化编程面向过程式编程
设计焦点控制结构和
程序逻辑
模块划分和
接口设计
过程抽象和
算法实现
代码组织按控制结构组织
(顺序、选择、循环)
按功能模块组织按过程和函数组织
数据管理局部变量为主,
避免“go to”语句
模块封装数据 +
接口传递
函数参数、局部
变量和返回值
接口设计结构化控制流明确的模块接口
和契约
标准化函数接口
), ArticleFig(id=1329419386500264086, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=EN, label=Table 2, caption=

Comparative Results of Code Generation Quality and Baseline Models of RD2ESC %

, figureFileSmall=null, figureFileBig=null, tableContent=
方法Pass@1平均测试功能
通过率
平均代码编译
通过率
Claude 3.7 Sonnet13.333541
Claude 4 Sonnet18.334148
GPT-4o153540
GPT-4.116.673538
Codex13.333028
Cursor18.334046
SCOT203346
MBR-EXEC21.674555
MGD28.334865
ROCODE556893
ChatDev35.004853
AgentCoder48.335585
RD2ESC (T=0)68.337395
RD2ESC (T=0.4)71.677595
RD2ESC (T=0.6)68.337191
RD2ESC (T=0.8)61.676888
), ArticleFig(id=1329419386588344471, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=CN, label=表2, caption=

RD2ESC的代码生成质量与基准模型对比结果

, figureFileSmall=null, figureFileBig=null, tableContent=
方法Pass@1平均测试功能
通过率
平均代码编译
通过率
Claude 3.7 Sonnet13.333541
Claude 4 Sonnet18.334148
GPT-4o153540
GPT-4.116.673538
Codex13.333028
Cursor18.334046
SCOT203346
MBR-EXEC21.674555
MGD28.334865
ROCODE556893
ChatDev35.004853
AgentCoder48.335585
RD2ESC (T=0)68.337395
RD2ESC (T=0.4)71.677595
RD2ESC (T=0.6)68.337191
RD2ESC (T=0.8)61.676888
), ArticleFig(id=1329419386672230552, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=EN, label=Table 3, caption=

Comparative Results of Development Time under Different Methods

, figureFileSmall=null, figureFileBig=null, tableContent=
学生手动开发借助参考
代码开发
借助大模
型开发
借助工
具开发
相对手
工提升
比例/%
相对参考
代码提升
比例/%
A22 h9.5 h12 h3 h 10 min8667
B27.5 h12 h15 h3 h 45 min8669
C34 h15.5 h18 h4 h 05 min8874
D29.5 h13.5 h16 h4 h 55 min8364
E38 h17 h20 h4 h 40 min8873
F25 h11.5 h13 h4 h 20 min8362
), ArticleFig(id=1329419386743533721, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, language=CN, label=表3, caption=

在不同方法下的开发时间对比结果

, figureFileSmall=null, figureFileBig=null, tableContent=
学生手动开发借助参考
代码开发
借助大模
型开发
借助工
具开发
相对手
工提升
比例/%
相对参考
代码提升
比例/%
A22 h9.5 h12 h3 h 10 min8667
B27.5 h12 h15 h3 h 45 min8669
C34 h15.5 h18 h4 h 05 min8874
D29.5 h13.5 h16 h4 h 55 min8364
E38 h17 h20 h4 h 40 min8873
F25 h11.5 h13 h4 h 20 min8362
)], attaches=null, journal=Journal(id=1324759606947315908, delFlag=0, nameCn=计算机研究与发展, nameEn=Journal of Computer Research and Development, nameHistory1=null, nameHistory2=null, issn=1000-1239, eissn=null, cn=11-1777/TP, coden=null, periodic=0, language=CN, oaType=null, ccby=null, superviseOffice=null, ownerOffice=null, pubOffice=null, editorOffice=null, officeType=null, aims=null, clcCode=null, officeProv=null, officeCity=null, officeAddr=null, officeZip=null, officeEmail=null, officePhone=null, editDirector=null, officeDirector=null, officeDirectorPhone=null, officeStaffNum=null, officeEmpNum=null, coverPicUrl=k2l8zgqwstuxxevFX2qxVA==, journalPrice=null, startedYear=null, abbrevIsoEn=Journal of Computer Research and Development, journalRemark=null, publicationField=null, createdTime=1793776903141, updatedTime=1793850698612, createdBy=18614031015, updatedBy=13701087609, firstLetterCn=J, firstLetterEn=J, subjectCode=Electronic Information, subjectName=null, subjectCodeEn=Electronic Information, subjectNameEn=null, picCn=k2l8zgqwstuxxevFX2qxVA==, picEn=r6k0Ry+RD+c/VXj5QarmDw==, jcr=null, cjcr=null, exts=[JournalExt(id=1325069127710286688, language=CN, name=计算机研究与发展, nameHistory1=null, nameHistory2=null, managedBy=, sponsoredBy=, publishedBy=, editorOffice=, officeProv=null, officeCity=null, officeAddr=, officeZip=, editDirector=, officeDirector=null, officePhone=null, coverPicUrl=null, journalRemark=, submitArticleUrl=null, websiteUrl=, createdTime=1793850698640, updatedTime=1793850698640, createdBy=13701087609, updatedBy=13701087609, submissionGuidelinesUrl=, submissionAuthorUrl=https://crad.ict.ac.cn/journalx/authorLogOn.action, submissionEditorUrl=https://crad.ict.ac.cn/journalx/editorLogOn.action, submissionReviewUrl=https://crad.ict.ac.cn/journalx/expertLogOn.action, submissionCeEditorUrl=https://crad.ict.ac.cn/journalx/editorInChiefLogOn.action, submissionAeEditorUrl=, option={"copyright":""}), JournalExt(id=1325069127777395553, language=EN, name=Journal of Computer Research and Development, nameHistory1=null, nameHistory2=null, managedBy=, sponsoredBy=, publishedBy=, editorOffice=, officeProv=null, officeCity=null, officeAddr=, officeZip=, editDirector=, officeDirector=null, officePhone=null, coverPicUrl=null, journalRemark=, submitArticleUrl=null, websiteUrl=, createdTime=1793850698656, updatedTime=1793850698656, createdBy=13701087609, updatedBy=13701087609, submissionGuidelinesUrl=, submissionAuthorUrl=https://crad.ict.ac.cn/journalx/authorLogOn.action, submissionEditorUrl=https://crad.ict.ac.cn/journalx/editorLogOn.action, submissionReviewUrl=https://crad.ict.ac.cn/journalx/expertLogOn.action, submissionCeEditorUrl=https://crad.ict.ac.cn/journalx/editorInChiefLogOn.action, submissionAeEditorUrl=, option={"copyright":""})], databaseList=null, tenantJournalId=1324759914146529478, websiteList=[Website(id=1325070300139892771, webName=null, webTitle=null, webDomain=null, webCopyrigh=null, webIpcNo=null, seoTitle=null, seoKeywords=null, seoDescription=null, tenantJournalId=null, journalId=1324759914146529478, journalNameCn=null, journalNameEn=null, grayFlag=null, tenantId=1146029695717560320, platformId=null, journalGroupId=null, journalGroupNameCn=null, journalGroupNameEn=null, type=1, domain=https://castjournals.cast.org.cn/joweb/jsjyjyfz/CN, language=CN, createTime=1793850978169, createBy=18614031015, updateTime=1793851040259, updateBy=18614031015, name=计算机研究与发展-中文, tplId=1146099689490845704, title=计算机研究与发展, delFlag=0, indexPage=/home, props=[WebsiteProps(id=1325070893751349360, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=articleTextType, value=kx, createTime=1793851119697, updateTime=1793851119697, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893730377837, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=banner, value=null, createTime=1793851119692, updateTime=1793851119692, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893772320883, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=grayFlag, value=0, createTime=1793851119702, updateTime=1793851119702, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893721989228, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=logo, value=https://castjournals.cast.org.cn/joweb/jsjyjyfz/CN/file/pic?fileId=U27tDsy717YF7XSPA+Vwdw==, createTime=1793851119690, updateTime=1793851119690, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893784903797, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=minRunFlag, value=0, createTime=1793851119705, updateTime=1793851119705, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893742960751, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=picServerUrl, value=https://castjournals.cast.org.cn/joweb/jsjyjyfz/CN/file/pic, createTime=1793851119695, updateTime=1793851119695, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893780709492, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=silenceFlag, value=0, createTime=1793851119704, updateTime=1793851119704, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893738766446, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=staticResourcePath, value=https://castjournals.cast.org.cn/joweb/cast_kjdb_cn_619/, createTime=1793851119694, updateTime=1793851119694, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893755543665, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=themeColor, value=null, createTime=1793851119698, updateTime=1793851119698, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070893763932274, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300139892771, code=themeStyle, value=null, createTime=1793851119700, updateTime=1793851119700, creator=18614031015, updator=18614031015)]), Website(id=1325070300580294698, webName=null, webTitle=null, webDomain=null, webCopyrigh=null, webIpcNo=null, seoTitle=null, seoKeywords=null, seoDescription=null, tenantJournalId=null, journalId=1324759914146529478, journalNameCn=null, journalNameEn=null, grayFlag=null, tenantId=1146029695717560320, platformId=null, journalGroupId=null, journalGroupNameCn=null, journalGroupNameEn=null, type=1, domain=https://castjournals.cast.org.cn/joweb/jsjyjyfz/EN, language=EN, createTime=1793850978274, createBy=18614031015, updateTime=1793851036638, updateBy=18614031015, name=计算机研究与发展-英文, tplId=1146101810881728533, title=Journal of Computer Research and Development, delFlag=0, indexPage=/home, props=[WebsiteProps(id=1325070925288321148, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=articleTextType, value=kx, createTime=1793851127216, updateTime=1793851127216, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925263155321, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=banner, value=null, createTime=1793851127210, updateTime=1793851127210, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925309292671, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=grayFlag, value=0, createTime=1793851127221, updateTime=1793851127221, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925254766712, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=logo, value=https://castjournals.cast.org.cn/joweb/jsjyjyfz/EN/file/pic?fileId=U27tDsy717YF7XSPA+Vwdw==, createTime=1793851127208, updateTime=1793851127208, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925326069889, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=minRunFlag, value=0, createTime=1793851127225, updateTime=1793851127225, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925279932539, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=picServerUrl, value=https://castjournals.cast.org.cn/joweb/jsjyjyfz/EN/file/pic, createTime=1793851127214, updateTime=1793851127214, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925317681280, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=silenceFlag, value=0, createTime=1793851127223, updateTime=1793851127223, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925271543930, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=staticResourcePath, value=https://castjournals.cast.org.cn/joweb/cast_kjdb_en_623/, createTime=1793851127212, updateTime=1793851127212, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925292515453, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=themeColor, value=null, createTime=1793851127217, updateTime=1793851127217, creator=18614031015, updator=18614031015), WebsiteProps(id=1325070925300904062, tenantId=1146029695717560320, journalId=null, journalGroupId=null, siteId=1325070300580294698, code=themeStyle, value=null, createTime=1793851127219, updateTime=1793851127219, creator=18614031015, updator=18614031015)])], journalTitle=计算机研究与发展, weixinUrl=null, journalUrl=https://crad.ict.ac.cn/, iacademicId=null, status=1, seqNo=null, journalTitleEn=Journal of Computer Research and Development, journalPhotoCn=k2l8zgqwstuxxevFX2qxVA==, journalPhotoEn=r6k0Ry+RD+c/VXj5QarmDw==, journalFirstLetter=J, journalRecommend=null, journalNew=null, journalCollection=null, jcrJf=null, cjcrJf=null, jcrJfStr=null, cjcrJfStr=null, submissionFirstDecision=null, sciSubjectClassification=null, casSubjectClassification=null, citeScore=null, totalCitationFrequency=null, icpCode=null, psCode=null, advertisingLicenseCode=null, copyrightInformation=null, country=null, option=, provinceCode=null, provinceName=null, collectFlag=false, interPubPlatform=, interPubPlatformUrl=null), detailUrlCn=https://castjournals.cast.org.cn/joweb/jsjyjyfz/CN/10.7544/issn1000-1239.202550663, detailUrlEn=https://castjournals.cast.org.cn/joweb/jsjyjyfz/EN/10.7544/issn1000-1239.202550663, pdfUrlCn=https://castjournals.cast.org.cn/joweb/jsjyjyfz/CN/PDF/10.7544/issn1000-1239.202550663, pdfUrlEn=https://castjournals.cast.org.cn/joweb/jsjyjyfz/EN/PDF/10.7544/issn1000-1239.202550663, aliStartDate=0, aliEndDate=0, collectionFlag=false, citedCount=null, citedUrl=null, previewStatus=0, delFlag=0, hasFullText=1, orderTime=1774972800000, fullTextJson=null, articleText=null, reference=null)
收藏切换
RD2ESC:多智能体嵌入式代码生成框架
谭舒孺 1 , 肖宏彬 1 , 李智 2, * , 谢晓兰 3 , 武天昊 3 , 汤飞 4
计算机研究与发展 | 大模型与软件工程专题 2026,63(4): 854-867
收起
收藏切换
计算机研究与发展 |大模型与软件工程专题 2026 , 63 (4) : 854 -867
RD2ESC:多智能体嵌入式代码生成框架
全屏
[Author(id=1329419382805082204, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, orderNo=0, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=1392965146@qq.com, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1329419382872191070, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, authorId=1329419382805082204, language=EN, stringName=Shuru Tan, firstName=Shuru, middleName=null, lastName=Tan, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, address=1Key Lab of Education Blockchain and Intelligent Technology (Guangxi Normal University), Ministry of Education, Guilin, Guangxi 541004, bio={"content":"

born in 1998. PhD candidate. Student member of CCF. His main research interests include intelligent code generation, intelligent information processing, and requirements engineering

"}, bioImg=null, bioContent=

born in 1998. PhD candidate. Student member of CCF. His main research interests include intelligent code generation, intelligent information processing, and requirements engineering

, aboutCorrespAuthor=null), CN=AuthorExt(id=1329419382947688543, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, authorId=1329419382805082204, language=CN, stringName=谭舒孺, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, address=1教育部教育区块链与智能技术重点实验室(广西师范大学) 广西桂林 541004, bio={"img":"IA6Btdrv7yAUb7PqGAy92w==","content":"

1998年生。博士研究生。CCF学生会员。主要研究方向为智能代码生成、智能信息处理、需求工程

"}, bioImg=IA6Btdrv7yAUb7PqGAy92w==, bioContent=

1998年生。博士研究生。CCF学生会员。主要研究方向为智能代码生成、智能信息处理、需求工程

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1329419382440177743, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, xref=1, ext=[AuthorCompanyExt(id=1329419382473732176, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382440177743, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1Key Lab of Education Blockchain and Intelligent Technology (Guangxi Normal University), Ministry of Education, Guilin, Guangxi 541004), AuthorCompanyExt(id=1329419382490509393, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382440177743, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1教育部教育区块链与智能技术重点实验室(广西师范大学) 广西桂林 541004)])]), Author(id=1329419383010603105, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, orderNo=1, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1329419383094489187, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, authorId=1329419383010603105, language=EN, stringName=Hongbin Xiao, firstName=Hongbin, middleName=null, lastName=Xiao, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, address=1Key Lab of Education Blockchain and Intelligent Technology (Guangxi Normal University), Ministry of Education, Guilin, Guangxi 541004, bio={"content":"

born in 1997. PhD candidate. Student member of CCF. His main research interests include requirements engineering, prompt engineering, and software engineering

"}, bioImg=null, bioContent=

born in 1997. PhD candidate. Student member of CCF. His main research interests include requirements engineering, prompt engineering, and software engineering

, aboutCorrespAuthor=null), CN=AuthorExt(id=1329419383157403748, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, authorId=1329419383010603105, language=CN, stringName=肖宏彬, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=1, address=1教育部教育区块链与智能技术重点实验室(广西师范大学) 广西桂林 541004, bio={"img":"COjUzP75FSeCtOFEGq71fQ==","content":"

1997年生,博士研究生。CCF学生会员。主要研究方向为需求工程、提示工程、软件工程

"}, bioImg=COjUzP75FSeCtOFEGq71fQ==, bioContent=

1997年生,博士研究生。CCF学生会员。主要研究方向为需求工程、提示工程、软件工程

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1329419382440177743, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, xref=1, ext=[AuthorCompanyExt(id=1329419382473732176, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382440177743, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1Key Lab of Education Blockchain and Intelligent Technology (Guangxi Normal University), Ministry of Education, Guilin, Guangxi 541004), AuthorCompanyExt(id=1329419382490509393, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382440177743, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=1教育部教育区块链与智能技术重点实验室(广西师范大学) 广西桂林 541004)])]), Author(id=1329419383216124006, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, orderNo=2, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=zhili@gxnu.edu.cn, emailSecond=null, emailThird=null, correspondingAuthor=1, authorType=1, ext={EN=AuthorExt(id=1329419383300010088, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, authorId=1329419383216124006, language=EN, stringName=Zhi Li, firstName=Zhi, middleName=null, lastName=Li, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=2, *, address=2College of Computer Science and Engineering, Guangxi Normal University, Guilin, Guangxi 541004, bio={"content":"

born in 1969. PhD, professor, PhD supervisor. Distinguished member of CCF. His main research interests include software engineering and requirements engineering

"}, bioImg=null, bioContent=

born in 1969. PhD, professor, PhD supervisor. Distinguished member of CCF. His main research interests include software engineering and requirements engineering

, aboutCorrespAuthor=null), CN=AuthorExt(id=1329419383354536041, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, authorId=1329419383216124006, language=CN, stringName=李智, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=2, *, address=2广西师范大学计算机科学与工程学院 广西桂林 541004, bio={"img":"nGQyA8Srxj+RuQKmX/1gXA==","content":"

1969年生。博士,教授,博士生导师。CCF杰出会员。主要研究方向为软件工程、需求工程

"}, bioImg=nGQyA8Srxj+RuQKmX/1gXA==, bioContent=

1969年生。博士,教授,博士生导师。CCF杰出会员。主要研究方向为软件工程、需求工程

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1329419382557618258, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, xref=2, ext=[AuthorCompanyExt(id=1329419382566006867, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382557618258, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2College of Computer Science and Engineering, Guangxi Normal University, Guilin, Guangxi 541004), AuthorCompanyExt(id=1329419382574395476, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382557618258, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=2广西师范大学计算机科学与工程学院 广西桂林 541004)])]), Author(id=1329419383425839211, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, orderNo=3, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1329419383501336685, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, authorId=1329419383425839211, language=EN, stringName=Xiaolan Xie, firstName=Xiaolan, middleName=null, lastName=Xie, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=3, address=3College of Computer Science and Engineering, Guilin University of Technology,Guilin, Guangxi 541004, bio={"content":"

born in 1974. PhD, professor, PhD supervisor. Her main research interests include big data, cloud computing, and manufacturing informatization

"}, bioImg=null, bioContent=

born in 1974. PhD, professor, PhD supervisor. Her main research interests include big data, cloud computing, and manufacturing informatization

, aboutCorrespAuthor=null), CN=AuthorExt(id=1329419383572639854, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, authorId=1329419383425839211, language=CN, stringName=谢晓兰, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=3, address=3桂林理工大学计算机科学与工程学院 广西桂林 541004, bio={"img":"6GmVdVaBpIYzvkemDFjkPQ==","content":"

1974年生。博士,教授,博士生导师。主要研究方向为大数据、云计算、制造业信息化

"}, bioImg=6GmVdVaBpIYzvkemDFjkPQ==, bioContent=

1974年生。博士,教授,博士生导师。主要研究方向为大数据、云计算、制造业信息化

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1329419382637310037, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, xref=3, ext=[AuthorCompanyExt(id=1329419382670864470, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382637310037, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=3College of Computer Science and Engineering, Guilin University of Technology,Guilin, Guangxi 541004), AuthorCompanyExt(id=1329419382679253079, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382637310037, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=3桂林理工大学计算机科学与工程学院 广西桂林 541004)])]), Author(id=1329419383694274672, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, orderNo=4, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1329419383790743666, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, authorId=1329419383694274672, language=EN, stringName=Tianhao Wu, firstName=Tianhao, middleName=null, lastName=Wu, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=3, address=3College of Computer Science and Engineering, Guilin University of Technology,Guilin, Guangxi 541004, bio={"content":"

born in 1998. Master. His main research interests include machine learning, graph neural networks, and embedded code generation

"}, bioImg=null, bioContent=

born in 1998. Master. His main research interests include machine learning, graph neural networks, and embedded code generation

, aboutCorrespAuthor=null), CN=AuthorExt(id=1329419383857852531, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, authorId=1329419383694274672, language=CN, stringName=武天昊, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=3, address=3桂林理工大学计算机科学与工程学院 广西桂林 541004, bio={"img":"LDRKxFgoOxA/jlRdCfrYMg==","content":"

1998年生。硕士。主要研究方向为机器学习、图神经网络、嵌入式代码生成

"}, bioImg=LDRKxFgoOxA/jlRdCfrYMg==, bioContent=

1998年生。硕士。主要研究方向为机器学习、图神经网络、嵌入式代码生成

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1329419382637310037, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, xref=3, ext=[AuthorCompanyExt(id=1329419382670864470, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382637310037, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=3College of Computer Science and Engineering, Guilin University of Technology,Guilin, Guangxi 541004), AuthorCompanyExt(id=1329419382679253079, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382637310037, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=3桂林理工大学计算机科学与工程学院 广西桂林 541004)])]), Author(id=1329419383933350005, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, orderNo=5, firstName=null, middleName=null, lastName=null, nameCn=null, orcid=null, stid=null, country=null, authorPic=null, dead=0, email=null, emailSecond=null, emailThird=null, correspondingAuthor=0, authorType=1, ext={EN=AuthorExt(id=1329419384008847479, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, authorId=1329419383933350005, language=EN, stringName=Fei Tang, firstName=Fei, middleName=null, lastName=Tang, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=4, address=4Huawei Technologies Co., Ltd., Shenzhen, Guangdong 518000, bio={"content":"

born in 1978. Bachelor. Senior member of CCF, and a TOGAF enterprise architect. His main research interests include enterprise architecture, requirements engineering, and prompt engineering

"}, bioImg=null, bioContent=

born in 1978. Bachelor. Senior member of CCF, and a TOGAF enterprise architect. His main research interests include enterprise architecture, requirements engineering, and prompt engineering

, aboutCorrespAuthor=null), CN=AuthorExt(id=1329419384067567736, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, authorId=1329419383933350005, language=CN, stringName=汤飞, firstName=null, middleName=null, lastName=null, prefix=null, suffix=null, authorComment=null, nameInitials=null, affiliation=null, department=null, xref=4, address=4华为技术有限公司 广东深圳 518000, bio={"img":"On7iwepYDHTNOKkikId4kg==","content":"

1978年生。学士。CCF高级会员,TOGAF企业架构师。主要研究方向为企业架构、需求工程、提示工程

"}, bioImg=On7iwepYDHTNOKkikId4kg==, bioContent=

1978年生。学士。CCF高级会员,TOGAF企业架构师。主要研究方向为企业架构、需求工程、提示工程

, aboutCorrespAuthor=null)}, companyList=[AuthorCompany(id=1329419382737973336, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, xref=4, ext=[AuthorCompanyExt(id=1329419382746361945, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382737973336, language=EN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=4Huawei Technologies Co., Ltd., Shenzhen, Guangdong 518000), AuthorCompanyExt(id=1329419382754750554, tenantId=1146029695717560320, journalId=1324759914146529478, articleId=1329419379059568684, companyId=1329419382737973336, language=CN, country=null, province=null, city=null, postcode=null, companyName=null, departmentName=null, remark=4华为技术有限公司 广东深圳 518000)])])]
谭舒孺1 , 肖宏彬1, 李智2, * , 谢晓兰3, 武天昊3, 汤飞4
作者信息
  • 1教育部教育区块链与智能技术重点实验室(广西师范大学) 广西桂林 541004
  • 2广西师范大学计算机科学与工程学院 广西桂林 541004
  • 3桂林理工大学计算机科学与工程学院 广西桂林 541004
  • 4华为技术有限公司 广东深圳 518000
通讯作者:
李智()
作者简介:

1998年生。博士研究生。CCF学生会员。主要研究方向为智能代码生成、智能信息处理、需求工程

1997年生,博士研究生。CCF学生会员。主要研究方向为需求工程、提示工程、软件工程

1969年生。博士,教授,博士生导师。CCF杰出会员。主要研究方向为软件工程、需求工程

1974年生。博士,教授,博士生导师。主要研究方向为大数据、云计算、制造业信息化

1998年生。硕士。主要研究方向为机器学习、图神经网络、嵌入式代码生成

1978年生。学士。CCF高级会员,TOGAF企业架构师。主要研究方向为企业架构、需求工程、提示工程

RD2ESC: Multi-Agent Embedded Code Generation Framework
Shuru Tan1 , Hongbin Xiao1, Zhi Li2, * , Xiaolan Xie3, Tianhao Wu3, Fei Tang4
Affiliations
  • 1Key Lab of Education Blockchain and Intelligent Technology (Guangxi Normal University), Ministry of Education, Guilin, Guangxi 541004
  • 2College of Computer Science and Engineering, Guangxi Normal University, Guilin, Guangxi 541004
  • 3College of Computer Science and Engineering, Guilin University of Technology,Guilin, Guangxi 541004
  • 4Huawei Technologies Co., Ltd., Shenzhen, Guangdong 518000
  • born in 1998. PhD candidate. Student member of CCF. His main research interests include intelligent code generation, intelligent information processing, and requirements engineering

    born in 1997. PhD candidate. Student member of CCF. His main research interests include requirements engineering, prompt engineering, and software engineering

    born in 1969. PhD, professor, PhD supervisor. Distinguished member of CCF. His main research interests include software engineering and requirements engineering

    born in 1974. PhD, professor, PhD supervisor. Her main research interests include big data, cloud computing, and manufacturing informatization

    born in 1998. Master. His main research interests include machine learning, graph neural networks, and embedded code generation

    born in 1978. Bachelor. Senior member of CCF, and a TOGAF enterprise architect. His main research interests include enterprise architecture, requirements engineering, and prompt engineering

出版时间: 2026-04-01 doi: 10.7544/issn1000-1239.202550663
文章导航
收藏切换

大语言模型(LLM)在软件工程中的应用日益广泛,但目前自动化代码生成研究主要集中于通用功能代码,缺乏针对嵌入式系统特殊需求的有效解决方案。提出了RD2ESC(requirements documents to embedded system code)方法,通过基于提示词的微调技术使LLM能够理解嵌入式代码与需求文档之间的复杂关系,并构建了多智能体协同的代码生成框架,能够利用需求文档和参考代码快速生成高质量的嵌入式代码。实验结果表明,RD2ESC相比GPT-4o基线模型在Pass@1指标上从0.15提升至0.71,测试通过率达到0.75,编译通过率达到0.95;敏感性分析显示该方法对参考代码质量存在一定依赖性,在10%~50%扰动条件下Pass@1从0.68降至0.47,完全无参考代码时降至0.25,但仍保持基础代码生成能力;消融实验证实了多智能体间的协同效应,完整系统相比单一组件展现出显著的性能提升。该研究为嵌入式代码自动生成提供了有效的技术框架,提升了嵌入式系统开发效率。

嵌入式系统代码生成  /  多智能体协作  /  大语言模型  /  提示工程  /  编译反馈优化

Large language models (LLM) are increasingly being applied in software engineering, but current automated code generation research primarily focuses on general-purpose functional code, lacking effective solutions for the specific requirements of embedded systems. We propose RD2ESC (requirements documents to embedded system code), a prompt-based fine-tuning method that enables LLMs to understand the complex relationships between embedded code and requirements documents, and constructs a multi-agent collaborative code generation framework capable of rapidly generating high-quality embedded code using requirements documents and reference code. Experimental results demonstrate that RD2ESC improves the Pass@1 metric from 0.15 to 0.71 compared with the GPT-4o baseline model, achieving a test pass rate of 0.75 and compilation pass rate of 0.96. Sensitivity analysis reveals that the method exhibits certain dependency on reference code quality, with Pass@1 declining from 0.68 to 0.47 under 10%~50% perturbation conditions and dropping to 0.25 without reference code, while still maintaining basic code generation capabilities. Ablation experiments confirm the synergistic effects among multi-agents, with the complete system demonstrating significant performance improvements compared with individual components. This research provides an effective technical framework for embedded code automatic generation, substantially enhancing embedded system development efficiency.

embedded system code generation  /  multi-agent collaboration  /  large language models  /  prompt engineering  /  compiling feedback optimization
谭舒孺, 肖宏彬, 李智, 谢晓兰, 武天昊, 汤飞. RD2ESC:多智能体嵌入式代码生成框架. 计算机研究与发展, 2026 , 63 (4) : 854 -867 . DOI: 10.7544/issn1000-1239.202550663
Shuru Tan, Hongbin Xiao, Zhi Li, Xiaolan Xie, Tianhao Wu, Fei Tang. RD2ESC: Multi-Agent Embedded Code Generation Framework[J]. Journal of Computer Research and Development, 2026 , 63 (4) : 854 -867 . DOI: 10.7544/issn1000-1239.202550663
在嵌入式系统开发领域,如何高效、准确地将需求文档转化为可执行代码,是影响项目成败的关键环节。嵌入式代码生成的核心任务,是将自然语言或结构化需求描述自动转化为能够在特定硬件平台上运行的高质量代码。高效的自动化代码生成能够显著加速需求验证,降低人工出错率,提升产品开发的整体效率和可靠性。提升嵌入式代码生成效率和质量的关键,在于实现对复杂需求的准确解析与映射,充分复用历史参考代码和工程知识,自动适配不同硬件平台和编程范式,并借助自动化反馈机制不断优化生成结果。理想的自动化工具应能够理解自然语言需求,智能检索与融合相关代码片段,及时响应需求变更,并生成可编译、可测试的高质量初始实现,从而减少人工适配和调试的工作量。
大语言模型(large language model,LLM)在代码生成方面取得了显著进展,为软件自动化带来了新的可能性。然而,尽管LLM在通用编程领域表现优异,当前针对嵌入式系统这一具有强硬件依赖、参考数据稀缺、验证方法复杂、编码约束严格以及高实时性要求等特点的专业领域,其代码生成研究仍面临独特挑战。现有的LLM代码生成研究主要集中在更易实现的简单需求到功能代码的转换上,例如HumanEval数据集中的测试集合[1]。虽然模型驱动开发(model-driven development,MDD)方法在嵌入式系统领域已有广泛应用,如MATLAB/Simulink和Rhapsody等工具能够从形式化模型生成代码[2],但这些方法需要开发者掌握特定的建模语言,且生成的代码往往需要大量手工优化才能满足嵌入式系统的严格资源约束。相比之下,基于LLM的方法能够直接理解自然语言需求,提供更灵活的代码生成方案,但如何确保生成代码的质量和可靠性仍是一个开放性问题。
正是基于这一挑战与机遇,本研究展开了相关探索。本文研究了利用LLM从需求文档自动生成可执行嵌入式代码的方法。我们的核心技术创新在于构建了一个基于多智能体协作的嵌入式代码生成框架,该框架通过思维链(chain-of-thought,CoT)推理和提示词工程技术构建4个专门化智能体,实现协同工作来提升代码生成的质量和可靠性。具体而言,我们设计了以下4个功能互补的智能体:参考代码生成智能体负责学习和理解3种不同编程范式(面向过程、模块化和结构化)的嵌入式代码实现模式,生成3种不同风格的参考代码;需求驱动代码生成智能体基于输入的需求文档生成符合嵌入式系统特点的初始代码实现;编译反馈智能体通过集成编译器反馈机制,自动识别和定位生成代码中的语法错误、类型不匹配等基础问题并给出编译反馈信息;代码优化建议智能体基于3种不同风格的参考代码分析生成的初始代码中的问题并提供针对性的修正策略。
与以往基于LLM的需求到代码生成研究[3-4]相比,我们的工作实现了以下3项技术创新:
1)反思驱动的多智能体协作架构。将LLM的代码生成能力与反思驱动的多智能体协作机制相结合,通过需求驱动代码生成智能体、参考代码生成智能体、编译反馈智能体和代码优化建议智能体的分工协作,构建了从需求理解到高质量代码输出的端到端自动化流程,实现了“感知—诊断—修复”的闭环优化机制。
2)编译反馈驱动的迭代优化策略。通过引入编译反馈机制和多轮迭代优化,系统能够智能识别语法错误、逻辑缺陷和功能不完整等问题,并基于精确的错误诊断进行针对性修复。实验表明,该机制使Pass@1性能相比直接使用LLM生成代码提升了数倍,编译通过率达到95%,超越了现有的单轮生成方法。
3)分层质量保障与协同放大效应。本文框架使用了分离编译正确性与功能正确性的质量保障机制,消融实验证实了智能体间的非线性协同效应,完整系统相比单一组件展现出显著的性能放大,为嵌入式代码生成任务提供了新的参考。
嵌入式软件开发的历史可以追溯到20世纪70年代,早期开发主要依赖手工编写汇编代码,开发者需要直接与硬件交互。随着嵌入式系统应用场景的不断扩展和复杂性的显著增加,开发方法也经历了持续的演进:从早期主要遵循传统“需求—设计—编码—测试”流程、依靠手动将自然语言需求转化为汇编或C语言代码以及1990年代以来模型驱动开发(model-driven development,MDD)方法的广泛应用和持续发展[5-6]。UML、SysML等标准化建模语言以及IBM Rhapsody、MATLAB/Simulink、AUTOSAR工具链等商业工具在汽车电子、航空航天等关键领域取得了显著成功,实现了从模型到代码的自动化转换,并在安全关键系统的开发中建立了成熟的工程实践。然而,尽管MDD方法在许多工业领域已经相当成熟,但在快速原型开发和需求频繁变更的场景中,传统MDD流程可能显得相对繁重,且自然语言需求到形式化模型的转换仍然主要依赖人工完成。正是在这一背景下,基于LLM的代码生成方法为嵌入式开发提供了一种补充性的技术路径,特别是在需求验证和快速原型开发阶段,为传统开发流程提供了有益的技术补充。
在工业应用中,嵌入式系统开发确实面临着独特的挑战和严格的要求。汽车电子控制单元(ECU)、工业自动化控制器以及医疗设备等领域,不仅要求代码在功能上是正确的,还必须满足严格的实时性、可靠性和安全性要求。为应对这些挑战,业界已建立了相对成熟的开发体系:AUTOSAR(汽车开放系统架构)[7-8]等规范为嵌入式软件架构提供了标准化框架,配合相应的工具链和开发流程,已在关键领域得到广泛应用并积累了丰富的工程经验。然而,在项目早期阶段,从自然语言需求文档到符合这些标准的初始代码实现之间仍存在一定的转换鸿沟。在工业实践中,需求理解和初步验证阶段往往需要经历多轮迭代:工程师需要将业务需求转化为技术规格说明,再进一步实现为可编译的代码原型,然后通过硬件部署和系统测试来验证需求的正确性和完整性。这一早期验证过程,特别是在需求频繁变更或探索性项目中,可能成为影响整体开发效率的瓶颈。因此,如何在保持工业级质量标准的前提下,加速从需求到可验证代码原型的转换过程,成为值得探索的技术问题。
近年来,LLM[9-11]发展迅速,在代码生成领域取得了显著成果[12-16]。Copilot[17]作为基于LLM的知名代码生成工具,已在通用软件开发中展现出其实用性,其生成的代码被超过30%的用户所接受[18]。现有的代码生成模型可以分为两大范式:编码器-解码器模型和仅解码器模型。编码器-解码器模型如PLBART[19]、CodeT5[20]和AlphaCode[21],会将输入文本编码为上下文嵌入向量,再解码为代码解决方案。仅解码器模型如GPT系列[22-23]、PolyCoder[24]和InCoder[16],则采用下一个token预测目标,从左到右生成代码。其中,OpenAI开发的ChatGPT[24]和GPT-4[25]代表了最先进的LLM,展现出更强的理解与推理能力,以及高质量文本生成能力。为了进一步提升代码生成质量,研究者们提出了多种改进策略:ROCODE[26]集成了回溯机制和程序分析技术来提高代码生成的正确性;MBR-EXEC[27]基于执行结果的最小贝叶斯风险框架来选择最优代码版本;MGD[28]采用监控器引导解码策略,通过静态分析为模型提供全局上下文信息,减少代码生成中的幻觉现象。
鉴于训练或微调这些LLM的成本极高,许多研究聚焦于在极少甚至无需微调的情况下提升其代码生成性能。提示学习(Prompt learning)成为实现这一目标的关键技术之一[29-35]。CoT[33]作为一种创新的提示工程方法,引导LLM生成中间推理步骤,从而得到最终答案。在复杂推理任务中,CoT表现出色[35-36],因此也被应用于代码生成[35-38]。受到CoT的启发,Li等人[4]提出了结构化CoT(SCOT),该方法明确引入代码结构,并指导LLM以程序化结构生成中间推理步骤。Jiang等人[14]则提出了一种自我规划方法,通过少样本演示引导LLM理解代码规划,并为给定需求编写相应的代码计划。
近年来,多智能体协作方法在代码生成领域展现出显著优势。ChatDev[39]通过构建包含CEO、CTO、程序员、测试员等7个专业角色的智能体团队,利用链式通信机制实现从需求分析到代码实现的全流程协作;AgentCoder[40]则采用更精简的三智能体架构(程序员智能体、测试设计师智能体、测试执行智能体),通过独立的测试生成和执行反馈机制。此外,自一致性增强方法如Self-Edit通过执行测试用例并基于错误信息迭代优化代码,进一步提升了代码生成的可靠性。
本文的方法同样采用提示工程技术优化LLM,实现从需求到代码的转化。与传统的代码生成方法不同,我们的核心创新在于构建了一个适配嵌入式系统特点的多智能体协作框架RE2ESC(Requirements documents to embedded system code),通过CoT推理和提示词工程技术将复杂的代码生成任务分解为多个专门化的子任务。该框架包含参考代码生成智能体、需求驱动代码生成智能体、编译反馈智能体和代码优化建议智能体4个功能模块。其中编译反馈智能体直接集成Keilu Vision5 C51编译器,实现了面向真实部署环境的代码验证机制。在嵌入式系统适配方向,提示词工程中融入了编译器约束(如内存使用约束;避免使用动态内存分配(malloc/free)实时性约束;主循环执行时间控制在10 ms以内,避免使用阻塞式延时函数等)和硬件特性考虑,生成的代码直接输出可烧录的.hex文件,实现从需求到可部署代码的端到端转换。
同时相较于依赖模拟测试环境的通用多智能体方法[39-41],我们的架构通过编译器直接反馈和智能体通过参考代码提供建议的迭代优化机制,有效解决了硬件相关功能(LCD显示、传感器交互等)在纯软件环境中验证复杂的问题。这种策略显著减少了从需求到可测试代码的生成时间,通过多智能体协作生成编译通过率更高、功能完整性更好的初始代码,开发者可以更快地进入实际硬件测试阶段。实验结果表明,相比直接使用目前的多智能体开发方法,我们的方法将首次通过率(Pass@1)提升了28%,平均测试用例通过率提升了20%。
需要明确的是,本文的方法是将LLM技术引入嵌入式代码生成领域的探索性研究,旨在为现有嵌入式软件开发流程提供技术补充,而非为对目前现有成熟工业实践的替代。该多智能体协作框架通过提供更高质量的初始代码来减少早期需求验证阶段的迭代次数,从而在保持现有质量保证体系的前提下,提高开发流程的特定环节效率。
在实际的嵌入式软件开发过程中,开发者通常遵循一套成熟的工作流程:首先收集和分析已有的代码模板和参考实现,构建项目的技术知识基础;然后基于需求文档和参考代码编写初始版本的代码;接着通过编译器验证代码的语法正确性和依赖关系;最后根据编译错误和警告信息对代码进行调试和修正,直到获得可正常编译运行的最终代码。本文提出的多智能体协同框架正是基于这一实际开发流程设计的。通过将传统开发过程中的关键环节抽象为专业化的智能体,每个智能体模拟开发者在特定阶段的专业技能和决策过程,从而实现了对人类开发经验的有效建模和自动化。具体而言,首先基于用户给予的需求文档通过需求驱动代码生成智能体与编译反馈智能体生成初始的代码,随后基于用户给予的参考代码与参考代码需求文档生成3种不同风格的参考代码,之后代码优化建议智能体根据3份参考代码与需求文档纠正初始代码中的问题,并结合编译反馈智能体纠正生成代码中的编译错误以达到生成高质量代码的目标。这种设计不仅保证了代码生成过程的合理性和可靠性,还充分利用了多智能体协作系统的优势,提高了代码生成的效率和质量。
在本节,将介绍通过多智能体协同技术构建的嵌入式代码生成方法,如图1展示了多智能体协作框架的4个主要组成部分,包含参考代码生成智能体、编译反馈智能体、需求驱动代码生成智能体与代码优化建议智能体,各智能体的工作流程将下面具体介绍。
编译反馈智能体$ { A}_{\rm compile}$的构建旨在减少代码生成后模型因为语法错误导致的代码生成质量问题。
其输入包含待编译代码c,输出结果为结构化编译反馈信息F与根据编译代码c生成的可用于进行嵌入式系统测试的.hex文件。形式化表达如式(1)所示。
$ {\boldsymbol A}_{\rm compile}(c)\rightarrow (F,hex)\;。 $
结构化编译反馈F=(status, errors, warnings, suggestions)如式(2)所示。其中status表示代码编译结果,包含成功SUCCESS和失败FAILURE两种状态;errors为编译错误信息集合,包含错误类型type、错误所在行数line、错误具体信息内容msg;warnings表示警告信息集合,包含警告类型category、警告描述desc,i与j表示错误信息与警告信息索引。
$ \begin{aligned}& status\in \{\rm SUCCESS,FAILURE\}\;,\\&errors=\{(typ{{e}_{i}},lin{{e}_{i}},ms{{g}_{i}})\}_{i=1}^{k}\;,\\&warnings=\{(categor{{y}_{j}},des{{c}_{j}})\}_{j=1}^{l}\;,\\&suggestions\;。\end{aligned} $
在本文中该智能体通过LLM与可调用的编译器Keilu Vision5 C51实现。
需求驱动代码生成智能体的目标为根据提供的需求文档并结合编译反馈智能体迭代修改生成一份编译成功的初始嵌入式系统代码,同时负责后续代码问题的维护工作。在代码生成任务中,我们发现代码生成智能体经常遇到3类典型问题:使用编译器不允许的参数名、错误地假设某些功能已被实现,以及给出不完整的代码实现。为了解决这些问题,我们提出了双重优化策略,以在第1轮代码生成过程中提升代码质量。
首先,在构建需求驱动代码生成智能体的提示词的设计阶段,我们采用了CoT技术[31]引导模型进行结构化思考。该技术将复杂任务分解为一系列推理步骤,使模型能够系统地分析问题需求、设计解决方案并实现代码。其次,我们在提示词中明确加入了约束条件,如“避免使用保留关键字作为标识符”和“为每个功能提供完整实现”等约束,减少了常见错误。根据认知负荷理论,这一方法降低了模型的认知负担,使其能更专注于代码质量,而不仅仅是完成任务。所设计的提示词如图2所示。
需求驱动代码生成智能体$ {{A}}_{\rm gen} $的输入为待生成代码的需求文档RD,输出为编译验证后的初始代码$ {{c}}_{\rm initial} $。形式化表达如式(3)所示。
$ {A}_{\rm gen}(RD)\rightarrow {c}_{\rm initial}\;。 $
$ {{A}}_{\rm gen} $的初始代码生成工作流程如算法1所示。
算法1. 初始代码生成。
输入:需求文档RD;
输出:$ {c}_{\rm initial} $。
① $ {c}_{0}\leftarrow Generate(RD) $;/*智能体根据需求文档调 用LLM生成第1版本代码*/
② for j in range (0, maxcomplie) do /*执行编译反 馈修正,maxcomplie为最大编译反馈次数*/
③  $ {F}_{j}\leftarrow {A}_{\rm compile}({c}_{j}) $;/*通过编译反馈智能体 $ {A}_{\rm compile} $执行编译检测来获取编译结果 信息*/
④ If $ \exists status\in {F}_{j}\wedge status $ = SUCCESS then
⑤   $ {c}_{\rm initial}\leftarrow {c}_{j} $;/*则返回编译完成的代码$ {c}_{j} $作 为$ {c}_{\rm initial} $*/
⑥  break;
⑦ Else
⑧   $ {c}_{j+1}\leftarrow {Re}\;Generate({c}_{j},{F}_{j},RD) $;/*智能体根 据编译反馈智能体$ {A}_{\rm compile} $提供的信息 修调再次用LLM修正代码编译错误*/
⑨   $ {c}_{\rm initial}\leftarrow {c}_{j+1} $;
⑩ End If
⑪ End for
⑫ Return $ {c}_{\rm initial} $。/*输出结果*/
本文构建了一个参考代码生成智能体,旨在生成采用不同实现方式的高质量参考代码,让模型能够理解代码与需求间的映射,为后续的代码修正模型提供详细的修正建议。所生成的参考代码涵盖3种不同的实现风格:结构化编程风格、模块化编程风格和面向过程编程风格。这种方法背后的动机是,在软件开发中,开发人员在根据需求文档实现代码时可能有不同的理解,导致代码具有不同的实现风格。通过比较这些不同的代码实现,可以使模型能够更好地理解问题代码中的错误。
这3种实现风格之间的差异如表1所示。本文提出的框架采用LLM微调后作为参考代码生成智能体。
参考代码生成智能体$ {{A}}_{\rm ref} $的输入为用户提供的参考代码$ {{c}}_{\rm ref} $与其对应的需求文档$ {{R}{D}}_{\rm ref} $,输出为包含3种风格的代码集合$ {C_{\rm ref}\{stru,mod,pro}\} $。stru表示结构化(structural)编程风格的参考代码,mod表示模块化(modular)编程风格的参考代码,pro表示面向过程的(procedural)参考代码,形式化表达如式(4)所示。
$ {A}_{\rm ref}(R{D}_{\rm ref},{c}_{\rm ref})\rightarrow {C}_{\rm ref}\;。 $
$ {{A}}_{\rm ref} $生成参考代码的工作流程如算法2所示。
算法2. 3种风格的参考代码生成。
输入:参考需求文档$ {{RD}}_{{\rm ref}} $,参考代码$ {{c}}_{{\rm ref}} $;
输出:$ C_{\rm ref} $。
① $ C_{\rm ref}\leftarrow \{\} $;/*初始化风格参考代码集合*/
② $ \{stru,{mod},pr\mathrm{o}\}\leftarrow Generate(RD,{c}_{\rm ref}) $;/*智能体根 据用户提供的参考代码与需求文档调用大 模型生成初始风格参考代码集合*/
③ for i in $ \{stru,{mod},pr\mathrm{o}\} $ do /*开始对集合中的代 码进行编译反馈操作*/
④ for j in range (0, maxcomplie) do /*执行编译 反馈修正,maxcomplie为最大编译反馈次 数*/
⑤   $ {F}_{j}\leftarrow {A}_{\rm compile}(i) $;/*通过编译反馈智能体 $ {A}_{\rm compile} $执行编译检测获取结构化编 译结果信息*/
⑥  If $ \exists status\in {F}_{j}\wedge status $ = SUCCESS then /*如果编译结果通过,即状态status= SUCCESS*/
⑦    $ C_{\rm ref}\leftarrow C_{\rm ref}\cup \{i\} $;/*将编译通过的风格参 考代码加入风格参考代码集合*/
⑧   break;/*跳出循环*/
⑨  Else /*编译未通过*/
⑩    $ i\leftarrow {Re}\;Generate(i,{F}_{j}) $;/*智能体根据编 译反馈智能体$ {A}_{\rm compile} $提供的信息再 次调用大模型修正代码编译错误*/
⑪  End If
⑫ End for
⑬ End for
⑭ Return $ C_{\rm ref} $。/*输出风格参考代码集合*/
本文构建了一个代码优化建议智能体用于对初始生成的代码进行修复工作,旨在通过学习3种风格的参考代码理解需求与代码的映射关系,理解代码与需求间的映射为后续的代码修正模型提供详细的修正建议。为了确保响应保持专注并维持高质量的代码修改,本文设计了一个基于推理的提示来构建该智能体,旨在引导模型审查参考代码和需求文档,然后识别问题代码中的错误位置并提供适当的解决方案。
如图3所示,设计的提示包含3个组成部分:1)描述希望模型解决任务的说明(识别代码错误并提供解决方案);2)一小组示例〈需求文档,参考代码〉作为演示来帮助LLM理解和解决任务;3)由智能体生成解决方案。具体而言,我们构建了一个提示来引导模型通过理解参考代码和问题代码之间的不一致性来比较它们之间的差异,然后根据问题代码中的缺失元素提供相应的解决方案。为此阶段设计的提示如图4所示。
在智能体生成代码纠错策略后,智能体会将错误信息发送给需求驱动代码生成智能体处理已识别的问题并实施建议的修正,完成自动代码纠正过程,反馈交流过程如图5所示。在这些修正之后,需求驱动代码生成智能体会再次将代码发送给编译反馈智能体解决编译问题。该过程仅在代码没有任何“错误”警告时或达到最大编译纠正次数时结束。此时,从需求文档生成高质量代码的自动化过程基本完成。
代码优化建议智能体$ {{A}}_{\rm correct} $的输入为由需求驱动代码生成智能体$ {{A}}_{\rm gen} $生成的代码$ {{c}}_{\rm initial} $、需求文档RD、$ {{R}{D}}_{\rm ref} $、由参考代码生成智能体$ {{A}}_{\rm ref} $生成的参考代码集合Cref,输出为格式化的参考修正建议suggestions,在获得修正建议后进入初始代码修正流程,由需求驱动代码生成智能体$ {{A}}_{\rm gen} $根据生成编译验证后的最终代码$ {{c}}_{\rm output} $与由编译反馈智能体生成最终代码的可进行嵌入式系统测试的.hex文件。形式化表达如式(5)所示。
$ {A}_{\rm correct}(RD,{c}_{\rm initial},R{D}_{\rm ref},{C}_{\rm ref})\rightarrow suggensions\;。 $
代码纠正工作流程如算法3所示。
算法3. 初始代码纠正。
输入:需求文档$ {RD} $,初始代码$ {{c}}_{\rm initial} $,需求参考文档$ {{RD}}_{\text{ref}} $,参考代码集合Cref;
输出:最终代码 $ {{c}}_{\rm output} $,最终代码的编译文件hex。
① $ suggestions\leftarrow {A}_{\text{correct}}(RD,{c}_{\rm initial},R{D}_{\rm ref},{C}_{\rm ref}) $;/*代 码优化建议智能体根据输入信息生成代码 修正建议*/
② $ outpu{t}_{0}\leftarrow {A}_{\rm gen}(suggention,{c}_{\rm initial}) $;/*需求驱动代 码生成智能体根据修正建议生成修正后的 代码*/
③ for j in range (0, maxcomplie) do /*执行编译反 馈修正,maxcomplie为最大编译反馈次数*/
④  $ {F}_{j}\leftarrow {A}_{\rm compile}(outpu{t}_{0}) $;/*通过编译反馈智能体 $ {A}_{\rm compile} $执行编译检测获取结构化编译结 果信息*/
⑤ If $ \exists status\in {F}_{j}\wedge status $ = SUCCESS then
⑥   $ {c}_{\rm output}\leftarrow outpu{t}_{i} $;/*将编译通过的最终代码 保存*/
⑦   $ hex\leftarrow {A}_{\rm compile}({c}_{\rm output}) $;/*编译智能体生成最 终代码的.hex编译文件*/
⑧  break;
⑨ Else
⑩   $ outpu{t}_{i+1}\leftarrow {Re}\;Generate({F}_{j},outpu{t}_{i}) $;/*智能 体根据编译反馈智能体$ {A}_{\rm compile} $提供的 信息调用大模型修正代码编译错误*/
⑪ End If
⑫ End for
⑬ Return $ {c}_{\rm output},hex $。/*输出风格参考代码集合*/
为了评估所提出方法的有效性,本文进行了初步实验。本节描述了实验设计,包括研究问题、模型规格、基准测试、评估指标和实验细节。我们通过解决以下4个研究问题来评估所提出的模型。
RQ1:与基线方法相比,本文提出的方法在嵌入式系统代码生成质量上如何?
RQ2:本文提出的方法在不同的LLM上的表现如何?
RQ3:多智能体协作架构是否能够提升代码生成质量?
RQ4:对参考代码的依赖情况如何?
RQ5: 本文提出的方法能否缩短嵌入式系统代码开发时间?
在本研究中,我们选择了 Claude 3.7 Sonnet,Claude 4.0 Sonnet,GPT4.1,GPT4o作为智能体的基础模型与对比基准,所有这些模型的调用均采用API形式进行。同时我们选择了现有的较为先进的基于LLM的代码生成方案作为对比基准。
SCOT[4]方法则通过结构化CoT提示,在生成代码之前,引导LLM以伪代码形式梳理和理解代码生成所需的中间步骤。
ROCODE[26]方法集成了回溯机制和程序分析技术,通过在LLM代码生成过程中引入回溯搜索策略,当生成的代码片段不满足程序分析约束时能够自动回退并尝试替代方案,从而提高代码生成的正确性和可靠性。
MBR-EXEC[27]方法基于执行结果的最小贝叶斯风险框架,通过生成多个候选代码解决方案并实际执行测试用例,利用执行结果来评估和选择最优的代码版本,有效提升了自然语言到代码翻译的准确性。
MGD[28]方法采用监控器引导解码策略,通过静态分析监控器在解码过程中实时检查类型一致性和对象解引用等约束条件,为LLM提供全局上下文信息,减少代码生成中的幻觉现象并提高生成代码的质量。
ChatDev[41]方法构建了一个基于聊天链的多智能体软件开发框架,通过将软件开发过程分解为设计、编码和测试等阶段,使用专业化的智能体(如CEO、CTO、程序员、测试员等)进行多轮对话协作,实现从需求到完整软件的自动化开发,并通过交流去幻觉机制减少代码生成中的错误。
AgentCoder[40]方法提出了一个精简的三智能体协作框架,包括程序员智能体、测试设计师智能体和测试执行器智能体,通过独立的测试用例生成和执行反馈机制,实现高效的代码生成和迭代优化,相比现有多智能体方法显著降低了token开销的同时提升了代码生成质量。
Codex[2]是OpenAI开发的专门针对代码生成任务的LLM,基于GPT架构并在大规模代码数据集上进行训练。Codex能够理解自然语言描述并生成相应的代码,支持多种编程语言,在代码补全、函数生成和程序合成等任务上表现出色,是GitHub Copilot等代码辅助工具的核心技术基础。
Cursor[41]是一款基于LLM的智能代码编辑器,集成了GPT-4等先进模型,提供实时代码生成、智能补全和代码重构等功能。Cursor通过上下文感知的代码理解能力,能够根据用户的自然语言描述或代码注释自动生成相应的代码片段,并支持多轮对话式的代码开发交互。
鉴于缺乏针对小型嵌入式系统的测试数据集,本文构建了一个包含 20个小型嵌入式系统模拟实现的数据集,现已公开发布RD2ESCODE1(GitHub- Hongbin-Xiao/RD2ESCODE)。该数据集涵盖了从简单到复杂的20个小型嵌入式系统需求文档,既包括可用于生成需求文档的参考代码,也包含3种不同风格的代码实现作为模型参考。此外,每个案例还配套有可在 Proteus 8 Professional 中运行的可执行仿真系统。数据集中最简单的系统仅包含1个函数,而最复杂的系统约有 900 行代码。
本文采用 Pass@k[5]指标评估生成代码的准确性,该指标已在以往与LLM相关的研究中得到广泛应用。Pass@k指标的含义是:只要生成的多个代码解决方案中有任意一个通过了全部测试,即认为该问题被成功解决。然而,在实际开发场景中,生成多个代码版本会增加开发人员的负担,因为他们需要阅读、理解并从中选择最终的目标代码。基于此考虑,本研究将 k 设置为 1,以更贴合大多数开发者仅关注单一生成代码的实际情况。为降低评测结果的高方差和随机性,每种方法均重复运行3次,并以平均结果作为最终报告。此外,为了全面衡量生成代码的质量,我们采用以下2个指标进行评估:
1)代码编译通过率:3次运行中代码成功编译的平均比例。
2)平均测试功能通过率:3次运行中每个系统功能测试通过的平均比例。(关于测试程序的详细说明,可参见数据集中提供的 Test Procedure Reference.xlsx 文件。)
本实验在一台配备英特尔第13代酷睿处理器(Intel Core i7-13400)的计算机上进行。该处理器拥有10个物理核心(6个性能核+4个能效核)、16线程,基础频率为2.5 GHz。计算机配备32 GB内存,显卡为NVIDIA GeForce RTX 3070 Ti。操作系统为Windows 11专业版,64位架构,版本号为22H2。实验采用Python编程语言,版本为Python3.10,开发和运行环境使用PyCharm 集成开发环境(IDE),并利用Anaconda3进行环境管理与依赖配置,以确保实验环境的隔离性与可重复性。
本研究采用标准的嵌入式系统代码生成评估框架进行实验验证。实验选取了具有代表性的基线方法,包括主流LLMClaude 3.7 Sonnet、Claude 4 Sonnet、GPT-4o和GPT-4.1,以及先进的代码生成方法SCOT、MBR-EXEC、MGD和ROCODE作为对比基准,为了保证公平,基础大模型均采用其自反思6次后的结果。评估采用3个核心指标:1)Pass@1衡量首次生成代码的功能正确性;2)平均测试功能通过率评估代码在完整测试上的表现;3)平均代码编译通过率反映生成代码的语法正确性。为了全面评估方法的稳定性和适应性,实验采用Claude 4 Sonnet作为本文方法的智能体基础模型,在多个温度参数T设置(T=0,0.4,0.6,0.8)下进行测试,其中T=0表示确定性生成,T=0.4表示默认平衡设置,更高温度值引入更多随机性以探索生成多样性的影响。所有实验在相同的硬件环境和数据集上进行,确保结果的公平性和可比性。
RQ1:与基线方法相比,本文提出的方法在嵌入式系统代码生成质量上如何?
基于表2的实验结果,RD2ESC方法在嵌入式系统代码生成质量上实现了显著突破。在Pass@1指标上,RD2ESC在T=0.4时达到71.67%的最佳表现,相比最强基线ROCODE(55%)提升16个百分点,相比传统方法Claude 4 Sonnet(18.33%)和GPT-4o(15%),这种性能差距揭示了单一模型在处理复杂嵌入式系统约束时的局限性。在平均测试功能通过率方面,RD2ESC最高达到75%,比ROCODE(68%)提升7个百分点,比同类多智能体方法ChatDev(48%)和AgentCoder(55%)分别提升27个百分点和25个百分点,表明专门化的多智能体系统在理解和实现复杂功能需求方面具有显著优势。在平均代码编译通过率上,RD2ESC表现尤为突出,在T=0和T=0.4时均达到95%的峰值,与传统方法的38%~65%形成鲜明对比,体现了其编译反馈智能体和迭代优化机制的有效性。温度敏感性分析显示,RD2ESC在T=0.4时达到功能正确性与编译成功率的最佳平衡,随着温度升高,性能逐步下降但仍优于所有基线方法,展现出优秀的鲁棒性和稳定性。
RQ2:本文提出的方法在不同的LLM上的表现如何?
在本研究问题中,我们旨在探究所提出的方法在不同的LLM作为智能体的基础上表现如何,我们采用最优温度在Claude 3.7 Sonnet、Claude 4 Sonnet、GPT-4o和GPT-4.1上对数据进行了测试,温度设置均为0.4。
如图6所示,RD2ESC方法在不同LLM上均展现出卓越的适应性和稳定性,验证了其多智能体架构的通用性。Claude 4 Sonnet作为底层模型时表现最佳,Pass@1达到71%,平均测试功能通过率达到75%,相比Claude 3.7 Sonnet分别提升3个百分点和2个百分点,反映了新一代模型更强的代码理解能力。GPT系列模型表现相对稳定,GPT-4.1(Pass@1=68%)略低于GPT-4o(66%),但差异较小,说明RD2ESC能够有效弥合不同模型间的性能差异。值得注意的是,所有模型在RD2ESC框架下的编译通过率均保持在91%~95%的高水平,证明了多智能体协作机制在语法正确性保障方面的有效性。更重要的是,即使是相对较弱的GPT-4o在RD2ESC框架下仍能达到66%的Pass@1表现,远超其单独使用时的15%,这表明RD2ESC的性能提升主要源于其创新的多智能体协作机制而非单纯依赖底层模型能力,为该方法在不同技术上的广泛应用提供了有力支撑。
RQ3:多智能体协作架构是否能够提升代码生成质量?
在本研究问题中,我们旨在探讨所设计的关键模型结构以及编译反馈机制的必要性。首先,在原有模型的基础上移除代码优化建议智能体,得到RD2ESC-NT(无纠正智能体);随后,在原有模型基础上移除编译反馈智能体,得到RD2ESC-NF(无编译反馈);最后移除参考代码生成智能体(RD2ESC-NSC)。同样在该数据集上进行测试。此处Pass@k中的k仍取1,每个案例的代码生成次数依然为3。
从图7中可以看出RD2ESC框架中智能体协作的非线性协同效应和功能分工的关键性。通过系统性移除核心组件,我们观察到代码优化建议智能体的移除导致Pass@1性能出现灾难性下降(从71%降至16%,相对下降约55个百分点),而编译反馈智能体的移除造成显著性能衰减(降至58%,相对下降约13个百分点),参考代码生成智能体的移除导致性能下降至63%(相对下降约8个百分点)。这种差异化衰减模式表明:1)代码优化建议智能体承担着将抽象错误诊断转化为具体修复操作的关键功能,是系统性能的主要决定因素;2)编译反馈智能体通过提供精确的错误定位和语义分析,为纠错过程提供了必要的指导信息,其移除导致代码编译通过率从96%骤降至73%;3)参考代码生成智能体通过提供多样化代码模板,为系统提供了有效的结构化参考。更重要的是,完整系统相较于任何单一组件都展现出显著的协同放大效应,证实了多智能体协作结构在代码生成任务中的设计合理性。
RQ4对参考代码的依赖情况如何?
为了评估本文提出的方法对参考代码的依赖情况,我们设计了参考代码质量敏感性分析实验。实验通过对原始参考代码引入不同程度的扰动来模拟实际开发中可能遇到的参考代码质量变化,具体设置4个测试场景:高质量参考代码(10%扰动)、中等质量参考代码(30%扰动)、低质量参考代码(50%扰动)以及完全无参考代码。扰动操作涵盖嵌入式开发中的6个关键维度:参数调整(传感器阈值、延时参数等数值修改)、变量和函数重命名、引脚重新分配、算法优化(添加滤波和错误处理机制)、功能扩展(增加监控和诊断功能)以及代码结构重构。通过系统性地降低参考代码质量,该实验旨在量化方法性能随参考代码可用性和质量变化的衰减程度,从而客观评估方法在面对新领域或特殊硬件平台时参考代码稀缺情况下的实用边界,为方法的实际应用提供重要的性能预期指导。
从图8中可以看出,随着参考代码质量的下降,方法性能呈现明显的递减趋势:Pass@1从10%扰动时的0.68逐步下降至30%扰动的0.61及50%扰动的0.46,在完全无参考代码时大幅降至0.25,累计性能损失达63%;测试通过率和编译通过率也表现出类似的下降模式,分别从0.73和0.96降至0.38和0.65。值得注意的是,编译通过率在中等扰动下保持相对稳定(10%,30%扰动时均为0.96),说明生成代码的语法正确性具有一定鲁棒性,主要性能损失集中在逻辑实现的准确性上。这一结果表明我们的方法确实对参考代码质量存在依赖性,特别是在缺乏参考代码的新领域或特殊硬件平台上性能会显著下降,但即使在极端条件下仍保持基础的代码生成能力。
RQ5: 本文提出的方法能否缩短嵌入式系统代码开发时间?
为了评估本文方法能否帮助人们提高开发效率,我们开发了一款工具—RD2ESCODE1。同时我们开展了一项实验,邀请6名研究生(A-F)分别独立完成15个嵌入式系统项目。我们评估了3种不同的开发方式:手动开发、使用高质量参考代码开发、借助传统大模型开发以及借助RD2ESCODE工具辅助开发。对于每种方法,我们记录了每位学生完成所有项目所需的时间,测量从收到需求文档到代码成功编译的全过程时长。需要注意的是,这一测量不包括后续的功能测试或验证。
如表3所示,实验结果表明RD2ESCODE在开发时间缩短方面表现卓越,将平均开发时间从手动开发的29.3 h大幅缩短至4.1 h,实现了86.0%的时间节省和超过7倍的效率提升;相比借助参考代码开发的13.2 h,RD2ESCODE仍实现了69.0%的时间节省和约3.2倍的效率提升。更重要的是,RD2ESCODE在保持高效率的同时确保了代码质量,其相对手动开发的提升比例平均达到85.7%,相对参考代码提升比例平均达到68.2%,所有参与者的开发时间均稳定控制在3~5 h,展现出工具的稳定性和可靠性。值得注意的是,6名参与者在使用RD2ESCODE时均表现出一致的高效率,相对手动开发的提升比例稳定在83%~88%之间,相对参考代码的提升比例稳定在62%~74%之间,显示出方法的普适性。这些结果充分验证了RD2ESC通过多智能体协作机制实现了效率与质量的双重优化,为嵌入式系统需求到代码的自动生成提供了实用的智能化解决方案。
上述实验结果充分验证了RD2ESCODE的有效性,然而为了客观评估方法的适用范围,我们需要进一步讨论其在实际部署中可能面临的挑战和局限性。
1)输入长度限制。我们的方法需要在LLM输入中保留完整的对话历史、参考代码和需求文档,这对于大型嵌入式系统来说可能超出模型的上下文窗口限制(如Claude的200000 tokens)。这一限制在处理大型复杂的嵌入式系统中较为明显,未来工作将探索分层代码生成策略,将大型系统分解为多个子模块分别处理,或采用检索增强生成技术动态加载相关代码片段。
2)对参考代码的依赖。当前方法依赖高质量的参考代码来建立需求与实现之间的映射关系。在缺乏相似参考代码的新领域或特殊硬件平台上方法性能会有所下降。
3)数据规模限制。我们的评估基于20个精心设计的测试案例,这些案例覆盖了嵌入式系统开发中的核心场景:传感器数据采集、通信协议实现、实时控制逻辑和数据处理算法。每个案例都包含了实际项目中的典型需求模式和编程挑战。虽然这一数据集规模在统计意义上存在一定局限性,但考虑到嵌入式系统代码生成任务的复杂性和每个案例的综合性,当前的评估基本能有效展示方法的核心能力。
将需求文档自动转化为嵌入式系统代码是一个极具挑战性的目标。我们的初步实验发现,在LLM理解和生成代码的过程中,通过多智能体协作结构能够帮助模型理解需求文档与代码之间的关系,并引导其对生成代码进行修正,能够有效提升其在嵌入式代码生成方面的能力。这一过程有望实现从需求文档到小型嵌入式系统的无缝衔接。然而,现有的研究仍处于初步阶段,未来还有许多方向值得进一步探索,以提升模型的整体能力。基于我们的初步结果,后续工作有望成为实现从需求到嵌入式代码自动生成的重要一步,并为利用需求到代码映射方法提升LLM生成系统级嵌入式代码的研究提供新的方向。
作者贡献声明:谭舒孺负责方案实验整体设计并撰写论文;肖宏彬、武天昊负责算法思路和实验方法;李智、谢晓兰、汤飞提出指导意见并修改论文。李智和谢晓兰为通信作者;谭舒孺和肖宏彬对本文具有相同贡献。

参考文献 引证文献
排序方式:
1
Moreira T G, Wehrmeister M A, Pereira C E, et al. Automatic code generation for embedded systems: From UML specifications to VHDL code[C]//Proc of the 2010 8th IEEE Int Conf on Industrial Informatics. Piscataway, NJ: IEEE, 2010: 1085−1090
2
Chen Mark, Tworek Jerry, Jun Heewoo, et al. Evaluating large language models trained on code[J]. arXiv preprint, arXiv: 2107.03374, 2021
3
Li Jia, Zhao Yunfei, Li Yongmin, et al. Acecoder: An effective prompting technique specialized in code generation[J]. ACM Transactions on Software Engineering and Methodology, 2024, 33(8): 1−26
4
Li Jia, Li Ge, Li Yongmin, et al. Structured chain-of-thought prompting for code generation[J]. ACM Transactions on Software Engineering and Methodology, 2025, 34(2): 1−23
5
Bambagini M, Di N M. A code generation framework for distributed real-time embedded systems[C]//Proc of the 2012 IEEE 17th Int Conf on Emerging Technologies & Factory Automation. Piscataway, NJ: IEEE, 2012: 1−10
6
Vidal J, De Lamotte F, Gogniat G, et al. A co-design approach for embedded system modeling and code generation with UML and MARTE[C]//Proc of the 2009 Design, Automation & Test in Europe Conf & Exhibition. Piscataway, NJ: IEEE, 2009: 226−231
7
Staron M, Durisic D. Autosar Standard[M]//Automotive Software Architectures: An Introduction. Berlin: Springer, 2017: 81−116
8
Dunne M, Schram K, Fischmeister S. Weaknesses in LLM-generated code for embedded systems networking[C]//Proc of the 2024 IEEE 24th Int Conf on Software Quality, Reliability and Security. Piscataway, NJ: IEEE, 2024: 250−261
9
Dong Yihong, Li Ge, Jin Zhi. CODEP: Grammatical seq2seq model for general-purpose code generation[C]//Proc of the ISSTA. New York: ACM, 2023: 188−198
10
Rozière B, Gehring J, Gloeckle F, et al. Code Llama: Open foundation models for code[J]. arXiv preprint, arXiv: 2308.12950, 2023
11
Nijkamp E, Pang Bo, Hayashi H, et al. Codegen: An open large language model for code with multi-turn program synthesis[C]//Proc of the ICLR. OpenReview. net, 2023: 1−25
12
Fried D, Aghajanyan A, Lin J, et al. Incoder: A generative model for code infilling and synthesis[J]. arXiv preprint, arXiv: 2204.05999, 2022
13
Jiang Xue, Dong Yihong, Wang L, et al. Self-planning code generation with large language models[J]. ACM Transactions on Software Engineering and Methodology, 2024, 33(7): 1−36
14
Jiang Xue, Dong Yihong, Jin Zhi, et al. SEED: Customize large language models with sample-efficient adaptation for code generation[J]. arXiv preprint, arXiv: 2403.00046, 2024
15
Zhang Tianyi, Yu Tao, Hashimoto T, et al. Coder reviewer reranking for code generation[C]//Proc of the ICML. New York: PMLR, 2023: 41832−41846
16
GitHub. Copilot[EB/OL]. 2022[2024-12-25]. https://github.com/features/copilot
17
Dohmke T, Iansiti Ma, Richards G. Sea change in software development: Economic and productivity analysis of the Ai-powered developer lifecycle[J]. arXiv preprint, arXiv: 2306.15033, 2023
18
Ahmad W U, Chakraborty S, Ray B, et al. Unified pre-training for program understanding and generation[C]//Proc of the NAACL-HLT. Stroudsburg, PA: ACL, 2021: 2655−2668
19
Wang Yue, Wang Weishi, Joty S R, et al. CodeT5: Identifier-aware unified pre-trained encoder-decoder models for code understanding and generation[C]//Proc of the 2021 Conf on Empirical Methods in Natural Language Processing. Stroudsburg, PA: ACL, 2021: 8696−8708
20
Li YuJia, Choi D, Chung J Y, et al. Competition level code generation with AlphaCode[J]. arXiv preprint, arXiv: 2203.07814, 2022
21
Black S, Biderman S, Hallahan E, et al. GPT-NeoX−20B: An open-source autoregressive language model[J]. arXiv preprint, arXiv: 2204.06745, 2022
22
Xu F F, Alon U, Neubig G, et al. A systematic evaluation of large language models of code[C]//Proc of the 6th ACM SIGPLAN Int Symp on Machine Programming. New York: ACM, 2022: 1−10
23
OpenAI. ChatGPT[EB/OL]. 2022. [2024-11-17]. https://openai.com/blog/chatgpt
24
OpenAI. GPT−4 technical report[J]. arXiv preprint, arXiv: 2303.08774, 2023
25
Jiang Xue, Dong Yihong, Tao Yingwei, et al. Rocode: Integrating backtracking mechanism and program analysis in large language models for code generation[J]. arXiv preprint, arXiv: 2411.07112, 2024
26
Shi F, Fried D, Ghazvininejad M, et al. Natural language to code translation with execution[J]. arXiv preprint, arXiv: 2204.11454, 2022
27
Agrawal L A, Kanade A, Goyal N, et al. Guiding language models of code with global context using monitors[J]. arXiv preprint, arXiv: 2306.10763, 2023
28
Brown T B, Mann B, Ryder N, et al. Language models are few-shot learners[C]//Proc of the 34th Annual Conf on Neural Information Processing Systems. Red Hook, NY: Curran Associates, 2020: 1877−1901
29
Dong Yihong, Jiang Xue, Jin Zhi, et al. Self-collaboration code generation via ChatGPT[J]. arXiv preprint, arXiv: 2304.07590, 2023
30
Liu Chao, Bao XuanLin, Zhang Hongyu, et al. Improving ChatGPT prompt for code generation[J]. arXiv preprint, arXiv: 2305.08360, 2023
31
Nashid N, Sintaha M, Mesbah A. Retrieval-based prompt selection for code-related few-shot learning[C]//Proc of the 45th IEEE/ACM Int Conf on Software Engineering. Piscataway, NJ: IEEE, 2023: 2450−2462
32
Shrivastava D, Larochelle H, Tarlow D. Repository-level prompt generation for large language models of code[J]. arXiv preprint, arXiv: 2206.12839, 2022
33
Wei J, Wang Xuezhi, Schuurmans D, et al. Chain of thought prompting elicits reasoning in large language models[J]. arXiv preprint, arXiv: 2201.11903, 2022
34
Kojima T, Gu S S, Reid M, et al. Large language models are zero-shot reasoners[J]. arXiv preprint, arXiv: 2205.11916, 2022
35
Li Jia, Li Ge, Li Yongmin, et al. Enabling programming thinking in large language models toward code generation[J]. arXiv preprint, arXiv: 2305.06599, 2023
36
Wang Chaozheng, Yang Yuanhang, Gao Cuiyun, et al. Prompt tuning in code intelligence: An experimental evaluation[J]. IEEE Trans on Software Engineering, 2023, 49(11): 4869−4885
37
Mu Fangwen, Shi Lin, Wang Shuai, et al. Clarifygpt: A framework for enhancing LLM-based code generation via requirements clarification[J]. Proceedings of the ACM on Software Engineering, 2024, 1(FSE): 2332−2354
38
Liu Jiawei, Xia C S, Wang Yuyao, et al. Is your code generated by ChatGPT really correct? Rigorous evaluation of large language models for code generation[J]. arXiv preprint, arXiv: 2305.01210, 2023
39
Chen Qian, Liu Wei, Liu Hongzhang, et al. ChatDev: Communicative agents for software development[C]//Proc of the 2024 Conf on Empirical Methods in Natural Language Processing. Stroudsburg, PA: ACL, 2024: 1−15
40
Huang Dong, Zhang J M, Luck M, et al. AgentCoder: Multi-agent code generation with effective testing and self-optimisation[J]. arXiv preprint, arXiv: 2312.13010, 2024
41
Anysphere Inc. Cursor Documentation[EB/OL]. [2024-11-17]. https://cursor.com/docs
2026年第63卷第4期
94
45
0
引用本文
BibTeX
文章信息
doi: 10.7544/issn1000-1239.202550663
  • 接收时间:2025-10-30
  • 首发时间:2026-11-17
  • 出版时间:2026-04-01
补充材料
相关文章
文章信息
作者
出版历史
  • 收稿日期:2025-10-30
  • 修回日期:2025-12-30
基金
作者信息
    1教育部教育区块链与智能技术重点实验室(广西师范大学) 广西桂林 541004
    2广西师范大学计算机科学与工程学院 广西桂林 541004
    3桂林理工大学计算机科学与工程学院 广西桂林 541004
    4华为技术有限公司 广东深圳 518000

通讯作者:

李智()
参考文献
分享链接
https://castjournals.cast.org.cn/joweb/jsjyjyfz/CN/10.7544/issn1000-1239.202550663
分享至
全文二维码

扫描看全文

引用本文
BibTeX
本文的引用情况
2种不同金属材料的力学参数
科
Family
属数
Number of
genus
种数
Number of
species
占总种数比例
Percentage of
total species (%)
属
Genus
种数
Number of
species
占总种数比例
Percentage of total
species (%)
鹅膏菌科Amanitaceae 2 11 5.26 鹅膏菌属 Amanita 10 4.78
小菇科 Mycenaceae 2 12 5.74 丝盖伞属 Inocybe 5 2.39
多孔菌科 Polyporaceae 8 14 6.70 蜡蘑属 Laccaria 5 2.39
红菇科 Russulaceae 3 23 11.00 小皮伞属 Marasmius 6 2.87
小菇属 Mycena 11 5.26
光柄菇属 Pluteus 5 2.39
红菇属 Russula 17 8.13
栓菌属 Trametes 5 2.39
关闭全屏