Apr 2026· Proceedings of the 2026 IEEE/ACM 48th International Conference on Software Engineering· 0 citations· 33 references
Computer Science
TL;DR
DBcover is proposed, an LLM-driven database test generation framework that performs white-box, code-aware SQL test generation through contextual reasoning, and substantially outperforms existing fuzzers.
Abstract
Relational Database Management Systems (RDBMSs) form the backbone of modern data-intensive applications, making their reliability and robustness of paramount importance. However, due to the large code base and immense code complexity, achieving high coverage in RDBMS testing remains a formidable challenge. Traditional fuzzing approaches rely on random SQL generation, which fails to capture the intricate correspondence between SQL and paths (SQL-to-path correspondence) within the codebase, leading to low code coverage. Symbolic execution–based methods can, in principle, address this issue but incur prohibitive computational costs and suffer from scalability bottlenecks on large systems. We propose DBcover, an LLM-driven database test generation framework that performs white-box, code-aware SQL test generation through contextual reasoning. DBcover integrates lightweight dynamic analysis to extract SQL-to-path correspondence and call graphs as global context, and constructs source-level dependency information around target functions as local context. Both types of contextual information are organized within a unified knowledge graph, enabling efficient retrieval, reasoning, and reuse across iterative test generation. Built upon this contextual foundation, DBcover adopts a two-phase test generation strategy. In the seed selection phase, it identifies a semantically relevant existing test case by analyzing SQL-to-path relationships within the knowledge graph. In the query generation phase, the LLM, equipped with both global and local context, employs a fine-grained reasoning pipeline to synthesize new SQL test cases that accurately trigger previously uncovered code regions. Experimental results show that DBcover substantially outperforms existing fuzzers, achieving \(80.1\%\) and \(82.3\%\) coverage on PostgreSQL and MySQL. Experiments conducted on an enterprise RDBMS KingbaseES demonstrate the effectiveness and practical applicability of our approach on closed-source RDBMSs.
This work presents AutoSQL, a system that reconstructs SQL templates from Go ORM code that constructs a Code Index, a directed graph that captures structural dependencies between functions, types, and global variables as navigable edges and synthesizes SQL templates.
Junsong Pu, Yichen Li, Zhuangbin Chen et al.· 0 citations
This work introduces ExpeSQL, a zero-shot, open-source–compatible, and efficient framework that combines divide-and-conquer reasoning, Best-of-N candidate selection, and self-critique with experience-guided refinement that establishes a new paradigm for deployable, self-improving Text-to-SQL systems in dynamic, real-world environments.
Static analysis remains a cornerstone of software security, yet the effectiveness of tools such as CodeQL is often limited by the substantial manual effort required to develop high-coverage query suites. While large language models (LLMs) have emerged as a potential solution for automated code reasoning, their practical utility in generating structured, executable security queries remains underexplored. In this paper, we conduct an empirical study to evaluate the ability of LLMs to synthesize CodeQL queries using vulnerability data from the National Vulnerability Database. Through this investigation, we explore the potential of using LLMs as an automatic CodeQL query generator. Subsequently, we systematically evaluate the performance of various LLM architectures across a diverse set of real-world vulnerabilities, measuring their ability to improve detection coverage and precision. Our findings reveal that LLM-generated queries significantly enhance the baseline CodeQL queries, yielding 82% improvement in average F1-score. Furthermore, we provide a detailed cost- benefit analysis showing that while direct LLM-based scanning of entire repositories is often computationally and financially prohibitive, leveraging LLMs to synthesize CodeQL queries offers a scalable and cost-effective alternative for large-scale vulnerability detection. Our results suggest that LLMs can effectively bridge the gap between unstructured vulnerability reports and formal static analysis specifications, offering a scalable path toward comprehensive automated vulnerability detection.
I. Irsan, Ratnadira Widyasari, Huihui Huang et al.· 0 citations
DBLifeBench is introduced, the first benchmark to evaluate LLMs across five critical lifecycle phases: Design, Implementation, Operation, Debugging, and Maintenance, and a novel task utilizing structured reasoning graphs to mimic human iterative problem-solving is proposed.
Shunfan Zheng, Dongsheng Shi, Yue Li et al.· 0 citations
The Domain-Oriented Tooling Pattern is proposed: instead of generating SQL at query time, the model selects from a small set of domain-aligned tools whose parameterized queries encapsulate schema navigation, joins and business rules on the server side.
Bartolomeo Bogliolo· 0 citations
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.