mlsanityData to 14 Oct 2026

Synthesizing Precise Protocol Specs from Natural Language for Effective Test Generation

arXiv 2511.17977 ↗First posted 22 Nov 2025cs.SE cs.LG cs.NIcited by 2

Not on the map. Why?

Abstract (arXiv)

Safety- and security-critical systems have to be thoroughly tested against their specifications. The state of practice is to have _natural language_ specifications, from which test cases are derived manually - a process that is slow, error-prone, and difficult to scale. _Formal_ specifications, on the other hand, are well-suited for automated test generation, but are tedious to write and maintain. In this work, we propose a two-stage pipeline that uses large language models (LLMs) to bridge the gap: First, we extract _protocol elements_ from natural-language specifications; second, leveraging a protocol implementation, we synthesize and refine a formal _protocol specification_ from these elements, which we can then use to massively test further implementations. We see this two-stage approach to be superior to end-to-end LLM-based test generation, as 1. it produces an _inspectable specification_ that preserves traceability to the original text; 2. the generation of actual test cases _no longer requires an LLM_; 3. the resulting formal specs are _human-readable_, and can be reviewed, version-controlled, and incrementally refined; and 4. over time, we can build a _corpus_ of natural-language-to-formal-specification mappings that can be used to further train and refine LLMs for more automatic translations. Our prototype, AUTOSPEC, successfully demonstrated the feasibility of our approach on five widely used _internet protocols_ (SMTP, POP3, IMAP, FTP, and ManageSieve) by applying its methods on their _RFC specifications_ written in natural-language, and the recent _I/O grammar_ formalism for protocol specification and fuzzing. In its evaluation, AUTOSPEC recovers on average 92.8% of client and 80.2% of server message types, and achieves 81.5% message acceptance across diverse, real-world systems.

Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 16 of its 57 references that are in the map. First posted on arXiv 22 Nov 2025.

Builds on

16 of 57 references.

References · 16

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2023GPT-4 Technical Reportcited by 18,396
  3. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,326
  4. 2022Survey of Hallucination in Natural Language Generationcited by 2,075
  5. 2023A Survey on Hallucination in Large Language Models: Principles, Taxonomy, Challenges, and Open Questionscited by 1,601
  6. 2021Software Engineering for AI-Based Systems: A Surveycited by 69
  7. 2023nl2spec: Interactively Translating Unstructured Natural Language to Temporal Logics with Large Language Modelscited by 60
  8. 2023Grounding Complex Natural Language Commands for Temporal Tasks in Unseen Environmentscited by 53
  9. 2018Superion: Grammar-Aware Greybox Fuzzingcited by 12
  10. 2020Semi-Automated Protocol Disambiguation and Code Generationcited by 9
  11. 2022Automated Attack Synthesis by Extracting Finite State Machines from Protocol Specification Documentscited by 8
  12. 2025Validating Network Protocol Parsers with Traceable RFC Document Interpretationcited by 7
4 more
  1. 2025RFCAudit: An LLM Agent for Functional Bug Detection in Network Protocolscited by 7
  2. 2018Smart Greybox Fuzzingcited by 6
  3. 2018NLP-assisted software testing: A systematic mapping of the literaturecited by 4
  4. 2025Language-Based Protocol Testingcited by 1

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 2.

2 papers.