Title: Version control for graphbased models
1Version control for graph-based models
- Z. Protic
- M. F. van Amstel
- M.G.J. van den Brand
2Outline
- Goals
- Software versioning
- Model versioning
- Graphs as basis for models
- Versioning graphs
- Versioning of graph-based models
- Tool architecture
3Goals
- Create a system that is able to put multiple
types of models under version control - The models in place are amongst others labeled
transition systems, UML diagrams, Petri nets, - This system should be able to work with tooling
available at the market
4Software versioning
- The process of assigning unique identifiers to
different states of software - Allows for temporal and logical relation of
states of computer software (version 1.0 precedes
version 2.0 and is less advanced) - Software versioning and revision control form the
basis for software configuration management
(SCM). - Quite suitable for text-based files (CVS, SVN).
- Used in most large software projects
5Software versioningRevision of SCM features
- SCM basic features
- Adding documents to a repository
- Retrieving documents from a repository
- Committing documents into a repository
- Resolving conflicts that occur during the process
of committing
6Model versioning
- Tries to solve the inability of existing software
versioning systems to deal with models of
software artifacts
Text file
Java program
UML XMI file
Document
Package
Model
V
V
Paragraph
Class
Package
V
C
Phrase
Method
Class
Word
Statement
Operation
C
V Unit of versioning C Unit of comparison
Odysey-VCS a Flexible Version Control System
for UML Model Elements, H. Oliveiar et. al., SCM
2005
7Model versioning
- Challenges
- Represent models (in enough detail)
- Store models
- Calculate differences (deltas) between models
- Describe and resolve conflicts while
synchronizing models
8Model versioningRepresentation of differences
- State based
- Models are represented as sets of entities and
relations. - Differences are expressed in terms of states of
entities and relations in initial and final model
(present or absent). - Operation based
- Models are represented as operations required to
produce a model. - Difference are expressed in terms of operations
required to come from initial to final model
9Versioning graphs
- Graphs consist of
- Labeled nodes
- Labeled edges
Example graph
10Versioning graphs
- Graphs can be transformed to structured text.
- Text can be versioned by SVN (or ).
- Differences expressed in terms of added/removed
nodes and edges (state based).
O1 O2 O3 O4 O1, O2, E1 O1, O4, E2
Bi-directional transformation
Example graph
Textual representation
11Graphs as basis for models
- Claim Most models describing software artifacts
can be transformed into graphs. - However the transformation is different for every
model type (for every meta-model).
12Graphs as basis for models
- Example simple UML class diagram
ltclassgt
ltattributegt
lttypegt
A
ID1
ID2
ID3
B Int
A
B
Int
13Graphs as basis for modelsGraphs for more
complex model types
14Graphs as basis for models
- Generic approach
- Models are represented as graphs.
- Differences are calculated on graphs, and hence
are state based. - Unit of versioning is the graph representation of
the model. - Unit of comparison is defined by the user.
15Graph-based model versioning
16Graph-based model versioning tool architecture
17Use-case Application of a model version tool for
versioning of UML class diagrams
18Use-case Application of a model version tool for
versioning of UML class diagrams
19Use-case Application of a model version tool for
versioning of UML class diagrams
20Use-case Application of a model version tool for
versioning of UML class diagrams