A network protocol code automatic generation method and system based on formal verification

By combining formal verification and large language models, network protocol code is automatically generated, which solves the shortcomings of existing code generation and verification technologies, realizes the automated generation and verification of high-quality code, reduces human intervention, and improves the correctness and efficiency of protocol implementation.

CN122132021APending Publication Date: 2026-06-02EAST CHINA NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
EAST CHINA NORMAL UNIV
Filing Date
2026-02-02
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing technologies struggle to automatically generate high-quality network protocol code from natural language protocol specifications and ensure code correctness through formal verification, especially in complex network protocol development scenarios where human involvement is high and verification methods lack completeness.

Method used

A formal verification-based method for automatically generating network protocol code is adopted. Intermediate verification code is generated through semantic analysis and large language models, and formal verification tools are used for automatic verification, forming an iterative optimization process to ensure code correctness.

Benefits of technology

It achieves automated conversion from natural language protocol specifications to reliable code, significantly improving the correctness and engineering applicability of network protocol code, reducing the degree of human intervention, and shortening development time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122132021A_ABST
    Figure CN122132021A_ABST
Patent Text Reader

Abstract

This invention discloses an automatic network protocol code generation method based on formal verification, belonging to the fields of software engineering and formal verification technology. It aims to solve the problems of difficulty in guaranteeing the correctness of existing network protocol code generation, incomplete verification, and high human intervention, achieving automated conversion from natural language protocol specifications to reliable code. The method extracts the unique formal properties of network protocols, guides a large language model to generate Dafny intermediate code with verification annotations, and after verification and iterative optimization using the Dafny tool, converts it into target language code such as Python and C. The system includes modules for requirements analysis and formal property extraction working collaboratively. This invention integrates large language models and formal verification technology to construct an automated closed loop, significantly improving code correctness, reliability, and development efficiency, balancing formal correctness and engineering applicability, and is suitable for the development of various network protocols.
Need to check novelty before this filing date? Find Prior Art