skip to main content
10.1145/2847538.2847544acmconferencesArticle/Chapter ViewAbstractPublication PagespepmConference Proceedingsconference-collections
research-article

BiGUL: a formally verified core language for putback-based bidirectional programming

Authors Info & Claims
Published:11 January 2016Publication History

ABSTRACT

Putback-based bidirectional programming allows the programmer to write only one putback transformation, from which the unique corresponding forward transformation is derived for free. The logic of a putback transformation is more sophisticated than that of a forward transformation and does not always give rise to well-behaved bidirectional programs; this calls for more robust language design to support development of well-behaved putback transformations. In this paper, we design and implement a concise core language BiGUL for putback-based bidirectional programming to serve as a foundation for higher-level putback-based languages. BiGUL is completely formally verified in the dependently typed programming language Agda to guarantee that any putback transformation written in BiGUL is well-behaved.

Skip Supplemental Material Section

Supplemental Material

References

  1. T. Altenkirch and C. McBride. Generic programming within dependently typed programming. In IFIP TC2/WG2.1 Working Conference on Generic Programming, pages 1–20. Kluwer, B.V., 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. D. M. J. Barbosa, J. Cretin, J. N. Foster, M. Greenberg, and B. C. Pierce. Matching lenses: alignment and view update. In International Conference on Functional Programming, pages 193–204. ACM, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. A. Bohannon, B. C. Pierce, and J. A. Vaughan. Relational lenses: a language for updatable views. In Principles of Database Systems, pages 338–347. ACM, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. J. Cheney. F LUX : functional updates for XML. In International Conference on Functional Programming, pages 3–14. ACM, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. K. Czarnecki, J. N. Foster, Z. Hu, R. Lämmel, A. Schürr, and J. Terwilliger. Bidirectional transformations: a cross-discipline perspective. In International Conference on Model Transformation, volume 5563 of Lecture Notes in Computer Science, pages 260–283. Springer-Verlag, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. N. A. Danielsson, J. Gibbons, J. Hughes, and P. Jansson. Fast and loose reasoning is morally correct. In Principles of Programming Languages, pages 206–217. ACM, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. J. N. Foster. Bidirectional Programming Languages. PhD thesis, University of Pennsylvania, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. J. N. Foster, M. B. Greenwald, J. T. Moore, B. C. Pierce, and A. Schmitt. Combinators for bidirectional tree transformations: a linguistic approach to the view-update problem. ACM Transactions on Programming Languages and Systems, 29(3):17, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. J. N. Foster, A. Pilkiewicz, and B. C. Pierce. Quotient lenses. In International Conference on Functional Programming, pages 383–396. ACM, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. J. Gibbons. Datatype-generic programming. In Spring School on Datatype-Generic Programming, volume 4719 of Lecture Notes in Computer Science, pages 1–71. Springer-Verlag, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. J. Gibbons. Functional programming for domain-specific languages. In Central European Functional Programming School, volume 8606 of Lecture Notes in Computer Science, pages 1–28. Springer-Verlag, 2015.Google ScholarGoogle Scholar
  12. H. Grohne, A. Löh, and J. Voigtländer. Formalizing semantic bidirectionalization with dependent types. In International Workshop on Bidirectional Transformations, pages 75–81. CEUR-WS, 2014.Google ScholarGoogle Scholar
  13. S. Hidaka, Z. Hu, K. Inaba, H. Kato, K. Matsuda, and K. Nakano. Bidirectionalizing graph transformations. In International Conference on Functional Programming, pages 205–216. ACM, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. M. Hofmann, B. C. Pierce, and D. Wagner. Symmetric lenses. In Principles of Programming Languages, pages 371–384. ACM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. M. Hofmann, B. C. Pierce, and D. Wagner. Edit lenses. In Principles of Programming Languages, pages 495–508. ACM, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Z. Hu, H. Pacheco, and S. Fischer. Validity checking of putback transformations in bidirectional programming. In International Symposium on Formal Methods, volume 8442, pages 1–15. Springer-Verlag, 2014.Google ScholarGoogle Scholar
  17. S. Lindley and C. McBride. Hasochism: the pleasure and pain of dependently typed Haskell programming. In Haskell Symposium, pages 81–92. ACM, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. K. Matsuda, Z. Hu, K. Nakano, M. Hamana, and M. Takeichi. Bidirectionalization transformation based on automatic derivation of view complement functions. In International Conference on Functional Programming, pages 47–58. ACM, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. E. Moggi. Notions of computation and monads. Information and Computation, 93(1):55–92, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. U. Norell. Towards a Practical Programming Language based on Dependent Type Theory. PhD thesis, Chalmers University of Technology, 2007.Google ScholarGoogle Scholar
  21. U. Norell. Dependently typed programming in Agda. In Advanced Functional Programming, volume 5832 of Lecture Notes in Computer Science, pages 230–266. Springer-Verlag, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. U. Norell. Interactive programming with dependent types. In International Conference on Functional Programming, pages 1–2. ACM, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. H. Pacheco and A. Cunha. Generic point-free lenses. In Mathematics of Program Construction, volume 6120 of Lecture Notes in Computer Science, pages 331–352. Springer-Verlag, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. H. Pacheco, Z. Hu, and S. Fischer. Monadic combinators for “putback” style bidirectional programming. In Partial Evaluation and Program Manipulation, pages 39–50. ACM, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. H. Pacheco, T. Zan, and Z. Hu. BiFluX: a bidirectional functional update language for XML. In Principles and Practice of Declarative Programming, pages 147–158. ACM, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. J. Voigtländer. Bidirectionalization for free! In Principles of Programming Languages, pages 165–176. ACM, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. P. Wadler. The essence of functional programming. In Principles of Programming Languages, pages 1–14. ACM, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Z. Zhu, H.-S. Ko, P. Martins, J. Saraiva, and Z. Hu. BiYacc: roll your parser and reflective printer into one. In International Workshop on Bidirectional Transformations, pages 43–50. CEUR-WS, 2015.Google ScholarGoogle Scholar

Index Terms

  1. BiGUL: a formally verified core language for putback-based bidirectional programming

    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
      PEPM '16: Proceedings of the 2016 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation
      January 2016
      108 pages
      ISBN:9781450340977
      DOI:10.1145/2847538

      Copyright © 2016 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 11 January 2016

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate66of120submissions,55%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader