Cottontail: Large Language Model-Driven Concolic Execution for Highly Structured Test Input Generation

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Tu, Haoxin, Lee, Seongmin, Li, Yuxian, Chen, Peng, Jiang, Lingxiao, Böhme, Marcel
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866917012634075136
author Tu, Haoxin
Lee, Seongmin
Li, Yuxian
Chen, Peng
Jiang, Lingxiao
Böhme, Marcel
author_facet Tu, Haoxin
Lee, Seongmin
Li, Yuxian
Chen, Peng
Jiang, Lingxiao
Böhme, Marcel
contents How can we perform concolic execution to generate highly structured test inputs for systematically testing parsing programs? Existing concolic execution engines are significantly restricted by (1) input structure-agnostic path constraint selection, leading to the waste of testing effort or missing coverage; (2) limited constraint-solving capability, yielding many syntactically invalid test inputs; (3) reliance on manual acquisition of highly structured seed inputs, resulting in non-continuous testing. This paper proposes Cottontail, a new Large Language Model (LLM)-driven concolic execution engine, to mitigate the above limitations. A more complete program path representation, named Expressive Structural Coverage Tree (ESCT), is first constructed to select structure-aware path constraints. Later, an LLM-driven constraint solver based on a Solve-Complete paradigm is designed to solve the path constraints smartly to get test inputs that are not only satisfiable to the constraints but also valid to the input syntax. Finally, a history-guided seed acquisition is employed to obtain new highly structured test inputs either before testing starts or after testing is saturated. We implemented Cottontail on top of SymCC and evaluated eight extensively tested open-source libraries across four different formats (XML, SQL, JavaScript, and JSON). Cottontail significantly outperforms baseline approaches by 30.73% and 41.32% on average in terms of line and branch coverage. Besides, Cottontail found six previously unknown vulnerabilities (six CVEs assigned). We have reported these issues to developers, and four out of them have been fixed so far.
format Preprint
id arxiv_https___arxiv_org_abs_2504_17542
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Cottontail: Large Language Model-Driven Concolic Execution for Highly Structured Test Input Generation
Tu, Haoxin
Lee, Seongmin
Li, Yuxian
Chen, Peng
Jiang, Lingxiao
Böhme, Marcel
Software Engineering
How can we perform concolic execution to generate highly structured test inputs for systematically testing parsing programs? Existing concolic execution engines are significantly restricted by (1) input structure-agnostic path constraint selection, leading to the waste of testing effort or missing coverage; (2) limited constraint-solving capability, yielding many syntactically invalid test inputs; (3) reliance on manual acquisition of highly structured seed inputs, resulting in non-continuous testing. This paper proposes Cottontail, a new Large Language Model (LLM)-driven concolic execution engine, to mitigate the above limitations. A more complete program path representation, named Expressive Structural Coverage Tree (ESCT), is first constructed to select structure-aware path constraints. Later, an LLM-driven constraint solver based on a Solve-Complete paradigm is designed to solve the path constraints smartly to get test inputs that are not only satisfiable to the constraints but also valid to the input syntax. Finally, a history-guided seed acquisition is employed to obtain new highly structured test inputs either before testing starts or after testing is saturated. We implemented Cottontail on top of SymCC and evaluated eight extensively tested open-source libraries across four different formats (XML, SQL, JavaScript, and JSON). Cottontail significantly outperforms baseline approaches by 30.73% and 41.32% on average in terms of line and branch coverage. Besides, Cottontail found six previously unknown vulnerabilities (six CVEs assigned). We have reported these issues to developers, and four out of them have been fixed so far.
title Cottontail: Large Language Model-Driven Concolic Execution for Highly Structured Test Input Generation
topic Software Engineering
url https://arxiv.org/abs/2504.17542