skip to main content
10.1145/3510003.3510195acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

Towards bidirectional live programming for incomplete programs

Published: 05 July 2022 Publication History

Abstract

Bidirectional live programming not only allows software developers to see continuous feedback on the output as they write the program, but also allows them to modify the program by directly manipulating the output, so that the modified program can get the output that was directly manipulated. Despite the appealing of existing bidirectional live programming systems, there is a big limitation: they cannot deal with incomplete programs where code blanks exist in the source programs.
In this paper, we propose a framework to support bidirectional live programming for incomplete programs, by extending the output value structure, introducing hole binding, and formally defining bidirectional evaluators that are well-behaved. To illustrate the usefulness of the framework, we realize the core bidirectional evaluations of incomplete programs in a tool called Bidirectional Preview. Our experimental results show that our extended backward evaluation for incomplete programs is as efficient as that for complete programs in that it is only 21ms slower on a program with 10 holes than that on its full program, and our extended forward evaluation makes no difference. Furthermore, we use quick sort and student grades, two nontrivial examples of incomplete programs, to demonstrate its usefulness in algorithm teaching and program debugging.

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 (July 1989), 137--146.
[2]
Sebastian Burckhardt, Manuel Fahndrich, Peli de Halleux, Sean McDirmid, Michal Moskal, Nikolai Tillmann, and Jun Kato. 2013. It's Alive! Continuous Feedback in UI Programming. SIGPLAN Not. 48, 6 (June 2013), 95--104.
[3]
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 2016).
[4]
Krzysztof Czarnecki, J. Nathan Foster, Zhenjiang Hu, Ralf Lämmel, Andy Schürr, and James F. Terwilliger. 2009. Bidirectional Transformations: A Cross-Discipline Perspective. In Theory and Practice of Model Transformations, Richard F. Paige (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg, 260--283.
[5]
Maarten Faddegon and Olaf Chitil. 2015. Algorithmic Debugging of Real-World Haskell Programs: Deriving Dependencies from the Cost Centre Stack. SIGPLAN Not. 50, 6 (June 2015), 33--42.
[6]
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. ACM Trans. Program. Lang. Syst. 29, 3 (May 2007), 17--es.
[7]
Koumei Fukahori, Daisuke Sakamoto, Jun Kato, and Takeo Igarashi. 2014. Cap-Studio: An Interactive Screencast for Visual Application Development. In CHI '14 Extended Abstracts on Human Factors in Computing Systems (Toronto, Ontario, Canada) (CHI EA '14). Association for Computing Machinery, New York, NY, USA, 1453--1458.
[8]
Alex Groce, Mohammad Amin Alipour, Chaoqiang Zhang, Yang Chen, and John Regehr. 2016. Cause reduction: delta debugging, even without bugs. Softw. Test. Verification Reliab. 26, 1 (2016), 40--68.
[9]
K. kwok and G. Webster. 2016. Carbide Alpha. https://alpha.trycarbide.com/
[10]
Justin Lubin, Nick Collins, Cyrus Omar, and Ravi Chugh. 2020. Program sketching with live bidirectional evaluation. Proceedings of the ACM on Programming Languages 4, ICFP (Aug 2020), 1--29.
[11]
Mikaël Mayer, Viktor Kuncak, and Ravi Chugh. 2018. Bidirectional evaluation with direct manipulation. Proceedings of the ACM on Programming Languages 2, OOPSLA (Oct 2018), 1--28.
[12]
Keisuke Nakano. 2019. Towards a Complete Picture of Lens Laws. arXiv:1910.10421 [cs.PL]
[13]
Cyrus Omar, David Moon, Andrew Blinn, Ian Voysey, Nick Collins, and Ravi Chugh. 2021. Filling Typed Holes with Live GUIs (PLDI 2021). Association for Computing Machinery, New York, NY, USA, 511--525.
[14]
Cyrus Omar, Ian Voysey, Ravi Chugh, and Matthew A. Hammer. 2018. Live Functional Programming with Typed Holes. arXiv:1805.00155 [cs.PL]
[15]
Armando Solar-Lezama. 2013. Program Sketching. Int. J. Softw. Tools Technol. Transf. 15, 5--6 (Oct. 2013), 475--495.
[16]
Xiaoyin Wang, Lu Zhang, Tao Xie, Yingfei Xiong, and Hong Mei. 2012. Automating Presentation Changes in Dynamic Web Applications via Collaborative Hybrid Analysis (FSE '12). Association for Computing Machinery, New York, NY, USA, Article 16, 11 pages.

Cited By

View all
  • (2025)Intentionally Fusing Direct Manipulations into SVG ProgramsInformation10.3390/info1603016916:3(169)Online publication date: 24-Feb-2025
  • (2024)KBX: Verified Model Synchronization via Formal Bidirectional TransformationACM Transactions on Software Engineering and Methodology10.1145/369600034:2(1-40)Online publication date: 13-Sep-2024
  • (2024)Partial Bidirectionalization of Model Transformation LanguagesProceedings of the ACM/IEEE 27th International Conference on Model Driven Engineering Languages and Systems10.1145/3640310.3674083(1-12)Online publication date: 22-Sep-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICSE '22: Proceedings of the 44th International Conference on Software Engineering
May 2022
2508 pages
ISBN:9781450392211
DOI:10.1145/3510003
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]

Sponsors

In-Cooperation

  • IEEE CS

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 05 July 2022

Permissions

Request permissions for this article.

Check for updates

Badges

Author Tags

  1. bidirectional evaluation
  2. direct manipulation
  3. hole bindings
  4. hole closures
  5. live programming

Qualifiers

  • Research-article

Conference

ICSE '22
Sponsor:

Acceptance Rates

Overall Acceptance Rate 276 of 1,856 submissions, 15%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)44
  • Downloads (Last 6 weeks)3
Reflects downloads up to 02 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2025)Intentionally Fusing Direct Manipulations into SVG ProgramsInformation10.3390/info1603016916:3(169)Online publication date: 24-Feb-2025
  • (2024)KBX: Verified Model Synchronization via Formal Bidirectional TransformationACM Transactions on Software Engineering and Methodology10.1145/369600034:2(1-40)Online publication date: 13-Sep-2024
  • (2024)Partial Bidirectionalization of Model Transformation LanguagesProceedings of the ACM/IEEE 27th International Conference on Model Driven Engineering Languages and Systems10.1145/3640310.3674083(1-12)Online publication date: 22-Sep-2024
  • (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)BITJournal of Systems and Software10.1016/j.jss.2024.112148216:COnline publication date: 1-Oct-2024

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media