ACAV (Aurora Clang AST Viewer) is an interactive tool for visualizing Abstract Syntax Trees (ASTs) in C, C++, and Objective-C codebases [1]. It integrates with JSON compilation databases like compile_commands.json, applying recorded build settings for each source file to keep the interface responsive through background processing and AST caching [1].
Designed for real-world projects, ACAV allows users to open a project and inspect the AST of a translation unit, seamlessly moving between source code and corresponding AST nodes [1]. However, the tool supports only read-only AST exploration; it does not modify source code, perform refactoring, or serve as a general editor [1].
Typical users include students studying compiler internals, researchers analyzing program structure, and developers debugging or building Clang-based tooling [1]. ACAV's design addresses challenges found in real-world C codebases, which often rely on non-standard behaviors and compiler extensions to work around bugs or gaps in compilers and system libraries [2].
For example, many system C library headers implement complex preprocessor checks and compiler extensions that complicate portability for compilers other than GCC or Clang [2]. The Linux epoll_event struct applies the GNU attribute((packed)) extension, which alters struct layout and breaks the ABI if unsupported by the compiler [2]. Additionally, glibc headers check for compiler-specific macros like GNUC, Clang, or tcc to define attribute, leaving unsupported compilers without compatible expansions [2].
By integrating with the Clang framework and supporting large, real-world projects, ACAV offers a specialized tool for navigating the complex structure of modern C-family codebases. It is available now as an open resource for educational and development uses [1].