Abstract
Delta lenses are a kind of morphism between categories which are used to model bidirectional transformations between systems. Classical state-based lenses, also known as very well-behaved lenses, are both algebras for a monad and coalgebras for a comonad. Delta lenses generalise state-based lenses, and while delta lenses have been characterised as certain algebras for a semi-monad, it is natural to ask if they also arise as coalgebras.
This short paper establishes that delta lenses are coalgebras for a comonad, through showing that the forgetful functor from the category of delta lenses over a base, to the category of cofunctors over a base, is comonadic. The proof utilises a diagrammatic approach to delta lenses, and clarifies several results in the literature concerning the relationship between delta lenses and cofunctors. Interestingly, while this work does not generalise the corresponding result for state-based lenses, it does provide new avenues for exploring lenses as coalgebras.
Original language | English |
---|---|
Pages (from-to) | 18-27 |
Number of pages | 10 |
Journal | CEUR Workshop Proceedings |
Volume | 2999 |
Publication status | Published - 2021 |
Event | STAF 2021 Workshop: 9th International Workshop on Bidirectional Transformations, Joint Workshop on Foundations and Practice of Visual Modeling and Data for Model-Driven Engineering, International Workshop on MDE for Smart IoT Systems, 4th International Workshop on (Meta) Modeling for Healthcare Systems, and 20th International Workshop on OCL and Textual Modeling, STAF-WS 2021 - Bergen, Norway Duration: 21 Jun 2021 → 25 Jun 2021 |
Bibliographical note
Copyright the Author(s) 2021. Version archived for private and non-commercial use with the permission of the author/s and according to publisher conditions. For further rights please contact the publisher.Keywords
- delta lens
- cofunctor
- coalgebra
- bidirectional transformation