Development history is useful for debugging and understanding the software better. State-of-the-art approach to maintain a development history is to select a version control system (VCS) and let the developer create revisions --- snapshots of the source code --- whenever they feel like.

Unfortunately, a manually managed development history is coarse and incomplete. The developers create a revision only when they feel that a high-level task, such as fixing a bug, or implementing a new feature, is completed. The granularity of the history could be too coarse for historical analyses, or for manual inspection. Additionally, any changes that are overwritten between two revisions are lost forever.

To create a complete history with flexible granularity, Chronos maintains a fine-grained development history, creating a Git revision for each atomic change on the source code. This fine-grained development history is the true development. Additionally, Chronos features a history manipulation framework that lets other analyses or developers to automatically rewrite the fine-grained development history in custom coarser granularities that are more suitable for the task at hand. Chronos' fine-grained development history and the history manipulation framework improves software development in three ways:

  1. By improving existing historical analyses: the fine-grained history lets existing historical analyses to perform at their best.
  2. By making it possible to create new historical analyses: the fine-grained history makes it possible to create new analyses that was not possible before, e.g., studying backtracking.
  3. By removing the burden of manually managing a development history: using Chronos' history manipulation framework, the developers can view the fine-grained history in coarser granularities that are more familiar, e.g., viewing all changes on a file as one revision.

History Manipulation Framework

Chronos' history manipulation framework trivializes to rewrite a development history (including the fine-grained development history) into coarser granularities. A development history is represented as a Git branch. Chronos' history manipulation framework rewrites the input history on a new Git branch, ensuring that all rewrite operations are reversible. The analyses and the developers can enjoy working on development histories with more suitable granularities, without the fear of losing information: the fine-grained development history is always preserved.

Currently, Chronos' history manipulation framework supports the following rewrites:

  1. Coherent-edit change granularity: the input history is rewritten by grouping consecutive changes in which the developer stays inside the same editing region.
  2. File-level change granularity: the input history is rewritten by reordering and grouping changes on each source file into one snapshot.
  3. Compilable code granularity: the input history is rewritten by keeping snapshots where the source code compiles, and squashing remaining snapshots.

In addition to the above-mentioned granularities, Chronos' history manipulation framework provides two high-level API that makes it very easy to build a custom granularity rewrite tool:

  1. Collapse: The developer implements a function that takes as input a Git revision and tells Chronos, which group this revision belongs to.
  2. Collapse Consecutive: The developer implements a function that takes as input a Git revision and tells Chronos whether this revision belongs to the current group or a new one.

Once all revisions in the input development history is processed, Chronos cherry picks (copies) all revisions to the output branch and then rebases (squashes) each group of revisions into one larger revision.


This project is being developed by: