An open API service indexing awesome lists of open source software.

https://github.com/kuniwak/isabelle-git-commit-graph

Formal Definition of the Git Commit‑Graph Model
https://github.com/kuniwak/isabelle-git-commit-graph

formal-methods git isabelle

Last synced: 5 months ago
JSON representation

Formal Definition of the Git Commit‑Graph Model

Awesome Lists containing this project

README

          

Formal Definition of the Git Commit‑Graph Model
===============================================

This document gives a formally defined state‑transition model of a Git commit‑object graph that can be mechanically verified in Isabelle.
With this definition, you can quickly write formal definitions of Git branching strategies and formal specifications of the tools that surround them.

To keep the focus on describing the commit graph itself, the concepts of tree and blob objects are omitted.
Consequently, this model is not suitable for formally specifying tools—such as merge drivers—that manipulate trees or blobs.
Moreover, because orphan branches are rarely used, we assume that any two commits in the graph share a common ancestor.
This lets us ignore merge‑failure cases caused by the absence of a common ancestor.

An example definition of a branching strategy can be found in [`ExampleBranchStrategy.thy`](./ExampleBranchStrategy.thy).

Types


Git State

(commit graph * commit)

Graph

('a set * 'a rel)

Commit

Abstracted as natural numbers, since only distinguishability between commits is required.

The initial state of the system is provided by `init`.

Transition Functions


merge

merge :: git ⇒ commit set ⇒ git option

commit

commit :: git ⇒ commit ⇒ git option

License
-------

MIT License