用大模型从业务流程生成智能合约,发现其可靠性不足需改进。
On LLM-Assisted Generation of Smart Contracts from Business Processes
- 用大模型将业务流程描述转为智能合约代码
- 测试显示模型在流程控制、资源分配上错误率高
- 提出自动化评估框架,适合开发工具集成研究
大语言模型(LLMs)正在改变软件生产方式。本文探索使用LLMs从业务流程描述生成智能合约代码,以克服传统规则驱动方法的局限。现有研究多基于小样本人工检查或仅验证编译通过,忽略执行正确性。为此,我们构建了自动化评估框架,并在更大规模流程模型数据集上进行实验。测试了多种类型和规模的LLMs,评估其在保障流程执行中的关键属性表现,包括流程流控制、资源分配和基于数据的条件判断。结果表明,当前LLM生成的代码在可靠性和正确性方面仍不达标,无法满足智能合约开发需求。研究建议未来应探索负责任的LLM集成方案,以提升代码生成工具的输出可靠性。本研究所提出的基准框架可作为后续开发与评估的基础。
原文摘要 · Abstract (English)
Large language models (LLMs) have changed the reality of how software is produced. Within the wider software engineering community, among many other purposes, they are explored for code generation use cases from different types of input. In this work, we present an exploratory study to investigate the use of LLMs for generating smart contract code from business process descriptions, an idea that has emerged in recent literature to overcome the limitations of traditional rule-based code generation approaches. However, current LLM-based work evaluates generated code on small samples, relying on manual inspection, or testing whether code compiles but ignoring correct execution. With this work, we introduce an automated evaluation framework and provide empirical data from larger data sets of process models. We test LLMs of different types and sizes in their capabilities of achieving important properties of process execution, including enforcing process flow, resource allocation, and data-based conditions. Our results show that LLM performance falls short of the perfect reliability required for smart contract development. We suggest future work to explore responsible LLM integrations in existing tools for code generation to ensure more reliable output. Our benchmarking framework can serve as a foundation for developing and evaluating such integrations.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。