跳到主要导航 跳到搜索 跳到主要内容

NL2CSP: Towards Automated CSP Code Generation with Large Language Models

  • Chenhui Wang
  • , Nuowei Liu
  • , Han Bao
  • , Di Wu
  • , Huiying Liu
  • , Jiaqi Yin
  • , Huibiao Zhu
  • East China Normal University

科研成果: 书/报告/会议事项章节会议稿件同行评审

摘要

Communicating Sequential Processes (CSP) is a formal language used in modeling and verifying concurrent systems and protocols. However, manually constructing a CSP model is typically time-consuming. Recent advancements in Large Language Models (LLMs) show potential for automatically transforming requirements in natural language into formal specifications. In this paper, we propose the first datasets of CSP: CSP#-PAT-84 and CSP#-Handwrite-45, containing a total of 129 models and 1375 processes in a machine-readable syntax CSP#. The CSP#-PAT-84 dataset comprises CSP models from examples in the Process Analysis Toolkit (PAT) and covers five categories. The CSP#-Handwrite-45 dataset consists of CSP models extracted from research papers focusing on practical protocols, algorithms, and systems. Moreover, we introduce NL2CSP, a multi-stage approach designed to improve the performance of LLMs in generating codes in CSP#. Experiments are conducted on both the process generation and model generation tasks to evaluate the capability of LLMs to generate correct CSP processes and models, as well as to establish a benchmark for future research. The results demonstrate that with the capability of in-context learning, LLMs can understand most of the requirements written in natural language and generate corresponding CSP processes and models.

源语言英语
主期刊名Proceedings of 2025 IEEE 31st International Conference on Parallel and Distributed Systems, ICPADS 2025
出版商IEEE Computer Society
ISBN(电子版)9798331549015
DOI
出版状态已出版 - 2025
活动31st IEEE International Conference on Parallel and Distributed Systems, ICPADS 2025 - Hefei, 中国
期限: 14 12月 202517 12月 2025

出版系列

姓名Proceedings of the International Conference on Parallel and Distributed Systems - ICPADS
ISSN(印刷版)1521-9097

会议

会议31st IEEE International Conference on Parallel and Distributed Systems, ICPADS 2025
国家/地区中国
Hefei
时期14/12/2517/12/25

指纹

探究 'NL2CSP: Towards Automated CSP Code Generation with Large Language Models' 的科研主题。它们共同构成独一无二的指纹。

引用此