skip to main content
10.1145/2213556.2213568acmconferencesArticle/Chapter ViewAbstractPublication PagesmodConference Proceedingsconference-collections
tutorial

Linguistic foundations for bidirectional transformations: invited tutorial

Published:21 May 2012Publication History

ABSTRACT

Computing is full of situations where two different structures must be "connected" in such a way that updates to each can be propagated to the other. This is a generalization of the classical view update problem, which has been studied for decades in the database community [11, 2, 22]; more recently, related problems have attracted considerable interest in other areas, including programming languages [42, 28, 34, 39, 4, 7, 33, 16, 1, 37, 35, 47, 49] software model transformation [43, 50, 44, 45, 12, 13, 14, 24, 25, 10, 51], user interfaces [38] and system configuration [36]. See [18, 17, 10, 30] for recent surveys.

Among the fruits of this cross-pollination has been the development of a linguistic perspective on the problem. Rather than taking some view definition language as fixed (e.g., choosing some subset of relational algebra) and looking for tractable ways of "inverting" view definitions to propagate updates from view to source [9], we can directly design new bidirectional programming languages in which every expression defines a pair of functions mapping updates on one structure to updates on the other. Such structures are often called lenses [18].

The foundational theory of lenses has been studied extensively [20, 47, 26, 32, 48, 40, 15, 31, 46, 41, 21, 27], and lens-based language designs have been developed in several domains, including strings [5, 19, 3, 36], trees [18, 28, 39, 35, 29], relations [6], graphs [23], and software models [43, 50, 44, 12, 13, 14, 24, 25, 8]. These languages share some common elements with modern functional languages---in particular, they come with very expressive type systems. In other respects, they are rather novel and surprising.

This tutorial surveys recent developments in the theory of lenses and the practice of bidirectional programming languages.

