ORCID Identifier(s)

0009-0007-8357-928X

Graduation Semester and Year

Summer 2026

Language

English

Document Type

Dissertation

Degree Name

Doctor of Philosophy in Computer Science

Department

Computer Science and Engineering

First Advisor

Christoph Csallner

Abstract

Context-free grammars are essential for a number of software engineering tasks like program understanding, debugging, and grammar-based testing. However, formal language descriptions (i.e. grammars) are often unavailable, outdated, or inaccessible because parsers are closed-source or cannot be instrumented. Black-box grammar inference addresses this gap using only valid sample programs and parser acceptance decisions. The problem is challenging because finite samples rarely exercise all language features or their combinations, while the inference process cannot inspect the parser’s internal representation of syntax. This dissertation develops deterministic techniques for black-box context-free grammar inference. The first tool, TreeVada introduces the structural assumption that balanced brackets often indicate nested language concepts. It uses this structure to initialize parse trees, recursively applies learned rules, and replaces nondeterministic exploration with deterministic steps. XVada extends this approach to improve scalability to larger languages. It accelerates inference through batch processing of candidate generalizations, introduces a mechanism for learning non-recursive rules, and applies Hierarchical Delta Debugging to decompose complex parse trees and expose simpler rule alternatives. In an empirical evaluation, TreeVada improved the average F1 score by 19.5\% over Arvada while providing a 2.4× speedup. Across seventeen languages grouped by grammar size and complexity, XVada maintained comparable accuracy on smaller languages while reducing average inference time by 57\% relative to TreeVada. On larger languages, XVada increased the average F1 score from 12\% to 47\%, a gain of 35 percentage points, and reduced average grammar size by 20\%. XVada demonstrated the practical utility of the inferred grammar, as it revealed one CVE, and a fuzzing campaign found 5 more bugs in Python Liquid engine, which the developer fixed upon our bug report. Overall, TreeVada and XVada provide a progressive foundation for practical black-box context-free grammar inference, improving both scalability and grammar quality.

Keywords

Grammar inference, Reverse engineering, Context-free grammars, Grammar-guided fuzzing, Security vulnerabilities, Hierarchical delta-debugging, Brackets, Nesting concepts, Parse tree, Deterministic inference

Disciplines

Computational Engineering

License

Creative Commons Attribution 4.0 International License
This work is licensed under a Creative Commons Attribution 4.0 International License.

Share

COinS
 
 

To view the content in your browser, please download Adobe Reader or, alternately,
you may Download the file to your hard drive.

NOTE: The latest versions of Adobe Reader do not support viewing PDF files within Firefox on Mac OS and if you are using a modern (Intel) Mac, there is no official plugin for viewing PDF files within the browser window.