110 likes | 245 Views
Delta-lenses: Unweaving alignment and update propagation. Zinovy D. Generative software development Lab University of Waterloo. and its problems. State-based BX. Modelspace. Modelspace. (get, put). Mixing concerns: -- Algebra of put is complicated, eg.,PutPut Hiding :
E N D
Delta-lenses: Unweaving alignment and update propagation Zinovy D. Generative software development Lab University of Waterloo
and its problems State-based BX Modelspace Modelspace (get, put) Mixing concerns: -- Algebra of put is complicated, eg.,PutPut Hiding : • Lack of alignment control • Ill-formed sequential comp. of BX S V :get S V :put S’ V’
Wrong sequential composition of state-based BX k l A0 B0 C0 :k.get :l.get A B C k l :l.put :k.put A’ B’ C’
Solution: Delta-based BX Modelspace Modelspace put = dif ; dput ; proj V S V S :dif :dput S’ V’
Tile algebra: Symmetric case corresp. specs (matches) Asymmetric case m B A updates :ppg u* u A B’ m
Statement: Be honest (algebraically :-), and treat alignment explicitly • Delta-based BX provides • separation of concerns, • better interfaces, • better algebra Delta-lenses: Proc. ICMT’2010; Ext. version in JOT Symmetric delta-lenses and tile algebra: GTTSE’2009 Postproc. Springer LNCS Mini tutorial on delta-based sync and tile algebra
Wrong sequential composition of state-based BX k l A0 B0 C0 :k.get :l.get A B C k l :l.put :k.put A’ B’ C’
B1 B0 Delta-based BX Modelspace Modelspace Strategy pool Update space Informally, put = dif ; dput ; + where BB’ = dif(B,B’,Y); AA’= dput (BB’, A), A’=A+ AA’ Y S0 Y B A :dif :dput A’ B’
State-based BX A lens is Modelspace Modelspace Update strategy pool (get, put) A0 B0 Y :get A B Y :put A’ B’
Problems of state-based BX :get Y A B Y • Mixing concerns: • Algebra of put is complicated, eg, PutPut • Hiding Y • Lack of alignment control • Ill-formed sequential comp. of BX :put A’ B’