References

  1. A. Alimarine, S. Smetsers, A. van Weelden, M. van Eekelen, and R. Plasmeijer. There and back again: Arrows for invertible programming. In ACM SIGPLAN Workshop on Haskell, pages 86--97, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. F. Bancilhon and N. Spyratos. Update semantics of relational views. ACM Transactions on Database Systems, 6(4):557--575, Dec. 1981. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. D. M. J. Barbosa, J. Cretin, N. Foster, M. Greenberg, and B. C. Pierce. Matching lenses: Alignment and view update. In ACM SIGPLAN International Conference on Functional Programming (ICFP), Baltimore, Maryland, Sept. 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. N. Benton. Embedded interpreters. Journal of Functional Programming, 15(4):503--542, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. A. Bohannon, J. N. Foster, B. C. Pierce, A. Pilkiewicz, and A. Schmitt. Boomerang: Resourceful lenses for string data. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), San Francisco, California, Jan. 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. A. Bohannon, J. A. Vaughan, and B. C. Pierce. Relational lenses: A language for updateable views. In Principles of Database Systems (PODS), 2006. Extended version available as University of Pennsylvania technical report MS-CIS-05-27. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. C. Brabrand, A. Møller, and M. I. Schwartzbach. Dual syntax for XML languages. Information Systems, 2007. To appear. Extended abstract in Database Programming Languages (DBPL) 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. J. Bradfield and P. Stevens. Recursive checkonly QVT-R transformations with general when and where clauses via the modal mu calculus. In 15th International Conference on Fundamental Approaches to Software Engineering (FASE), 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. P. Buneman, S. Khanna, and W.-C. Tan. On propagation of deletions and annotations through views. In ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems, Madison, Wisconsin, pages 150--158, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. K. Czarnecki, J. N. Foster, Z. Hu, R. Lämmel, A. Schürr, and J. F. Terwilliger. Bidirectional transformations: A cross-discipline perspective. In R. F. Paige, editor, ICMT, volume 5563 of Lecture Notes in Computer Science, pages 260--283. Springer, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. U. Dayal and P. A. Bernstein. On the correct translation of update operations on relational views. TODS, 7(3):381--416, September 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Z. Diskin. Algebraic models for bidirectional model synchronization. In K. Czarnecki, I. Ober, J.-M. Bruel, A. Uhl, and M. Völter, editors, MoDELS, volume 5301 of Lecture Notes in Computer Science, pages 21--36. Springer, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Z. Diskin. Algebraic models for bidirectional model synchronization. In Model Driven Engineering Languages and Systems, 11th International Conference, MoDELS, pages 21--36. Springer, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Z. Diskin, K. Czarnecki, and M. Antkiewicz. Model-versioning-in-the-large: algebraic foundations and the tile notation. In Proceedings of the 2009 ICSE Workshop on Comparison and Versioning of Software Models, pages 7--12. IEEE Computer Society, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Z. Diskin, Y. Xiong, K. Czarnecki, H. Ehrig, F. Hermann, and F. Orejas. From state- to delta-based bidirectional model transformations: The symmetric case. Technical Report GSDLAB-TR 2011-05-03, University of Waterloo, May 2011.Google ScholarGoogle ScholarCross RefCross Ref
  16. K. Fisher and R. Gruber. PADS: a domain-specific language for processing ad hoc data. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), Chicago, IL, pages 295--304, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. J. N. Foster. Bidirectional Programming Languages. PhD thesis, University of Pennsylvania, Dec. 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. J. N. Foster, M. B. Greenwald, J. T. Moore, B. C. Pierce, and A. Schmitt. Combinators for bi-directional tree transformations: A linguistic approach to the view update problem. ACM Transactions on Programming Languages and Systems, 29(3):17, May 2007. Extended abstract in Principles of Programming Languages (POPL), 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. J. N. Foster, B. C. Pierce, and S. Zdancewic. Updatable security views. In IEEE Computer Security Foundations Symposium (CSF), Port Jefferson, NY, July 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. J. N. Foster, A. Pilkiewicz, and B. C. Pierce. Quotient lenses. In ACM SIGPLAN International Conference on Functional Programming (ICFP), Victoria, Canada, Sept. 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. J. Gibbons and M. Johnson. Relating algebraic and coalgebraic descriptions of lenses. In First International Workshop on Bidirectional Transformations (BX 2012), March 2012.Google ScholarGoogle Scholar
  22. G. Gottlob, P. Paolini, and R. Zicari. Properties and update semantics of consistent views. ACM Transactions on Database Systems (TODS), 13(4):486--524, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. S. Hidaka, Z. Hu, K. Inaba, H. Kato, K. Matsuda, and K. Nakano. Bidirectionalizing graph transformations. In ACM SIGPLAN International Conference on Functional Programming (ICFP), Baltimore, Maryland, Sept. 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. S. Hidaka, Z. Hu, H. Kato, and K. Nakano. A compositional approach to bidirectional model transformation. In New Ideas and Emerging Results Track of 31st International Conference on Software Engineering (ICSE 2009, NIER Track), 2009.Google ScholarGoogle ScholarCross RefCross Ref
  25. S. Hidaka, Z. Hu, H. Kato, and K. Nakano. Towards a compositional approach to model transformation for software development. In Proceedings of the 2009 ACM symposium on Applied Computing, pages 468--475. ACM New York, NY, USA, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. M. Hofmann, B. C. Pierce, and D. Wagner. Symmetric lenses. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), Austin, Texas, Jan. 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. M. Hofmann, B. C. Pierce, and D. Wagner. Edit lenses. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), Philadelphia, Pennsylvania, Jan. 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Z. Hu, S.-C. Mu, and M. Takeichi. A programmable editor for developing structured documents based on bi-directional transformations. In Partial Evaluation and Program Manipulation (PEPM), pages 178--189, 2004. Extended version in Higher Order and Symbolic Computation, Volume 21, Issue 1--2, June 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Z. Hu, S.-C. Mu, and M. Takeichi. A programmable editor for developing structured documents based on bidirectional transformations. Higher-Order and Symbolic Computation, 21(1--2), June 2008. Short version in PEPM '04. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Z. Hu, A. Schürr, P. Stevens, and J. F. Terwilliger. Dagstuhl seminar on bidirectional transformations (bx). SIGMOD Record, 40(1):35--39, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. M. Johnson, R. Rosebrugh, and R. Wood. Lenses, fibrations, and universal translations. Mathematical Structures in Computer Science, 22:25--42, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. M. Johnson, R. D. Rosebrugh, and R. Wood. Algebras and Update Strategies. Journal of Universal Computer Science, 16:729--748, 2010.Google ScholarGoogle Scholar
  33. S. Kawanaka and H. Hosoya. bixid: a bidirectional transformation language for XML. In ACM SIGPLAN International Conference on Functional Programming (ICFP), Portland, Oregon, pages 201--214, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. A. J. Kennedy. Functional pearl: Pickler combinators. Journal of Functional Programming, 14(6):727--739, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. D. Liu, Z. Hu, and M. Takeichi. Bidirectional interpretation of xquery. In ACM SIGPLAN Symposium on Partial Evaluation and Semantics-based Program Manipulation (PEPM), Nice, France, pages 21--30, New York, NY, USA, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. D. Lutterkort. Augeas: A Linux configuration API, Feb. 2007. Available from http://augeas.net/.Google ScholarGoogle Scholar
  37. K. Matsuda, Z. Hu, K. Nakano, M. Hamana, and M. Takeichi. Bidirectionalization transformation based on automatic derivation of view complement functions. In ACM SIGPLAN International Conference on Functional Programming (ICFP), pages 47--58. ACM Press New York, NY, USA, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. L. Meertens. Designing constraint maintainers for user interaction, 1998. Manuscript.Google ScholarGoogle Scholar
  39. S.-C. Mu, Z. Hu, and M. Takeichi. An algebraic approach to bi-directional updating. In ASIAN Symposium on Programming Languages and Systems (APLAS), pages 2--20, Nov. 2004.Google ScholarGoogle ScholarCross RefCross Ref
  40. R. O'Connor. Functor is to lens as applicative is to biplate: Introducing multiplate. CoRR, abs/1103.2841, 2011.Google ScholarGoogle Scholar
  41. H. Pacheco, A. Cunha, and Z. Hu. Delta lenses over inductive types. In First International Workshop on Bidirectional Transformations (BX), 2012.Google ScholarGoogle Scholar
  42. N. Ramsey. Embedding an interpreted language using higher-order functions and types. In ACM SIGPLAN Workshop on Interpreters, Virtual Machines and Emulators (IVME), San Diego, CA, pages 6--14, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. P. Stevens. Bidirectional model transformations in QVT: Semantic issues and open questions. In International Conference on Model Driven Engineering Languages and Systems (MoDELS), Nashville, TN, volume 4735 of Lecture Notes in Computer Science, pages 1--15. Springer-Verlag, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. P. Stevens. A landscape of bidirectional model transformations. Postproceedings of GTTSE, 7, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. P. Stevens. Towards an algebraic theory of bidirectional transformations. In Graph Transformations: 4th International Conference, Icgt 2008, Leicester, United Kingdom, September 7--13, 2008, Proceedings, page 1. Springer, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. P. Stevens. Observations relating to the equivalences induced on model sets by bidirectional transformations. In F. Hermann and J. Voigtländer, editors, Proceedings of the First International Workshop on Bidirectional Transformations (BX 2012), 2012. Electronic Communications of the EASST, Volume X.Google ScholarGoogle Scholar
  47. J. Voigtländer. Bidirectionalization for free! (Pearl). In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), Savannah, Georgia, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. J. Voigtländer, Z. Hu, K. Matsuda, and M. Wang. Combining syntactic and semantic bidirectionalization. In P. Hudak and S. Weirich, editors, ICFP, pages 181--192. ACM, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. M. Wang, J. Gibbons, and N. Wu. Incremental updates for efficient bidirectional transformations. In M. M. T. Chakravarty, Z. Hu, and O. Danvy, editors, ICFP, pages 392--403. ACM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. Y. Xiong, D. Liu, Z. Hu, H. Zhao, M. Takeichi, and H. Mei. Towards automatic model synchronization from model transformations. In IEEE/ACM International Conference on Automated Software Engineering (ASE), Atlanta, GA, pages 164--173, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. Y. Yu, Y. Lin, Z. Hu, S. Hidaka, H. Kato, and L. Montrieux. blinkit: Maintaining invariant traceability through bidirectional transformations. In 34th International Conference on Software Engineering (ICSE), 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Linguistic foundations for bidirectional transformations: invited tutorial

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      PODS '12: Proceedings of the 31st ACM SIGMOD-SIGACT-SIGAI symposium on Principles of Database Systems
      May 2012
      332 pages
      ISBN:9781450312486
      DOI:10.1145/2213556

      Copyright © 2012 Author

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 21 May 2012

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • tutorial

      Acceptance Rates

      Overall Acceptance Rate476of1,835submissions,26%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!