Model-versioning-in-the-large: Algebraic foundations and the tile - - PowerPoint PPT Presentation

model versioning in the large algebraic foundations and
SMART_READER_LITE
LIVE PREVIEW

Model-versioning-in-the-large: Algebraic foundations and the tile - - PowerPoint PPT Presentation

Model-versioning-in-the-large: Algebraic foundations and the tile notation Work in progress Zinovy Diskin, Krzysztof Czarnecki and Michal Antkiewicz Generative Software Development Lab University of Waterloo, Canada A very large


slide-1
SLIDE 1

Model-versioning-in-the-large: Algebraic foundations and the tile notation Work in progress

Zinovy Diskin, Krzysztof Czarnecki and Michal Antkiewicz Generative Software Development Lab University of Waterloo, Canada

slide-2
SLIDE 2

9/4/11 CVSM-2009, Vancouver 2

A “very large” picture:

!! Pictures/diagrams are good but informal (no

formal semantics)

!! Formulas are bad (mind boggling) but precise !! The best of the two worlds: precise diagrams

with formal semantics

slide-3
SLIDE 3

9/4/11 CVSM-2009, Vancouver 3

Versioning: small vs. large

Model M1

!

Model M2

Typical setting: 1D and Small

Replicas and matches A A"

"

B"

" B

t Ann Bob t"

"

Carol …

C

Time and updates !R !T A"" B"

"" "

t!! B"

"

C"

"" "

… … … Our setting: 2D and Large

!

Plan of the talk: 1.! Inside a tile 2.! Tile composition 3.! Reconciliation 4.! Sample “large” scenario 5.! Summary/discussion

slide-4
SLIDE 4

9/4/11 CVSM-2009, Vancouver 4

Example: Relational tile

# P:Person

name: Jo

pho: 111 age: 30

Ann’s model, A

= Q:Person

nickname: Jo

pho: 222

Bob’s model, B

=

Frame denotes elements’ IDs

= # P":Person

name: Jo

hPho: 111

model A!

= Q":Person

name: Jon

mPho: 222

model B!

= # # # # # # = #

Green refers to heuristic activity;

# #

slide-5
SLIDE 5

9/4/11 CVSM-2009, Vancouver 5

Versioning-in-the-small: Deltas are tiles

Time Replicas A A"

"

B"

" B

u v t Ann Bob t"

"

m m"

"

A A" m A tile as a revision

  • f match

m" B u v B"

"

/m*

Blue elements are derived (computed)

A A" m m" B u v B"

"

/v* A tile as a revision

  • f update
slide-6
SLIDE 6

9/4/11 CVSM-2009, Vancouver 6

Special cases: Idle/identity tiles

A A"

"

A"

"

A u u 1A 1A’ (b1) Horizontal identity A A B B m (a1) Vertical identity m

1m 1u

1B 1A (ab) 11A =11A A A A A 1A 1A 1A 1A

slide-7
SLIDE 7

9/4/11 CVSM-2009, Vancouver 7

Metamodel of tiles

Node (Model) Horizontal Arrow (Match spec) Vertical Arrow (Update spec) Square (Tile) $0 (src model) $1 (trg model) h$0 (src match)

"h (identical match)

h$1 (trg match) v$0 (src update) v$1 (trg update) $0 (src model) $1 (trg model)

" (identical 2-match) "v (idle

update)

" (idle

2-update)

slide-8
SLIDE 8

9/4/11 CVSM-2009, Vancouver 8

Model versioning-in-the-large. Tile composition & interchange law

Time Replica s A A"

"

B"

" B

m u v t Ann Bob A"

"" "

B"

"" "

u"

"

w t"

"" "

n"

" C

v" Carol C"

"

w"

"

C"

"" "

# % % $ $ ! ! $! !

n m"

"

m"

"" "

n"

"" "

#! ! % %$! ! # ! ! #! !

AC""1 = (# ! ! #! !) % % ($ ! ! $! !) AC""2 = (# % % $ ) ! ! ( &" % % $!)

Interchange law: AC""1 = AC""2

slide-9
SLIDE 9

9/4/11 CVSM-2009, Vancouver 9

Model versioning-in-the-large. Definition of tile system (double category)

!! Collection of nodes, vertical and horizontal

arrows, and squares (tiles)

!! V-arrows can be composed (assoc. and

units) and h-arrows can be composed (assoc. and units).

!! Tiles can be composed vertically (assoc. and

units) and horizontally (assoc. and units), and work together under the interchange law.

slide-10
SLIDE 10

9/4/11 CVSM-2009, Vancouver 10

Model versioning-in-the-large. Pasting lemma: Any tile system has the following property:

{(& &11%

%&12)['1% % (&22 &32)]}% %('3&33) =

(& &11'1)%

%{[(&12&22)% %'3](&32% %&33)}

(& &11'1) %

% (&12&22&32) % % ('3&33) =

slide-11
SLIDE 11

9/4/11 CVSM-2009, Vancouver 11

Optimistic versioning and reconciliation

Standard view Tile view Input Output

A B O A B O O u v m A! B! !!AB A! B! A B m

Algebraic laws: (1) (& % ')! = &! % '! (2) (& " &")! = &"! (optional)

m! u! v! rec

slide-12
SLIDE 12

12

Use case: “large” versioning scenario via tiles

time authors Ann Bob Carol Tue

  • R
  • 1v!
  • R
  • v

v! m! m v!

O O

1O R Mon Wed Wed+ Tue+ Thu Thu+ u u!

slide-13
SLIDE 13

9/4/11 CVSM-2009, Vancouver 13

Summary

!! The elementary unit (molecule) of model versioning

is a 2D-structure -- tile. Complex scenarios are composed from tiles.

!! Tile composition is regulated by algebraic laws of

double categories (associativity, interchange law, pasting lemma).

!! Complex scenarios are terms built from tiles in some

signature of tile operations. Hence,

!! Algebraic machineries of category theory become

applicable (diagram chasing/diagrammatic calculus).

slide-14
SLIDE 14

9/4/11 CVSM-2009, Vancouver 14

Even bigger picture

!! Engineering (e.g., mechanical and electrical) !! Physics !! Mathematics !! Category theory (abstract nonsense)

  • Higher-dimensional category theory

Software Engineering

slide-15
SLIDE 15

9/4/11 CVSM-2009, Vancouver 15

Thank you! Questions/Comments?