arXiv.itsnick.co

an independent field guide to 23 million papers from arXiv & OpenAlex — not affiliated with arXiv.org

Computer Science · Hardware and Architecture

ACAV: Aurora Clang Abstract Syntax Tree (AST) Viewer

Min Liu

· UVic’s Research and Learning Repository (University of Victoria)

See on the map

Abstract

The C and C++ programming languages underpin much of modern systems software, and the compilers that translate these languages rely on a key internal data structure called the abstract syntax tree (AST). Understanding the AST that a compiler produces is valuable both for developers who build or debug compiler-based tools and for language learners who wish to see how the compiler interprets specific language features. Because each compiler produces its own AST, exploring the tree requires tools specific to that compiler. Clang, a widely used, open-source compiler for C-family languages, provides a built-in text dump for this purpose, but the output can span hundreds, thousands, or even millions of lines and offers no interactive navigation. This report presents ACAV (Aurora Clang AST Viewer), a graphical tool for interactively exploring Clang ASTs. ACAV allows users to load a C or C++ project, visually browse the AST of any source file, and navigate bidirectionally between source code and AST nodes. The report begins by providing the background on the architecture of the compiler front end, the LLVM/Clang ecosystem, and ASTs needed to understand the design. The software requirements for ACAV are then defined, covering both functional and nonfunctional concerns. The system design and architecture are described, including the rationale for key design decisions and the tradeoffs involved. Practical guidance on building, installing, and using the software is provided for both command-line and graphical workflows. Finally, the software is evaluated against its stated requirements, with discussion of the testing methodology, performance observations, maintainability, and existing tools.

More like this