# US 2025/0156288 A1 · Protocol testing using large language models

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2025/0156288 A1
- Document ID: US20250156288A1
- Status: Published application
- Kind: A1
- Application number: 18/440,713
- Filed: 2024-02-13
- Published: 2025-05-15
- Earliest claimed: 2023-11-15
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Siva Kesava Reddy KAKARLA; Ryan Andrew BECKETT
- Web page: https://patentgrep.com/patent/US20250156288A1

## CPC

- G06F 11/28: by checking the correct order of processing (G06F11/08 - G06F11/26 take precedence; monitoring patterns of pulse trains H03K5/19)
- G06F 11/3684: {for test design, e.g. generating new test cases}
- G06F 11/3698: Environments for analysis, debugging or testing of software
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The present disclosure relates to utilizing resources provided by large language models (LLMs) to generate models to be used in model-based testing of a variety of protocols. In particular, systems described herein utilize a vasty body of protocol knowledge defined in RFCs and standards, networking forums, blogs, and other online resources and documents to extract this knowledge in generating models that can be used for testing one or more components of a variety of protocols. The features and functionalities described herein provide a framework for utilizing LLMs to generate a protocol model while providing constraints for a harness (e.g., a symbolic harness) that will guide a symbolic execution engine in generating any number of protocol tests that may be used in determining whether a given application, hardware, and/or software implementation will perform as designed for a given protocol.

## Claims

### Claim 1

A method for generating protocol tests, the method comprising:
generating a model generation prompt including a description of a protocol and instructions associated with generating protocol models;
providing the model generation prompt as an input to a large language model (LLM);
obtaining a modeled component of the protocol, the modeled component of the protocol including executable code generated by the LLM based on the model generation prompt provided as the input to the LLM;
generating a symbolic harness based on the model generation prompt and one or more validity constraints associated with inputs to be handled by the modeled component output by the LLM; and
applying a symbolic execution engine to the modeled component of the protocol based on the symbolic harness to generate a plurality of protocol tests associated with the modeled component of the protocol and which satisfy the one or more validity constraints of the symbolic harness.

### Claim 2 (depends on 1)

The method of claim 1, further comprising executing the plurality of protocol tests using a plurality of protocol implementations to determine one or more of the plurality of protocol implementations having protocol-specific issues.

### Claim 3 (depends on 1)

The method of claim 1, wherein the model generation prompt includes definitions and function arguments of the protocol.

### Claim 4 (depends on 1)

The method of claim 1, wherein the plurality of protocol tests includes an exhaustive set of test cases that follow a plurality of paths through the modeled component of the protocol based on information contained within the symbolic harness.

### Claim 5 (depends on 1)

The method of claim 1, wherein the modeled component is executable C-code based on input and output definitions and descriptions included within the model generation prompt.

### Claim 6 (depends on 1)

The method of claim 1, wherein the symbolic harness is a type-specific symbolic harness in C-code in which symbolic inputs are generated for the modeled component of the protocol.

### Claim 7 (depends on 1)

The method of claim 1, wherein the model generation prompt includes a library that provides restrictions on one or more types of input that the model is configured to receive and a type of output that the modeled component of the protocol is configured to output.

### Claim 8 (depends on 1)

The method of claim 1, wherein the model generation prompt includes a completion prompt that frames an implementation task as a completion problem and a system prompt that guides behavior of the LLM in generating the modeled component of the protocol.

### Claim 9 (depends on 1)

The method of claim 1, wherein the modeled component of the protocol includes a subset of protocol behaviors of the protocol.

### Claim 10 (depends on 1)

The method of claim 1, wherein the protocol is one or more of Quick UDP Internet Connections (QUIC) protocol, Domain Name System (DNS) protocol, or Border Gateway Patrol (BGP) protocol.

### Claim 11

A system, comprising:
at least one processor;
memory in electronic communication with the at least one processor; and
instructions stored in the memory, the instructions being executable by the at least one processor to:
generate a model generation prompt including a description of a protocol and instructions associated with generating protocol models;
provide the model generation prompt as an input to a large language model (LLM);
obtain a modeled component of the protocol, the modeled component of the protocol including executable code generated by the LLM based on the model generation prompt provided as the input to the LLM;
generate a symbolic harness based on the model generation prompt and based on one or more validity constraints associated with inputs to be handled by the modeled component output by the LLM; and
apply a symbolic execution engine to the modeled component of the protocol based on the symbolic harness to generate a plurality of protocol tests associated with the modeled component of the protocol and which satisfy the one or more validity constraints of the symbolic harness.

### Claim 12 (depends on 11)

The system of claim 11, further comprising executing the plurality of protocol tests using a plurality of protocol implementations to determine one or more of the plurality of protocol implementations having protocol-specific issues.

### Claim 13 (depends on 11)

The system of claim 11, wherein the model generation prompt includes definitions and function arguments of the protocol.

### Claim 14 (depends on 11)

The system of claim 11, wherein the plurality of protocol tests includes an exhaustive set of test cases that follow a plurality of paths through the modeled component of the protocol based on information contained within the symbolic harness.

### Claim 15 (depends on 11)

The system of claim 11, wherein the modeled component is executable C-code based on input and output definitions and descriptions included within the model generation prompt.

### Claim 16

A non-transitory computer readable medium storing instructions thereon that, when executed by at least one processor, cause a computing device to:
generate a model generation prompt including a description of a protocol and instructions associated with generating protocol models;
provide the model generation prompt as an input to a large language model (LLM);
obtain a modeled component of the protocol, the modeled component of the protocol including executable code generated by the LLM based on the model generation prompt provided as the input to the LLM;
generate a symbolic harness based on the model generation prompt and based on one or more validity constraints associated with inputs to be handled by the modeled component output by the LLM; and
apply a symbolic execution engine to the modeled component of the protocol based on the symbolic harness to generate a plurality of protocol tests associated with the modeled component of the protocol and which satisfy the one or more validity constraints of the symbolic harness.

### Claim 17 (depends on 16)

The non-transitory computer readable medium of claim 16, wherein the symbolic harness is a type-specific symbolic harness in c-code in which symbolic inputs are generated for the modeled component of the protocol.

### Claim 18 (depends on 16)

The non-transitory computer readable medium of claim 16, wherein the model generation prompt includes a library that provides restrictions on one or more type of inputs that the model is configured to receive and a type of output that the modeled component of the protocol is configured to output.

### Claim 19 (depends on 16)

The non-transitory computer readable medium of claim 16, wherein the model generation prompt includes a completion prompt that frames an implementation task as a completion problem and a system prompt that guides behavior of the LLM in generating the modeled component of the protocol.

### Claim 20 (depends on 16)

The non-transitory computer readable medium of claim 16, wherein the modeled component of the protocol includes a subset of protocol behaviors of the protocol.
