model versioning in the large algebraic foundations and
play

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


  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

  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 9/4/11 CVSM-2009, Vancouver 2

  3. Versioning: small vs. large Replicas Carol … and matches Bob Ann Plan of the talk: Model ! ! R M1 … 1. ! Inside a tile A B C t Model ! T ! M2 2. ! Tile composition " " " t " A " B " B " " Typical setting: 3. ! Reconciliation 1D and Small 4. ! Sample “large” t !! A "" " " B " C " "" "" … scenario 5. ! Summary/discussion … Our setting: Time 2D and Large and updates 9/4/11 CVSM-2009, Vancouver 3

  4. Example: Relational tile Green refers to heuristic activity; Frame denotes elements’ ID s Ann’s model, A Bob’s model, B = P:Person Q:Person = name : Jo nickname : Jo # pho: 222 pho: 111 = age: 30 # # # # # # # model A ! model B ! = P " :Person Q " :Person = name : Jo name : Jon # = mPho: 222 hPho: 111 # # 9/4/11 CVSM-2009, Vancouver 4

  5. Versioning-in-the-small: Deltas are tiles Bob Ann m Replicas B A m B A t u /v* v u v " A " B " m " " t " A " " " B " " m " A tile as a revision Time of update m B A Blue elements are v u derived /m* (computed) " B " A " m " A tile as a revision of match 9/4/11 CVSM-2009, Vancouver 5

  6. Special cases: Idle/identity tiles 1 A m 1 A A A A B A A 1 m 1 u 1 A 1 B u 1 A u 1 A " A B A " " A " A A m 1 A’ 1 A (b1) Horizontal (a1) Vertical (ab) 1 1A =1 1A identity identity 9/4/11 CVSM-2009, Vancouver 6

  7. Metamodel of tiles $ 0 (src model) Node Horizontal Arrow $ 1 (trg model) (Model) (Match spec) " h (identical match) $ 0 (src $ 1 (trg h $ 0 (src h $ 1 (trg " (idle " v (idle model) model) match) match) 2-update) update) " (identical 2-match) v $ 0 (src update) Vertical Arrow Square (Update spec) (Tile) v $ 1 (trg update) 9/4/11 CVSM-2009, Vancouver 7

  8. Model versioning-in-the-large. Tile composition & interchange law Ann Bob Carol % $ Replica AC "" 1 = ( # ! ! ) % % ( $ ! ! ) ! #! ! $! # % s m n B C A t AC "" 2 = ( # % % $ ) ! ! ( &" % % $! ) u v w # $ Interchange law: " ! ! " C " ! ! " B " A " " " AC "" 1 = AC "" 2 m " n " ! ! #! $! " w " " u " v " " " " " B " C " t " A " "" "" "" "" " " m " n " "" "" Time ! ! % #! % $! 9/4/11 CVSM-2009, Vancouver 8

  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. 9/4/11 CVSM-2009, Vancouver 9

  10. Model versioning-in-the-large. Pasting lemma: Any tile system has the following property: {( & % & 12 )[ ' 1 % % ( & 22 & 32 )]} % % ( ' 3 & 33 ) = & 11 % ( & & 11 ' 1 ) % % ( & 12 & 22 & 32 ) % % ( ' 3 & 33 ) = ( & & 11 ' 1 ) % % {[( & 12 & 22 ) % % ' 3 ]( & 32 % % & 33 )} 9/4/11 CVSM-2009, Vancouver 10

  11. Optimistic versioning and reconciliation Standard view Tile view O O O u v Input m rec B B A A m A B u ! Output v ! ! ! AB B! A! B! A! m ! Algebraic laws: (1) ( & % ' )! = & ! % ' ! (2) ( & " &" )! = &" ! (optional) 9/4/11 CVSM-2009, Vancouver 11

  12. Use case: “large” versioning scenario via tiles Ann Bob Carol O O authors Mon 1 O u v R • • • Tue 1 v! u! v! v! • • • Tue + R m • • • • Wed m! • • Wed + R • • Thu Thu + • • 12 time

  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). 9/4/11 CVSM-2009, Vancouver 13

  14. Even bigger picture ! ! Engineering (e.g., mechanical and electrical) Software Engineering ! ! Physics ! ! Mathematics ! ! Category theory (abstract nonsense) • Higher-dimensional category theory 9/4/11 CVSM-2009, Vancouver 14

  15. Thank you! Questions/Comments? 9/4/11 CVSM-2009, Vancouver 15

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend