[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
research-article
Open access

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

Published: 06 April 2023 Publication History

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
[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
[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
[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
[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
[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
[7]
Robert Eckstein, Marc Loy, and Dave Wood. 1998. Java Swing. O’Reilly & Associates, Inc., USA. isbn:156592455X
[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
[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
[10]
Ben Fry, Casey Reas, Andres Colubri, Elie Zananiri, Samuel Pottinger, and Dan Shiffman. 2001. Processing. https://processing.org/
[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
[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
[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
[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
[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
[16]
Miško Hevery and Adam Abrons. 2010. Angular. https://angular.io/
[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
[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
[19]
JFormDesigner. 2003. Eclipse, IntelliJ IDEA, NetBeans and JDeveloper. https://www.formdev.com/jformdesigner/
[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
[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
[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
[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
[24]
Haavard Nord and Eirik Chambe-Eng. 1995. Qt Creator. https://www.qt.io/product/development-tools
[25]
Benjamin C. Pierce. 2002. Types and Programming Languages (1st ed.). The MIT Press. isbn:0262162091
[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
[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
[28]
Visualiser. 2004. Eclipse. http://www.eclipse.org/ajdt/visualiser/
[29]
Evan You. 2014. Vue.js. https://vuejs.org/
[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

Cited By

View all
  • (2024)Fusing Direct Manipulations into Functional ProgramsProceedings of the ACM on Programming Languages10.1145/36328838:POPL(1211-1238)Online publication date: 5-Jan-2024
  • (2024)BIT: A template-based approach to incremental and bidirectional model-to-text transformationJournal of Systems and Software10.1016/j.jss.2024.112148216(112148)Online publication date: Oct-2024

Index Terms

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

    Recommendations

    Comments

    Please enable JavaScript to view thecomments powered by Disqus.

    Information & Contributors

    Information

    Published In

    cover image Proceedings of the ACM on Programming Languages
    Proceedings of the ACM on Programming Languages  Volume 7, Issue OOPSLA1
    April 2023
    901 pages
    EISSN:2475-1421
    DOI:10.1145/3554309
    Issue’s Table of Contents
    This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 06 April 2023
    Published in PACMPL Volume 7, Issue OOPSLA1

    Permissions

    Request permissions for this article.

    Check for updates

    Badges

    Author Tags

    1. Bidirectional Transformation
    2. Direct Manipulation
    3. Language Design and Implementation
    4. Object-Oriented Programming

    Qualifiers

    • Research-article

    Funding Sources

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)368
    • Downloads (Last 6 weeks)44
    Reflects downloads up to 17 Dec 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)Fusing Direct Manipulations into Functional ProgramsProceedings of the ACM on Programming Languages10.1145/36328838:POPL(1211-1238)Online publication date: 5-Jan-2024
    • (2024)BIT: A template-based approach to incremental and bidirectional model-to-text transformationJournal of Systems and Software10.1016/j.jss.2024.112148216(112148)Online publication date: Oct-2024

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Login options

    Full Access

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media