# Proof Skeleton Design

This document aims at helping developers getting into the code of the proof skeleton viewer.

## Purpose

The Proof Skeleton View gives the user the ability to quickly browse the skeleton of a proof, without having to prove it anew. Furthermore, it is intended to be a convenient way to display rules and sequents together in the same view.

## Building the skeleton

Core functions consist in rebuilding a proof tree from a saved proof. This is done in the ProofSkeletonBuilder class.

Firstly, being given a proof, the root sequent can be built, using saved proof dependencies. From that, the ProofBuilder provides a reuse() method that allows reconstructing the proof tree from saved proof skeleton.

## View architecture

The two-part view is based on Eclipse's form MasterDetailsBlock. The main idea is that the master part (on the left) contains browsable data (for us, a proof tree), and depending on the master element being selected (a rule in our case), the details part (on the right) is refreshed with data concerning this very element (sequents here).

Classes are structured in the following way:
```
```

```
``` MasterDetailsBlock : creates the MasterPart and registers the DetailsPageProvider
MasterPart : contains the tree viewer and fires tree selection change events
ContentProvider : provides proof skeleton data to the tree viewer
LabelProvider : provides node labels and images to the tree viewer
DetailsPageProvider : returns the sequent details page when a proof tree node is selected
DetailsPage : contains a list viewer that displays the sequent of the currently selected node

```
```