Lune

SIGCOMM2021Top-tier venue

Semi-automated protocol disambiguation and code generation

Jane Yen, Tamás Lévai, Qinyuan Ye, Xiang Ren, Ramesh Govindan, Barath Raghavan

Abstract

For decades, Internet protocols have been specified using natural language. Given the ambiguity inherent in such text, it is not surprising that protocol implementations have long exhibited bugs. In this paper, we apply natural language processing (NLP) to effect semi-automated generation of protocol implementations from specification text. Our system, sage, can uncover ambiguous or under-specified sentences in specifications; once these are clarified by the spec author, sage can generate protocol code automatically.

Using sage, we discover 5 instances of ambiguity and 6 instances of under-specification in the ICMP RFC; after clarification, sage is able to automatically generate code that interoperates perfectly with Linux implementations. We show that sage generalizes to BFD, IGMP, and NTP. We also find that sage supports many of the conceptual components found in key protocols, suggesting that, with some additional machinery, sage may be able to generalize to TCP and BGP.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

13 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • DAInfer: Inferring API Aliasing Specifications from Library Documentation via Neurosymbolic Optimization cites CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • Hermes: Unlocking Security Analysis of Cellular Network Protocols by Synthesizing Finite State Machines from Natural Language Specifications cites Automated Attack Synthesis by Extracting Finite State Machines from Protocol Specification Documents
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers13

  1. Automated Attack Synthesis by Extracting Finite State Machines from Protocol Specification DocumentsMaria Leonor Pacheco, Max von Hippel, Ben Weintraub, Dan Goldwasser et al.S&P 2022 · 58 citations
  2. Hermes: Unlocking Security Analysis of Cellular Network Protocols by Synthesizing Finite State Machines from Natural Language SpecificationsAbdullah Al Ishtiaq, Sarkar Snigdha Sarathi Das, Syed Md. Mukit Rashid, Ali Ranjbar et al.USENIX Security 2024 · 28 citations
  3. iSyn: Semi-automated Smart Contract Synthesis from Legal Financial AgreementsPengcheng Fang, Zhenhua Zou, Xusheng Xiao, Zhuotao LiuISSTA 2023 · 11 citations
  4. DAInfer: Inferring API Aliasing Specifications from Library Documentation via Neurosymbolic OptimizationChengpeng Wang, Jipeng Zhang, Rongxin Wu, Charles ZhangFSE 2024 · 5 citations
  5. 3DGen: AI-Assisted Generation of Provably Correct Binary Format ParsersSarah Fakhoury, Markus Kuppe, Shuvendu K. Lahiri, Tahina Ramananandro et al.ICSE 2025 · 2 citations

Builds on4

  1. ALBERT: A Lite BERT for Self-supervised Learning of Language RepresentationsZhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel et al.ICLR 2020 · 7,418 citations
  2. CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan et al.EMNLP Findings 2020 · 2,828 citations
  3. Switch Code Generation Using Program SynthesisXiangyu Gao, Taegyun Kim, Michael D. Wong, Divya Raghunathan et al.SIGCOMM 2020 · 51 citations
  4. Learning from Explanations with Neural Execution TreeZiqi Wang, Yujia Qin, Wenxuan Zhou, Jun Yan et al.ICLR 2020 · 41 citations

Related papers

  1. LLMs Unleashed: Generating Protocol Code from RFC SpecificationsJunfeng Long, Jinshu Su, Biao HanAAAI 2026
  2. Generating Precise Format Specification for Network Protocols Through Adversarial LLM InteractionsHengdi Ye, Bing Shui, Jielun Wu, Yufan Zhou et al.USENIX Security 2026
  3. Spec2Code: Mapping Protocol Specification to Function-Level Code ImplementationYuekun Wang, Lili Quan, Xiaofei Xie, Junjie Wang et al.ASE 2025
  4. Enhancing REST API Testing with NLP TechniquesMyeongsoo Kim, Davide Corradini, Saurabh Sinha, Alessandro Orso et al.ISSTA 2023 · 34 citations
  5. ProtocolGuard: Detecting Protocol Non-compliance Bugs via LLM-guided Static Analysis and Dynamic VerificationXiangpu Song, Longjia Pei, Jianliang Wu, Yingpei Zeng et al.NDSS 2026 · 3 citations
Dusk over the sea between two cliffs drawn in fine vertical lines