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.

People

Latest News

2017-07-13 Best Paper: cHash at USENIX ATC 2017
Christian Dietrich presents our paper cHash: Detection of Redundant Compilations via AST Hashing at the USENIX ATC 2017 conference. In the paper we describe a new approach to quickly decide which files really need to be recompiled after some change to the source code. We got an Best Paper Award for this work.

Publications

USENIX Conference A Best Paper Award
cHash: Detection of Redundant Compilations via AST Hashing
Christian Dietrich, Valentin Rothberg, Ludwig Füracker, Andreas Ziegler, Daniel LohmannProceedings of the 2017 USENIX Annual Technical Conference (USENIX '17)USENIX Association2017Best Paper Award.
PDF Details Slides Raw Data [BibTex]

Theses

Finished Theses

Implementierung und Evaluation eines FUSE-Dateisystems für Linux zur Integration erweiterter Änderungsdetektionsverfahren in Buildsystemen

Typ: Bachelorarbeit
Status: abgeschlossen
Supervisors: Tobias Landsberg, Daniel Lohmann
Bearbeiter: Malte Müller (abgegeben: 08. Aug 2020)
Implementation of a Filesystem in Userspace to add cHash support to Make

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

 
Typ: Masterarbeit
Status: abgeschlossen
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

Typ: Bachelorarbeit
Status: abgeschlossen
Supervisors: Christian Dietrich, Daniel Lohmann
Redundant-compile propagation in the make dependency graph

Integration of AST Hashing into the GCC compiler

Typ: Bachelorarbeit
Status: abgeschlossen
Supervisors: Christian Dietrich, Daniel Lohmann
Implementation and Analysis of a GCC Plugin to calculate an hash value over the abstract syntax tree of a compilation unit.