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.
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Robert Eckstein, Marc Loy, and Dave Wood. 1998. Java Swing. O’Reilly & Associates, Inc., USA. isbn:156592455X
Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Ben Fry, Casey Reas, Andres Colubri, Elie Zananiri, Samuel Pottinger, and Dan Shiffman. 2001. Processing. https://processing.org/
Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Miško Hevery and Adam Abrons. 2010. Angular. https://angular.io/
Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- JFormDesigner. 2003. Eclipse, IntelliJ IDEA, NetBeans and JDeveloper. https://www.formdev.com/jformdesigner/
Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- Haavard Nord and Eirik Chambe-Eng. 1995. Qt Creator. https://www.qt.io/product/development-tools
Google Scholar
- Benjamin C. Pierce. 2002. Types and Programming Languages (1st ed.). The MIT Press. isbn:0262162091
Google Scholar
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- Visualiser. 2004. Eclipse. http://www.eclipse.org/ajdt/visualiser/
Google Scholar
- Evan You. 2014. Vue.js. https://vuejs.org/
Google Scholar
- 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 Scholar
Digital Library
Index Terms
Bidirectional Object-Oriented Programming: Towards Programmatic and Direct Manipulation of Objects
Recommendations
What Is Object-Oriented Programming?
The meaning of the term 'object oriented' is examined in the context of the general-purpose programming language C++. This choice is made partly to introduce C++ and partly because C++ is one of the few languages that supports data abstraction, object-...
A Domain-Theoretic Model Of Nominally-Typed Object-Oriented Programming
The majority of contemporary mainstream object-oriented (OO) software is written using nominally-typed OO programming languages. Extant domain-theoretic models of OOP developed to analyze OO type systems miss crucial features of these mainstream OO ...
Object-Oriented MPI (OOMPI): A Class Library for the Message Passing Interface
MPIDC '96: Proceedings of the Second MPI Developers ConferenceAbstract: Using the Message Passing Interface (MPI) in C++ has been difficult up to this point, because of the lack of suitable C++ bindings and C++ class libraries. The existing MPI standard provides language bindings only for C and Fortran 77, ...






Comments