skip to main content
research-article
Open Access
Artifacts Available / v1.1

Bidirectional Object-Oriented Programming: Towards Programmatic and Direct Manipulation of Objects

Published:06 April 2023Publication History
Skip Abstract Section

Abstract

Many bidirectional programming languages, which are mainly functional and relational, have been designed to support writing programs that run in both forward and backward directions. Nevertheless, there is little study on the bidirectionalization of object-oriented languages that are more popular in practice. This paper presents the first bidirectional object-oriented language that supports programmatic and direct manipulation of objects. Specifically, we carefully extend a core object-oriented language, which has a standard forward evaluation semantics, with backward updating semantics for class inheritance hierarchies and references. We formally prove that the bidirectional evaluation semantics satisfies the round-tripping properties if the output is altered consistently. To validate the utility of our approach, we have developed a tool called BiOOP for generating HTML documents through bidirectional GUI design. We evaluate the expressiveness and effectiveness of BiOOP for HTML webpage development by reproducing ten classic object-oriented applications from a Java Swing tutorial and one large project from GitHub. The experimental results show the response time of direct manipulation programming on object-oriented programs that produce HTML webpages is acceptable for developers.

References

  1. Gideon Avrahami, Kenneth P. Brooks, and Marc H. Brown. 1989. A Two-View Approach to Constructing User Interfaces. SIGGRAPH Comput. Graph., 23, 3 (1989), jul, 137–146. issn:0097-8930 https://doi.org/10.1145/74334.74347 Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Davi M.J. Barbosa, Julien Cretin, Nate Foster, Michael Greenberg, and Benjamin C. Pierce. 2010. Matching Lenses: Alignment and View Update. In Proceedings of the 15th ACM SIGPLAN International Conference on Functional Programming (ICFP ’10). Association for Computing Machinery, New York, NY, USA. 193–204. isbn:9781605587943 https://doi.org/10.1145/1863543.1863572 Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Aaron Bohannon, J. Nathan Foster, Benjamin C. Pierce, Alexandre Pilkiewicz, and Alan Schmitt. 2008. Boomerang: Resourceful Lenses for String Data. In Proceedings of the 35th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’08). Association for Computing Machinery, New York, NY, USA. 407–419. isbn:9781595936899 https://doi.org/10.1145/1328438.1328487 Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Aaron Bohannon, Benjamin C. Pierce, and Jeffrey A. Vaughan. 2006. 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). Association for Computing Machinery, New York, NY, USA. 338–347. isbn:1595933182 https://doi.org/10.1145/1142351.1142399 Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Ravi Chugh. 2016. Prodirect Manipulation: Bidirectional Programming for the Masses. ICSE ’16. Association for Computing Machinery, New York, NY, USA. 781–784. isbn:9781450342056 https://doi.org/10.1145/2889160.2889210 Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Ravi Chugh, Brian Hempel, Mitchell Spradlin, and Jacob Albers. 2016. Programmatic and direct manipulation, together at last. Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, Jun, https://doi.org/10.1145/2908080.2908103 Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Robert Eckstein, Marc Loy, and Dave Wood. 1998. Java Swing. O’Reilly & Associates, Inc., USA. isbn:156592455X Google ScholarGoogle Scholar
  8. J. Nathan Foster, Michael B. Greenwald, Jonathan T. Moore, Benjamin C. Pierce, and Alan Schmitt. 2007. Combinators for Bidirectional Tree Transformations: A Linguistic Approach to the View-Update Problem. 29, 3 (2007), may, 17–es. issn:0164-0925 https://doi.org/10.1145/1232420.1232424 Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Nate Foster, Kazutaka Matsuda, and Janis Voigtländer. 2012. Three Complementary Approaches to Bidirectional Programming. Springer Berlin Heidelberg, Berlin, Heidelberg. 1–46. isbn:978-3-642-32202-0 https://doi.org/10.1007/978-3-642-32202-0_1 Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Ben Fry, Casey Reas, Andres Colubri, Elie Zananiri, Samuel Pottinger, and Dan Shiffman. 2001. Processing. https://processing.org/ Google ScholarGoogle Scholar
  11. Koumei Fukahori, Daisuke Sakamoto, Jun Kato, and Takeo Igarashi. 2014. CapStudio: An Interactive Screencast for Visual Application Development. Conference on Human Factors in Computing Systems - Proceedings, isbn:978-1-4503-2474-8 https://doi.org/10.1145/2559206.2581138 Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Xiao He and Zhenjiang Hu. 2018. Putback-Based Bidirectional Model Transformations. In Proceedings of the 2018 26th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE 2018). Association for Computing Machinery, New York, NY, USA. 434–444. isbn:9781450355735 https://doi.org/10.1145/3236024.3236070 Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Xiao He, Zhenjiang Hu, and Na Meng. 2022. A theoretic framework of bidirectional transformation between systems and models. Sci China Inf Sci, 65, 202103 (2022), https://doi.org/10.1007/s11432-020-3276-5 Google ScholarGoogle ScholarCross RefCross Ref
  14. Brian Hempel and Ravi Chugh. 2016. Semi-Automated SVG Programming via Direct Manipulation. Proceedings of the 29th Annual Symposium on User Interface Software and Technology, Oct, https://doi.org/10.1145/2984511.2984575 Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Brian Hempel, Justin Lubin, and Ravi Chugh. 2019. Sketch-n-Sketch: Output-Directed Programming for SVG. In Proceedings of the 32nd Annual ACM Symposium on User Interface Software and Technology (UIST ’19). Association for Computing Machinery, New York, NY, USA. 281–292. isbn:9781450368162 https://doi.org/10.1145/3332165.3347925 Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Miško Hevery and Adam Abrons. 2010. Angular. https://angular.io/ Google ScholarGoogle Scholar
  17. Soichiro Hidaka, Zhenjiang Hu, Kazuhiro Inaba, Hiroyuki Kato, Kazutaka Matsuda, and Keisuke Nakano. 2010. Bidirectionalizing Graph Transformations. Sigplan Notices - SIGPLAN, 45, 205–216. https://doi.org/10.1145/1932681.1863573 Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Zhenjiang Hu, Shin-Cheng Mu, and Masato Takeichi. 2004. A Programmable Editor for Developing Structured Documents Based on Bidirectional Transformations. PEPM ’04. Association for Computing Machinery, New York, NY, USA. 178–189. isbn:1581138350 https://doi.org/10.1145/1014007.1014025 Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. JFormDesigner. 2003. Eclipse, IntelliJ IDEA, NetBeans and JDeveloper. https://www.formdev.com/jformdesigner/ Google ScholarGoogle Scholar
  20. Shinya Kawanaka and Haruo Hosoya. 2006. BiXid: A Bidirectional Transformation Language for XML. SIGPLAN Not., 41, 9 (2006), sep, 201–214. issn:0362-1340 https://doi.org/10.1145/1160074.1159830 Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. John Maloney. 1995. Morphic: The Self User Interface Framework. Mountain View, CA 94043 USA. https://ftp.squeak.org/docs/Self-4.0-UI-Framework.pdf Google ScholarGoogle Scholar
  22. Mikaël Mayer, Viktor Kuncak, and Ravi Chugh. 2018. Bidirectional Evaluation with Direct Manipulation. Proc. ACM Program. Lang., 2, OOPSLA (2018), Article 127, oct, 28 pages. https://doi.org/10.1145/3276497 Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Keisuke Nakano, Zhenjiang Hu, and Masato Takeichi. 2008. Consistent Web site updating based on bidirectional transformation. In 2008 10th International Symposium on Web Site Evolution. 45–54. https://doi.org/10.1109/WSE.2008.4655395 Google ScholarGoogle ScholarCross RefCross Ref
  24. Haavard Nord and Eirik Chambe-Eng. 1995. Qt Creator. https://www.qt.io/product/development-tools Google ScholarGoogle Scholar
  25. Benjamin C. Pierce. 2002. Types and Programming Languages (1st ed.). The MIT Press. isbn:0262162091 Google ScholarGoogle Scholar
  26. Raghu Rajkumar, Nate Foster, Sam Lindley, and James Cheney. 2014. Lenses for Web Data. 01, https://doi.org/10.14279/tuj.eceasst.57.879.869 Google ScholarGoogle ScholarCross RefCross Ref
  27. David Ungar and Randall B. Smith. 1987. Self: The Power of Simplicity. In Conference Proceedings on Object-Oriented Programming Systems, Languages and Applications (OOPSLA ’87). Association for Computing Machinery, New York, NY, USA. 227–242. isbn:0897912470 https://doi.org/10.1145/38765.38828 Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Visualiser. 2004. Eclipse. http://www.eclipse.org/ajdt/visualiser/ Google ScholarGoogle Scholar
  29. Evan You. 2014. Vue.js. https://vuejs.org/ Google ScholarGoogle Scholar
  30. Xing Zhang, Guanchen Guo, Xiao He, and Zhenjiang Hu. 2023. Bidirectional Object-Oriented Programming: Towards Programmatic and Direct Manipulation of Objects(Artifact). https://doi.org/10.5281/zenodo.7698353 Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Bidirectional Object-Oriented Programming: Towards Programmatic and Direct Manipulation of Objects

    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

    Full Access

    • Article Metrics

      • Downloads (Last 12 months)143
      • Downloads (Last 6 weeks)58

      Other Metrics

    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!