[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to main content

A Tangled Web of 12 Lens Laws

  • Conference paper
  • First Online:
Reversible Computation (RC 2021)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 12805))

Included in the following conference series:

Abstract

Bidirectional transformation has played important roles in broad areas, database management, programming language, and model-driven development after Foster et al. revisited view updating problems introduced by Bancilhon and Spyratos. They introduced the concept of (asymmetric) lens as a pair of a forward \( get \) and a backward \( put \) functions to synchronize a source data and its view consistently. For the \( get \) and \( put \) functions to be consistent, they should satisfy several lens laws such as the (StrongGetPut), (GetPut), (PutGet) and (PutPut) laws. By combining some of these lens laws, we can represent how consistent a lens satisfying the laws is. Fischer et al. has introduced nine meaningful weaker lens laws to give a “clear picture” of the laws where they show relations among lens laws, for example, that one law implies another and combination of two laws is equivalent to combination of the other three laws. This paper gives more precise relationship among 12 lens laws that have been presented in literature. The relationship makes an intertwined implication diagram like a tangled web. The results can be used for easily verifying the desirable lens laws.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
£29.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
GBP 19.95
Price includes VAT (United Kingdom)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
GBP 35.99
Price includes VAT (United Kingdom)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
GBP 44.99
Price includes VAT (United Kingdom)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    In [3], a lens is said to be undoable when not only (Undoability) but also (PutGet) hold in our terminology.

  2. 2.

    We prefer a shorter name though it might be called the StrongGetPut family.

