skip to main content
10.1145/2746325.2746333acmotherconferencesArticle/Chapter ViewAbstractPublication PagesiflConference Proceedingsconference-collections
research-article

Parametric lenses: change notification for bidirectional lenses

Authors Info & Claims
Published:01 October 2014Publication History

ABSTRACT

Most complex applications inevitably need to maintain dependencies between subsystems based on some shared data. The dependent parts must be informed that the shared information is changed. As every actual notification has some communication cost, and every triggered task has associated computation cost, it is crucial for the overall performance of the application to reduce the number of notifications as much as possible. To achieve this, one must be able to define, with arbitrary precision, which party is depending on which data. In this paper we offer a general solution to this general problem. The solution is based on an extension to bidirectional lenses, called parametric lenses. With the help of parametric lenses one can define compositional parametric views in a declarative way to access some shared data. Parametric views, besides providing read/write access to the shared data, also enable to observe changes of some parts, given by an explicit parameter, the focus domain. The focus domain can be specified as a type-based query language defined over one or more resources using predefined combinators of parametric views.

References

  1. Generalized algebraic data types, Dec 2014. URL https://www.haskell.org/ghc/docs/6.6/html/users_guide/gadt.html.Google ScholarGoogle Scholar
  2. Monad transformers, Dec 2014. URL http://book.realworldhaskell.org/read/monad-transformers.html.Google ScholarGoogle Scholar
  3. The data.typeable package, Dec 2014. URL http://hackage.haskell.org/package/base-4.7.0.1/docs/Data-Typeable.html.Google ScholarGoogle Scholar
  4. The state monad, Dec 2014. URL https://www.haskell.org/haskellwiki/State_Monad.Google ScholarGoogle Scholar
  5. The writer monad, Dec 2014. URL https://hackage.haskell.org/package/mtl-2.0.1.0/docs/Control-Monad-Writer-Lazy.html.Google ScholarGoogle Scholar
  6. F. Bancilhon and N. Spyratos. Update semantics of relational views. ACM Trans. Database Syst., 6(4):557--575, Dec. 1981. ISSN 0362-5915. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. D. M. Barbosa, J. Cretin, N. Foster, M. Greenberg, and B. C. Pierce. Matching lenses: Alignment and view update. In Proceedings of the 15th ACM SIGPLAN International Conference on Functional Programming, ICFP '10, pages 193--204, 2010. ISBN 978-1-60558-794-3. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. A. Bohannon, B. C. Pierce, and J. A. Vaughan. Relational lenses: A language for updatable views. In Proceedings of the Twenty-fifth ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems, PODS '06, pages 338--347, 2006. ISBN 1-59593-318-2. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. C. Elliott and P. Hudak. Functional reactive animation. In International Conference on Functional Programming, 1997. URL http://conal.net/papers/icfp97/. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. P. T. Eugster, R. Guerraoui, and C. H. Damm. On objects and events. SIGPLAN Not., 36(11):254--269, Oct. 2001. ISSN 0362-1340. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. P. T. Eugster, P. A. Felber, R. Guerraoui, and A.-M. Kermarrec. The many faces of publish/subscribe. ACM Computing Surveys, 35(2): 114--131, June 2003. ISSN 0360-0300. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 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 TPL, 29(3), May 2007. ISSN 0164-0925. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. J. N. Foster, A. Pilkiewicz, and B. C. Pierce. Quotient lenses. In Proceedings of the 13th ACM SIGPLAN International Conference on Functional Programming, ICFP '08, pages 383--396, 2008. ISBN 978-1-59593-919-7. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. J. N. Foster, B. C. Pierce, and S. Zdancewic. Updatable security views. In Proceedings of the 22nd IEEE Computer Security Foundations Symposium, CSF 2009, Port Jefferson, New York, USA, July 8--10, 2009, pages 60--74, 2009. . URL http://doi.ieeecomputersociety.org/10.1109/CSF.2009.25. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns: Elements of Reusable Object-oriented Software. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1995. ISBN 0-201-63361-2. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. G. Gottlob, P. Paolini, and R. Zicari. Properties and update semantics of consistent views. ACM Trans. Database Syst., 13(4):486--524, Oct. 1988. ISSN 0362-5915. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. M. Hofmann, B. Pierce, and D. Wagner. Symmetric lenses. In Proceedings of the 38th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL '11, pages 371--384, 2011. ISBN 978-1-4503-0490-0. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. M. Hofmann, B. Pierce, and D. Wagner. Edit lenses. In Proceedings of the 39th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL '12, pages 495--508, 2012. ISBN 978-1-4503-1083-3. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. M. P. Jones. Functional programming with overloading and higher-order polymorphism. In Advanced Functional Programming, First International Spring School on Advanced Functional Programming Techniques-Tutorial Text, pages 97--136, London, UK, UK, 1995. Springer-Verlag. ISBN 3-540-59451-5. URL http://dl.acm.org/citation.cfm?id=647698.734150. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. E. Kmett. The lens package, Dec 2014. URL https://hackage.haskell.org/package/lens.Google ScholarGoogle Scholar
  21. H. T. Kung and J. T. Robinson. On optimistic methods for concurrency control. ACM Trans. Database Syst., 6(2):213--226, June 1981. ISSN 0362-5915. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. B. Lijnse, J. Jansen, R. Nanne, and R. Plasmeijer. Capturing the netherlands coast guard's sar workflow with itasks. In D. Mendonca and J. Dugdale, editors, Proceedings of the 8th'11, Lisbon, Portugal, May 2011.Google ScholarGoogle Scholar
  23. B. Lykah. Groundhog, Dec 2014. URL http://hackage.haskell.org/package/groundhog.Google ScholarGoogle Scholar
  24. I. Maier. Reactive lenses. Oct 2013. URL http://soft.vub.ac.be/REM13/papers/rem20130_submission_10.pdf.Google ScholarGoogle Scholar
  25. I. Maier and M. Odersky. Deprecating the Observer Pattern with Scala.react. Technical report, 2012.Google ScholarGoogle Scholar
  26. S. Marlow and S. Peyton Jones. The Glasgow Haskell Compiler. In The Architecture of Open Source Applications, Volume 2. Lulu, 2012. URL http://www.aosabook.org/en/ghc.html.Google ScholarGoogle Scholar
  27. C. Mcbride and R. Paterson. Applicative programming with effects. J. Funct. Program., 18(1):1--13, Jan. 2008. ISSN 0956-7968. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. L. Meyerovich, A. Guha, J. Baskin, G. H. Cooper, M. Greenberg, A. Bromfield, and S. Krishnamurthi. Flapjax: A programming language for ajax applications. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA) 2009, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. I. S. Microsystems. Java message service, version 1.0.2 (jms specification). Technical report, Sun Microsystems, Inc., 1998. URL http://java.sun.com/products/jms.Google ScholarGoogle Scholar
  30. S. L. Peyton Jones. The Implementation of Functional Programming Languages (Prentice-Hall International Series in Computer Science). Prentice-Hall, Inc., Upper Saddle River, NJ, USA, 1987. ISBN 013453333X. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. R. Plasmeijer, B. Lijnse, S. Michels, P. Achten, and P. Koopman. Task-oriented programming in a pure functional language. In Proceedings of the 14th Symposium on Principles and Practice of Declarative Programming, PPDP '12, pages 195--206, 2012. ISBN 978-1-4503-1522-7. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. TIBCO. TIB/Rendezvous. White paper, TIBCO, Palo Alto, CA, 1999.Google ScholarGoogle Scholar
  33. T. van Laarhoven. Cps based functional references, July 19 2009. URL http://www.twanvl.nl/blog/haskell/cps-functional-references.Google ScholarGoogle Scholar
  34. P. Wadler. Monads for functional programming. In Advanced Functional Programming, First International Spring School on Advanced Functional Programming Techniques-Tutorial Text, pages 24--52, 1995. ISBN 3-540-59451-5. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. M. Wang, J. Gibbons, and N. Wu. Incremental updates for efficient bidirectional transformations. In Proceedings of the 16th ACM SIGPLAN International Conference on Functional Programming, ICFP '11, pages 392--403, 2011. ISBN 978-1-4503-0865-6. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Parametric lenses: change notification for bidirectional lenses

    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 Other conferences
      IFL '14: Proceedings of the 26nd 2014 International Symposium on Implementation and Application of Functional Languages
      October 2014
      124 pages
      ISBN:9781450332842
      DOI:10.1145/2746325

      Copyright © 2014 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 ACM 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: 1 October 2014

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article
      • Research
      • Refereed limited

      Acceptance Rates

      IFL '14 Paper Acceptance Rate10of20submissions,50%Overall Acceptance Rate19of36submissions,53%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader