Team_A_2
Sws
Conventions
- Calligraphic letters (e.g.
) represent types
- Capital letters (e.g.
) represent sets
- Lowercase letters (e.g.
) represent an instance of a type
- Indexing: most interior index determines the type (e.g.
is revision
with revision number
)
Basic definitions
Pieces
A piece is a scan of a single physical scroll fragment.
- Can be disabled/re-enabled (e.g. duplicates)
- When disabled will be marked in compositions

: the set of all pieces
Composition members
A composition member is a piece along with a position (relative to the origin of the workspace) and rotation.

: the set of all possible composition members
The position includes a z-index which is used to determine how overlapping pieces are displayed.
A composition member can only be used in one composition.
Compositions
A composition consists of a set of 0 or more composition members and an annotation string.

: the set of all compositions
An annotation is a string which may be empty and may contain newlines.
Versioning system
Definitions (informal)
Branches
A branch has
- a unique identifier
- a sequence of revisions
- initially one empty revision with revision number 0.
Revisions
A revision has
- a set of compositions
- a revision number.
Workspaces
A workspace is a local copy of a branch.
Definitions (formal)
Branches
- sequence of revisions
- unique identifier
Revisions
- set of compositions
- revision number
(unique within branch)
Workspaces
representation of a branch in the compositor
- set of compositions
- branch
- revision number
Uniqueness constraint
Revision
Piece uniqueness: pieces can only occur once.
Workspace
No piece uniqueness: pieces can occur in multiple compositions (conflicts can occur).
State/operations (informal)
Initial state
- Only one branch, named "trunk".
Checkout
- Create a new workspace from a branch
- Optionally specify revision number
Update
- Add all compositions from newer revisions in the branch to the workspace
- Optionally specify revision number
- Can result in conflicts
Import
- Copy one or more compositions from another branch into the workspace
- Can result in conflicts
Branch
- Create a new branch as a copy of another branch
- Optionally specify revision number
Commit
- Stores the workspace as a new revision in the branch
- Requires conflicts to be resolved first (uniqueness constraint)
- Requires workspace to be up-to-date (same revision as branch)
- The revision number is the previous revision number increased by 1
State/operations (formal)
Bigbang
Checkout
Update
Import
Branch
Commit