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.
- Generalized algebraic data types, Dec 2014. URL https://www.haskell.org/ghc/docs/6.6/html/users_guide/gadt.html.Google Scholar
- Monad transformers, Dec 2014. URL http://book.realworldhaskell.org/read/monad-transformers.html.Google Scholar
- The data.typeable package, Dec 2014. URL http://hackage.haskell.org/package/base-4.7.0.1/docs/Data-Typeable.html.Google Scholar
- The state monad, Dec 2014. URL https://www.haskell.org/haskellwiki/State_Monad.Google Scholar
- The writer monad, Dec 2014. URL https://hackage.haskell.org/package/mtl-2.0.1.0/docs/Control-Monad-Writer-Lazy.html.Google Scholar
- F. Bancilhon and N. Spyratos. Update semantics of relational views. ACM Trans. Database Syst., 6(4):557--575, Dec. 1981. ISSN 0362-5915. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- C. Elliott and P. Hudak. Functional reactive animation. In International Conference on Functional Programming, 1997. URL http://conal.net/papers/icfp97/. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- E. Kmett. The lens package, Dec 2014. URL https://hackage.haskell.org/package/lens.Google Scholar
- 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 ScholarDigital Library
- 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 Scholar
- B. Lykah. Groundhog, Dec 2014. URL http://hackage.haskell.org/package/groundhog.Google Scholar
- I. Maier. Reactive lenses. Oct 2013. URL http://soft.vub.ac.be/REM13/papers/rem20130_submission_10.pdf.Google Scholar
- I. Maier and M. Odersky. Deprecating the Observer Pattern with Scala.react. Technical report, 2012.Google Scholar
- 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 Scholar
- C. Mcbride and R. Paterson. Applicative programming with effects. J. Funct. Program., 18(1):1--13, Jan. 2008. ISSN 0956-7968. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- TIBCO. TIB/Rendezvous. White paper, TIBCO, Palo Alto, CA, 1999.Google Scholar
- T. van Laarhoven. Cps based functional references, July 19 2009. URL http://www.twanvl.nl/blog/haskell/cps-functional-references.Google Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
Index Terms
- Parametric lenses: change notification for bidirectional lenses
Recommendations
Combinators for bi-directional tree transformations: a linguistic approach to the view update problem
Proceedings of the 32nd ACM SIGPLAN-SIGACT symposium on Principles of programming languagesWe propose a novel approach to the well-known view update problem for the case of tree-structured data: a domain-specific programming language in which all expressions denote bi-directional transformations on trees. In one direction, these ...
POPL 2005: Combinators for Bi-Directional Tree Transformations: Linguistic Approach to the View Update Problem
Supplemental issueWe propose a novel approach to the well-known view update problem for the case of tree-structured data: a domainspecific\ programming language in which all expressions denote bi-directional transformations on trees. In one direction, these ...
Quotient lenses
ICFP '08: Proceedings of the 13th ACM SIGPLAN international conference on Functional programmingThere are now a number of BIDIRECTIONAL PROGRAMMING LANGUAGES, where every program can be read both as a forward transformation mapping one data structure to another and as a reverse transformation mapping an edited output back to a correspondingly ...
Comments