References

  1. Bancilhon, F., Spyratos, N.: Update semantics of relational views. ACM Trans. Database Syst. 6(4), 557–575 (1981). https://doi.org/10.1145/319628.319634

    Article  MATH  Google Scholar 

  2. Bohannon, A., Pierce, B.C., Vaughan, J.A.: Relational lenses: a language for updatable views. In: Vansummeren, S. (ed.) Proceedings of the Twenty-Fifth ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems, 26–28 Jun 2006, Chicago, Illinois, USA, pp. 338–347. ACM (2006). https://doi.org/10.1145/1142351.1142399

  3. Diskin, Z.: Algebraic models for bidirectional model synchronization. In: Czarnecki, K., Ober, I., Bruel, J.-M., Uhl, A., Völter, M. (eds.) MODELS 2008. LNCS, vol. 5301, pp. 21–36. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-87875-9_2

    Chapter  Google Scholar 

  4. Diskin, Z., Xiong, Y., Czarnecki, K.: From state- to delta-based bidirectional model transformations: the asymmetric case. J. Object Technol. 10(6), 1–25 (2011). https://doi.org/10.5381/jot.2011.10.1.a6

    Article  Google Scholar 

  5. Fischer, S., Hu, Z., Pacheco, H.: A clear picture of lens laws. In: Hinze, R., Voigtländer, J. (eds.) MPC 2015. LNCS, vol. 9129, pp. 215–223. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-19797-5_10

    Chapter  MATH  Google Scholar 

  6. Foster, J.N., Greenwald, M.B., Kirkegaard, C., Pierce, B.C., Schmitt, A.: Exploiting schemas in data synchronization. J. Comput. Syst. Sci. 73(4), 669–689 (2007). https://doi.org/10.1016/j.jcss.2006.10.024

    Article  MathSciNet  MATH  Google Scholar 

  7. Foster, J.N., Greenwald, M.B., Moore, J.T., Pierce, B.C., Schmitt, A.: Combinators for bidirectional tree transformations: a linguistic approach to the view-update problem. ACM Trans. Program. Lang. Syst. 29(3), 17 (2007). https://doi.org/10.1145/1232420.1232424

    Article  MATH  Google Scholar 

  8. Foster, J.N., Pilkiewicz, A., Pierce, B.C.: Quotient lenses. In: Hook, J., Thiemann, P. (eds.) Proceeding of the 13th ACM SIGPLAN international conference on Functional programming, ICFP 2008, Victoria, BC, Canada, 20–28 Sept 2008, pp. 383–396. ACM (2008). https://doi.org/10.1145/1411204.1411257

  9. Foster, N., Matsuda, K., Voigtländer, J.: Three complementary approaches to bidirectional programming. In: Gibbons, J. (ed.) Generic and Indexed Programming. LNCS, vol. 7470, pp. 1–46. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-32202-0_1

    Chapter  MATH  Google Scholar 

  10. Hidaka, S., Hu, Z., Inaba, K., Kato, H., Matsuda, K., Nakano, K.: Bidirectionalizing graph transformations. In: Proceeding of the 15th ACM SIGPLAN International Conference on Functional Programming, ICFP 2010, Baltimore, Maryland, USA, 27–29 Sept 2010, pp. 205–216 (2010). https://doi.org/10.1145/1863543.1863573

  11. Hidaka, S., Tisi, M., Cabot, J., Hu, Z.: Feature-based classification of bidirectional transformation approaches. Softw. Syst. Model. 15(3), 907–928 (2016). https://doi.org/10.1007/s10270-014-0450-0

    Article  Google Scholar 

  12. Hu, Z., Mu, S., Takeichi, M.: A programmable editor for developing structured documents based on bidirectional transformations. In: Heintze, N., Sestoft, P. (eds.) Proceedings of the 2004 ACM SIGPLAN Workshop on Partial Evaluation and Semantics-based Program Manipulation, 2004, Verona, Italy, 24–25 Aug 2004, pp. 178–189. ACM (2004). https://doi.org/10.1145/1014007.1014025

  13. Kmett, E.: The Lens library: Lenses, Folds and Traversals (2013). http://lens.github.io

  14. Ko, H., Zan, T., Hu, Z.: Bigul: a formally verified core language for putback-based bidirectional programming. In: Proceedings of the 2016 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, PEPM 2016, St. Petersburg, FL, USA, 20–22 Jan 2016, pp. 61–72 (2016). https://doi.org/10.1145/2847538.2847544

  15. Nakano, K.: Towards a complete picture of lens laws. In: Proceedings of the Third Workshop on Software Foundations for Data Interoperability (SFDI2019+), Fukuoka, Japan (2019)

    Google Scholar 

  16. Nakano, K., Hu, Z., Takeichi, M.: Consistent web site updating based on bidirectional transformation. Int. J. Softw. Tools Technol. Transf. 11(6), 453–468 (2009). https://doi.org/10.1007/s10009-009-0124-3

    Article  Google Scholar 

  17. Pickering, M., Gibbons, J., Wu, N.: Profunctor optics: modular data accessors. Art Sci. Eng. Program. 1(2), 7 (2017). https://doi.org/10.22152/programming-journal.org/2017/1/7

    Article  Google Scholar 

  18. Sasano, I., Hu, Z., Hidaka, S., Inaba, K., Kato, H., Nakano, K.: Toward bidirectionalization of ATL with GRoundTram. In: Cabot, J., Visser, E. (eds.) ICMT 2011. LNCS, vol. 6707, pp. 138–151. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-21732-6_10

    Chapter  MATH  Google Scholar 

  19. Stevens, P.: Bidirectional model transformations in QVT: semantic issues and open questions. Softw. Syst. Model. 9(1), 7–20 (2010). https://doi.org/10.1007/s10270-008-0109-9

    Article  Google Scholar 

  20. Stevens, P.: Observations relating to the equivalences induced on model sets by bidirectional transformations. ECEASST 49 (2012). https://doi.org/10.14279/tuj.eceasst.49.714

Download references

Acknowledgment

The author thanks Mirai Ikebuchi and anonymous referees for their helpful comments. This work was supported by JSPS KAKENHI Grant Numbers JP17H06099, JP18H04093, and JP21K11744.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Keisuke Nakano .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Nakano, K. (2021). A Tangled Web of 12 Lens Laws. In: Yamashita, S., Yokoyama, T. (eds) Reversible Computation. RC 2021. Lecture Notes in Computer Science(), vol 12805. Springer, Cham. https://doi.org/10.1007/978-3-030-79837-6_11

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-79837-6_11

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-79836-9

  • Online ISBN: 978-3-030-79837-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics