cHash: Avoid redundant build operations by AST-based hashing

During the lifetime of a software project, the compiler is invoked thousands if not hundred-thousands of times. However, the actual source base is only gradually changing. In combination, the a high number of compilations is redundant and could be avoided. A lower number of compiler invocations will not only speed up the development process, since the developer has not to wait for the compiler, but it also saves resources in terms of precious joules.

The cHash project consists of several components:

  • Compiler plugins that detect redundant builds precisely via the mechanism of AST hashing. The result of the AST hash operation is a semantic fingerprint of a single compilation unit. If the fingerprint does not change, the resulting object file will be semantically equivalent.
  • An extension to the build system to further propagate the has-not-changed predicate along the build system dependencies.



USENIX Conference Best Paper Award
cHash: Detection of Redundant Compilations via AST Hashing.
Christian Dietrich, Valentin Rothberg, Ludwig Füracker, Andreas Ziegler, Daniel Lohmann; In: Proceedings of the 2017 USENIX Annual Technical Conference; USENIX Association, 2017. Best Paper Award.
[PDF] [Slides] [Raw Data] [BibTex]


Open Theses Topics

Currently Running Work

Effiziente globale Änderungsanalysen in großen C-Projekten durch Syntaxbaum-Hashing im Clang Compiler

Status: laufend
Supervisors: Christian Dietrich, Andreas Ziegler, Wolfgang Schröder-Preikschat, Daniel Lohmann
Use the cHash method to quantify the impact of source code changes.

Avoidance of Redundant Recompilations by Propagation of Semantic Fingerprints

Status: laufend
Supervisors: Christian Dietrich, Daniel Lohmann
Bearbeiter: Tom Kaiser
Redundant-compile propagation in the make dependency graph

Integration of AST Hashing into the GCC compiler

Status: laufend
Supervisors: Christian Dietrich, Daniel Lohmann
Bearbeiter: Simon van Schwartzenberg
Implementation and Analysis of a GCC Plugin to calculate an hash value over the abstract syntax tree of a compilation unit.

Finished Theses