Content area
Bidirectional live programming is a programming paradigm that enhances the developer experience by allowing direct modifications to the output, with changes instantly reflected back to the source program. Existing operation-based approaches allow modifying the constant values and expressions of programs, while they lack control over modifications originating from multiple updatable locations. To control the updatability of the source program, our approach introduces non-updatable expressions, which guide the fusion of updates to the intended locations. The correctness properties,
Full text
1. Introduction
Programming can be mentally taxing as it requires us to envision the execution of code during the editing process. Live programming [1,2,3], however, alleviates this strain by continuously re-executing the program during the editing phase, thereby establishing a seamless feedback loop between the programmer and the program. Bidirectional live programming [4] further enhances the developer’s experience by providing a distinctive feature, known as direct manipulations [5], which allows for direct modifications to the output. These changes are instantaneously reflected back to the source program, guaranteeing that the updated program can reproduce the manipulated output.
Sketch-n-Sketch [4,6,7,8] is a bidirectional live programming system that allows direct manipulation on the output, eventually causing the system to substitute old constants in the program with new ones.
The code in Figure 1 creates a rectangle with a width that is twice its height (expressed as
FuseDM [9] fuses direct manipulations into source program by propagating them to constants whenever possible. In order to satisfy the correctness that the execution of the updated program yields the same manipulated output, sometimes direct manipulations will be embedded into a “proper position”.
Figure 2 depicts the same rectangle. If the programmer stretches the rectangle horizontally, the expression
In general, we propose an approach that sits between Sketch-n-Sketch and FuseDM, which is capable of preserving the relationships between SVG elements during manipulation, while also facilitating program updates. These updates encompass more than just changes to constant values; they also involve modifications to expressions. We developed FuseSVG with the following features: (1) We introduce a
The program shown on the left of Figure 3 conveys the intent that the value of the height variable
FuseSVG builds upon our previous work, FuseDM [9], while FuseDM laid the foundation for bidirectional live programming with an operation-based approach for fusing updates into the source program, FuseSVG refines and enhances this framework by addressing key limitations identified during the development of FuseDM. Specifically, FuseSVG introduces improvements in the handling of update propagation, correctness in positioning updates, and user-intended relationships within the program. These extensions make FuseSVG a more robust and flexible approach, offering finer control over program updates while maintaining consistency.
In summary, our contributions are as follows:
We introduce a manipulation-directed programming approach where manipulations represent changes on the SVG. These changes are fused into programs to construct a desired program. Furthermore, a const marker is utilized to guide the propagation and fusion of the manipulation in the intended location.
We design both the forward evaluation and the backward fusion semantics to preserve manipulations. We have proven that the language semantics satisfy the G
et Put and WeakPut Get properties to guarantee correctness, thereby ensuing the validity of our approach.We have implemented a prototype, FuseSVG, that supports manipulation-directed programming for SVG. It has been tested with 14 nontrivial benchmark examples to demonstrate the effectiveness of our approach.
2. A Core Language DF
We initially describe the syntax of the core language DF, which stands for the functional language F with Deltas. The
2.1. Syntax of DF
In Figure 4, we outline the core functional language, DF, designed for crafting source programs. Basic expressions are composed of constants c, variables x, abstractions , and applications . It also includes binary expressions, case expressions, and , which is used to described recursive functions. Constructors include tuple constructions and list constructions . The
Constants encompass numbers n, Booleans b, strings s, and empty lists
A list of simple examples.
Suppose the programmer stretches the rectangle horizontally by 10; the program defined in Figure 3 will be updated to the following one.
Note that a program augmented with deltas acts as an intermediate representation, which is crucial to our approach and will be explained in detail later. Delta values can be seen as a form of lifting, where updates (represented as deltas) are encapsulated within a computational context and applied to the source program, similar to how applicative functors apply functions to wrapped values. Specifically, delta values are combined and propagated through program expressions, preserving the program’s original structure and intent, much like how applicative functors combine computations in a functional context. However, all deltas are ultimately eliminated in the final program. The resulting program derived from Example 2 is shown below:
2.2. Semantics of DF
This section describes the semantics of DF as shown in Figure 5. While most of the evaluation rules are quite straightforward, we only explain those rules that involve the delta or const marker. Evaluating a
The evaluation result of the program in Example 2 is as follows, where the width value is set to 200, augmented with a delta of :
2.3. Updatability of Expression
When an expression is marked with
As depicted in Figure 6, E signifies an environment for variables bound to their respective values, while represents a set containing variables bound to . For a given expression e, we infer it as to ascertain the updatability of the expression. Nearly every expression has two rules: one marked with
Given a lambda application, the environment E contains a variable y, and in the environment , the variable y is bound to , then the inferred result is .
Given a binary expression, the environment E contains variables x and y, and in the environment , the variable x is bound to , while the variable y is bound to . Even if the binary expression is marked by
3. A Direct Manipulation Language DM
We begin by introducing the syntax of the direct manipulation language DM, followed by a description of its semantics in detail.
3.1. Syntax of DM
The syntax of DM is outlined in Figure 7. The symbol is used to denote a delta, which is capable of expressing a variety of direct manipulations. It is important to note that the same notation is employed in Figure 4. In the core language, DF, the symbol signifies the basic deltas that can be incorporated into the source program. The identity delta,
The delta list constructor fabricates a list of deltas, , that operates on a list. The list deletion delta,
(Transforming a Rectangle into a Square). Consider a canvas with one rectangle, whose width is 200, and height is 100.
The operation to turn the rectangle into a square is written as follows: It first extracts the rectangle’s width using the selector and assigns it to the newly introduced variable w. Then, it modifies the rectangle’s h with w.
(Turn Two Rectangles Horizontally Attached). Consider a canvas with two rectangles spread horizontally, but not attached. The operation to direct the second rectangle to attach to the first rectangle horizontally is written as follows: It extracts the first rectangle’s x and width using the selector and , and assigns it to the newly introduced variables x and w, respectively. Then, it modifies the second rectangle’s x with .
3.2. Semantics of Language DM
The semantics of DM are defined in Figure 8. The judgment indicates that “applying a delta to the value v results in ”. The definition of values v, which includes constants with delta, tuples, and lists, is provided in Figure 4.
The D-Id rule asserts that the identity
The application rules for deletion, insertion, and modification apply to list values. The D-Ins-1 rule states that when applying to a list construction and n is larger than zero, is transformed by and becomes . The D-Ins-2 rule states that when n is zero, the computed value marked with delta
Consider a sequence of rectangles on the canvas. The following operation sets all the rectangles’ widths to 100. The command changes a specific rectangle’s width to 100. The
The operation below sets the first rectangle’s width to 20, the second rectangle’s width to 40, and so on. Initially, i is set to 1, and the variable is bound to 20. After one iteration, i is updated to 2, and the value of becomes 40.
4. Fusing Delta into the Program
We first introduce the well-behavedness properties, followed by an example to illustrate how fusion operates. Subsequently, we present the primary fusion algorithms that fuse delta into program. Particularly, when program expressions are marked with
4.1. Well-Behavedness
Our system incorporates a fundamental bidirectional transformation mechanism, which comprises the standard evaluation (get function) and the fusion (putback function). These components maintain consistency between source programs and their outputs by satisfying the G
(G
The G
(WeakP
The WeakP
If a program satisfies the G
We need to emphasize that we use the WeakP
4.2. Fusion Example
Figure 10a depicts the fusion of a delta , which adds 2 to the output of a program. The fusion involves a depth-first traversal of the program’s structure, as illustrated in Figure 10b (where let-bindings are represented as function applications). The green lines, labeled with numbers, indicate the path of the propagation. Once the timesExp node is reached, the traversal proceeds to the left branch, and the delta transforms into . Ultimately, the delta is fused with the constant value 1 at the node highlighted in yellow. The final program is shown in the bottom of Figure 10a.
If we carefully analyze the propagation steps, it becomes apparent that there are other reasonable points for updating, rather than solely the “deepest” one. For instance, consider updating function definitions of
4.3. Fusion Rules
Fusion rules are the core mechanisms that propagate deltas across the main program structure. The key idea is to propagate the delta back to variables or sub-expressions using variable bindings (environment). Given a delta , under value environment E, and Boolean environment , update expression e to , and update the value environment to . The fusion rules are depicted in Figure 12 and Figure 13.
-
Constants. There are two rules for constant values. If a constant value is marked by the
const keyword, it remains immutable (since the inference rule will always yield to true for a constant marked by theconst keyword, only is allowed). If the constant value c is not marked by theconst keyword, it can be updated to , as demonstrated in P-Con2. Note that we do not directly compute the result of applying to value c, but preserve the delta, which is important for proving the WeakPut Get law.
-
Variable Expressions. There are four rules for variable expressions based on whether the variable expression x is marked by the
const keyword and whether the bound value for the variable is modifiable. It is crucial to differentiate between the variable expression x and the variable binding for x. The first rule P-Var1 states that if the bound value for the variable is not modifiable and the variable expression is marked byconst , then only the delta is permitted. The second rule P-Var2 states that if the bound value for the variable is not modifiable, but the variable expression is modifiable, then modify the expression to . The third rule P-Var3 states that if the bound value for the variable is modifiable, and the variable expression is marked byconst , then the variable x in the environment E is bound to a new delta that composes with the original delta . The last rule P-Var4 states that if the bound value for the variable is modifiable, and the variable expression is not marked byconst , then despite the fact that updating the variable expression (as in P-Var2) or the variable binding (as in P-Var3) is reasonable, updating the variable, which yields a result identical to P-Var3, is the preferred approach. The last rule P-Var4 is the same as the P-Var defined in FuseDM [9].
-
Lambda Abstractions. The rule P-Lam1 states that, when applying the closure , the program becomes . Since the lambda abstraction is marked by the
const keyword, the body of the lambda abstraction (e) cannot be modified; only the bindings of the variables in the environment are updated. The lambda abstraction in P-Lam2 is not marked by theconst keyword, and the fusion can be decomposed into two updates: replacing the function body with and the environment with the updated one .
-
Function Applications. The rule P-App1 states that, if the inference result of the application is true, the application is not modifiable. The rule P-App2 states that, if the inference result of expression is true, then only can be updated. When fusing delta to , even though there exists a possibility to update x, the fusion algorithm will refrain from updating x. We first evaluate to a lambda closure, a tuple of an environment , and a lambda abstraction . For simplicity, we assume only variable patterns in the lambda abstraction. Under the binding of variable x to , which is computed from and environment , we update the expression and environment to and , respectively. And finally, we use the updated expression and environment to update expression to , and environment E to . The rule P-App3 is a bit complicated, since both and can be updated, thus they may encounter conflicts. A merge operation is defined for resolving conflicts. The intuitive idea is explained by the example “fusing into the program ” in Table 1.
The operator in Step 7 first merges variable bindings obtained from fusion of and , and then embeds inconsistent deltas into (resp. ) to obtain (resp. ), which is formally defined in Section 4.4. The final program is as follows, which evaluates to .
-
Case Expressions. The rule P-Case1 states that, if the inference result of the case expression is true, the expression is not modifiable. The rule P-Case2 states that, if the inference result of is true, then only the matched case branch expression is updated. The rule P-Case3 first applies the delta to the selected branch , resulting in the updated and . Then, it collects the delta from for , and subsequently fuses it into . Finally, the merge operator is used to resolve any conflicts.
-
Binary Expressions. The rule P-C-Oplus1 states that if a binary expression marked with
const is inferred as true, then the expression is not modifiable. The rule P-C-Oplus2 states that updating aconst marked binary expression is the same as updating the binary expression with each operand marked byconst . The rule P-Oplus1 states that if both and are inferred as true, then update the entire binary expression with . The rule P-Oplus2 states that if is inferred as true and is inferred as false, then update the right operand by a computed delta . The rule P-Oplus3 updates instead. The rule P-Oplus4 states that, if both and are inferred as false, then it chooses to update , but a merge operation is needed to resolve conflicts. How to apply deltas to binary expressions varies in different deployments; we give potential heuristic rule (P-Oplus4) for applying deltas to left operands. Other strategies include modifying the right operands, which can be achieved by marking the left operand withconst .
-
Tuples. The rule P-C-Tuple states that updating a
const marked tuple is the same as updating each element marked byconst . The rule P-Tuple states that one must update with and with . Since and may share variables, then a conflict-resolving operation is needed. The rule P-C-List (resp. P-List) is similar to the rule P-C-Tuple (resp. P-Tuple).
4.4. Merge Operation
Intuitively, the merge operator compares two structurally equivalent environments using the comparing operator and then embeds conflicting bindings into sub-expressions using the embedding operator ⊙. The merge operator and the comparing operator are the same as the definition in FuseDM, except the definition of embedding operator.
(Merge Operator). The merge operator reconciles conflicts of variable bindings as follows. holds if
(Comparing Operator). The comparing operator compares two environments and and returns the successfully merged part and two inconsistent parts ( and ).
(Embedding Operator). The embedding operator embeds deltas bound in the mapping around free variables in e, denoted by
where the “” operator replaces the free occurrences of the variable x in e with .The embedding operator introduces deltas at the variable expression x, by substituting x with to encapsulate the delta at the variable expression x. This approach differs from the mechanism employed in FuseDM [9]. However, when the program with deltas is evaluated to a program without deltas, the same embedding mechanism as described in FuseDM is utilized.
4.5. Well-Behavedness
The well-behavedness (Theorem 1) properties includes the G
By induction on the fusion derivation below, we show the P-Con2, P-Var3, and P-App3 three cases as representatives:
The P-Con2 case:
(a). According to P-Con2, the updated program is .
(b). By E-dv, .
(c). The delta is .
(d). By P-Con2, .
(e). Since is the same as , is the same as , which is the goal.
The P-Var3 case:
(a). According to P-Var3, the updated program is the same as the original one, but the environment changes, .
(b). By E-Const, and E-Var, .
(c). The delta is .
(d). By P-Var3, .
(e). Since is the same as , is the same as , which is the goal.
The P-App3 case:
(a). According to P-, .
(b). By the induction hypothesis, , , and .
(c). By Lemma 4, and .
(d). By (c) and Lemma 3, .
(e). By E-App, .
(f). By the induction hypothesis, , .
(g). According to definition, and , the updated program is , which is the goal.
(Equivalent Environment). and are equivalent (denoted ) if they are structurally equivalent and , , and .
If and , then .
(Merge Equivalency). If . implies .
Since Lemmas 3 and 4 are straightforward, we omit the details here.
5. Evaluation
The evaluation aims to analyze the expressiveness of the language to cover the scenario of SVG design. In addition, we present two typical benchmark examples in detail to show how an SVG graphic is constructed.
5.1. Expressiveness
FuseSVG introduces the
Based on our analysis of the 14 benchmark examples, all examples encounter the problem of selecting suitable sub-expressions for updating when fusing deltas into the program. All examples necessitate the setting of certain constant values as non-updatable. For example, in the Precision Floor Plan example, there are three relations: the y coordinate of the second rectangle is identical to that of the first rectangle; the x coordinate of the second rectangle should be the sum of the first rectangle’s x coordinate and its width w; and both rectangles share the same height h. Relation expressions are defined across all examples and can be viewed as an important property in SVG design, emphasizing the importance of defining the invariance of relations in the source program.
Now, let us perform a detailed comparison between FuseDM and FuseSVG using the Precision Floor Plan Example. Listings 1 and 2 show the actual code for FuseDM and FuseSVG, respectively, which generates the output SVG shown in Figure 14(1). From a code perspective, compared to FuseDM, FuseSVG introduces
| Listing 1. Precision Floor Plan Example in FuseDM. |
| |
| Listing 2. Precision Floor Plan Example in FuseSVG. |
| |
When generating the SVG, we have a specific intent: Suppose the left-hand rectangle is
Next, we perform three update operations on both FuseDM and FuseSVG, as shown in Figure 15. First, if we shrink
Similarly, if we shrink
Finally, when we move
In summary, FuseDM propagates updates to constants whenever possible while guaranteeing the PutGet property. However, this can sometimes lead to situations where relationships between elements are broken during updates, particularly when elements are interdependent or when updates occur in unintended locations. On the other hand, FuseSVG introduces more sophisticated mechanisms, such as using the
5.2. Case Study
Let us use two benchmark examples to show how an SVG graphic is constructed step-by-step.
Battery Example: Initially, the canvas is empty, and the program assigns an empty list (
Although we placed the second rectangle next to the first one, the generated code does not inherently reflect this intention. The x value of the second rectangle (
Balance Scale Example: Figure 17 outlines the steps to construct a balanced scale (for more details, please refer to the video at the provided URL
6. Related Work
6.1. Bidirectional Transformations
Bidirectional transformations [10] serve as a mechanism for maintaining consistency between a source and a corresponding view, which is derived from that source. The programming language community has conducted extensive research on bidirectional transformations [11,12,13]. Existing approaches to bidirectional transformations have primarily focused on transformations over a variety of structured data [14]. This includes lists [15], trees [11,16,17], graphs [18,19], and relational databases [20]. Matsuda et al. [21] proposed FliPpr, a system designed to derive parsers from pretty-printers. None of the existing approaches permit modifications to the transformation program itself. In other words, updates to the view must remain within the scope of the forward transformation. However, our work, FuseSVG, supports updating the program to a new one. Cheney et al. [22] discussed the principle of least change for bidirectional transformations. They posited that a bidirectional transformation should only make changes to the artifact that are strictly necessary, which is a principle that can guide the design of backward transformations, but it does not allow for the updating of the bidirectional program.
6.2. Ambiguity and Updatability
Sketch-n-Sketch [4] employs heuristics to resolve ambiguities and introduces an approach based on trace-based program synthesis. This method tracks the origin of constants within the program and establishes value-trace equations with the manipulated output. These equations are subsequently solved using a constraint solver. As mentioned by the author:“Our approach utilizes heuristics to automatically resolve ambiguities, aiming to achieve a balance between interactivity and predictability.” For instance, consider the value-trace equation . This equation can be solved by arbitrarily altering the value of either or .
Bidirectional Evaluation [7], Bidirectional Preview [23], and BiOOP [24], typically, introduce a backward update evaluation that propagates the updated output value to program constants by retracing the forward evaluation steps. Sketch-n-Sketch [6] provides semi-automated SVG programming via direct manipulation, and it is developed to further provide full output-directed programming for SVG [8]. During which, a freeze annotation, written !, is introduced to tell Sketch-n-Sketch not to change those constants marked by ! when shapes are moved on the canvas. The freeze operator is formally defined in the
The motivation for introducing the keyword
Let us assume that the output of the Sketch-n-Sketch program on the left, shown in Listing 3, represents the value of
| Listing 3. Sketch-n-Sketch. |
| |
| Listing 4. FuseSVG. |
| |
FuseDM [9] adopts an operation-based approach that propagates deltas. This method can modify not only constant literals in programs but also alter program structures by integrating direct manipulations into the ‘proper position’. FuseDM has the same ambiguity issue as the state-based approaches. The application rules for fusing delta into addition expression
6.3. Constraints on View
There are scenarios such that an output may include derived values that are calculated from other components of the output, necessitating that the output be consistently updated. For instance, if a rectangle’s width is twice as its height, the width is determined based on the height. The dependency problem on the output is discussed in the putback-based bidirectional transformation language BiGUL [25,26]; since in bidirectional transformation the output is the view, it is called view dependency. A constructor named accepts an additional function to describe the relation of two view elements. During backward transformation, the function is computed to check whether the two elements are consistent with the relation.
Several visual design systems [27,28,29,30] integrate constraint specification. Apparatus [30] is a hybrid graphics editor and programming environment, which is used for creating interactive diagrams. Upon drawing a rectangle, one can utilize arithmetic expressions to define the value of the attributes. For instance,
7. Conclusions
This paper presents a bidirectional live programming tool for SVG manipulation, which is capable of controlling the updatability of expressions by marking them with the
Looking ahead, there are two potential areas for improvement. Firstly, although the relation can currently be constructed in the output, it is directly fused into the source program. A more efficient approach would be to store the relation in the output as well. This would allow for the corresponding update of a related element when one element changes, ensuring the consistency of relations in both the program and the output. Secondly, the task of inferring the inherent relations programmed in the source to the output needs to be addressed. Additionally, the delta language could potentially be extended to incorporate recursive drawing [31]. This technique, which employs recursive algorithms to generate complex, often fractal-like, graphics, could significantly enhance the versatility and expressiveness of the delta language in graphical representation.
Conceptualization, T.Z., X.H. and Z.H.; methodology, T.Z., X.Z., X.H. and Z.H.; software, T.Z. and X.Z.; validation, T.Z., X.Z. and X.H.; investigation, T.Z., X.Z. and X.H.; writing–original draft preparation, T.Z., X.Z. and X.H.; writing–review and editing, T.Z., X.Z., X.H. and Z.H. All authors have read and agreed to the published version of the manuscript.
Not applicable.
Not applicable.
Data are contained within the article.
The authors declare no conflicts of interest.
Footnotes
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Detailed explanation of P-App3 with an example.
| Detail | Example | |
|---|---|---|
| 1 | Evaluate | |
| 2 | Evaluate | |
| 3 | Fuse the delta | |
| 4 | Construct the function closure | |
| 5 | Fuse the modified function closure into | |
| 6 | Fuse the delta | |
| 7 | Merge environments and solve conflicts. | |
Analysis of benchmarks.
| ID | Example | Multiple Update Choice | Immutability for Single Value | Number of Relations |
|---|---|---|---|---|
| 1 | Precision Floor Plan | ✓ | ✓ | 3 |
| 2 | Mondrian Arch | ✓ | ✓ | 6 |
| 3 | Balance Scale | ✓ | ✓ | 15 |
| 4 | Box Volume | ✓ | ✓ | 21 |
| 5 | Battery | ✓ | ✓ | 2 |
| 6 | Ladder | ✓ | ✓ | 10 |
| 7 | Logo | ✓ | ✓ | 6 |
| 8 | N Boxes | ✓ | ✓ | 6 |
| 9 | Ferris Wheel | ✓ | ✓ | 54 |
| 10 | Tree Branch | ✓ | ✓ | 18 |
| 11 | Target | ✓ | ✓ | 6 |
| 12 | Pencil Tip | ✓ | ✓ | 11 |
| 13 | Arrows | ✓ | ✓ | 28 |
| 14 | Rails | ✓ | ✓ | 38 |
References
1. McDirmid, S. Living it up with a live programming language. Proceedings of the 22nd Annual ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications, OOPSLA ’07; Montreal, QC, Canada, 21–25 October 2007; pp. 623-638. [DOI: https://dx.doi.org/10.1145/1297027.1297073]
2. Burckhardt, S.; Fahndrich, M.; de Halleux, P.; McDirmid, S.; Moskal, M.; Tillmann, N.; Kato, J. It’s alive! continuous feedback in UI programming. SIGPLAN Not.; 2013; 48, pp. 95-104. [DOI: https://dx.doi.org/10.1145/2499370.2462170]
3. McDirmid, S. The promise of live programming. Proceedings of the 2nd International Workshop on Live Programming, LIVE; Rome, Italy, 2016; Volume 16.
4. Chugh, R.; Hempel, B.; Spradlin, M.; Albers, J. Programmatic and direct manipulation, together at last. Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation; Santa Barbara, CA, USA, 13–17 June 2016; [DOI: https://dx.doi.org/10.1145/2908080.2908103]
5. Shneiderman. Direct Manipulation: A Step Beyond Programming Languages. Computer; 1983; 16, pp. 57-69. [DOI: https://dx.doi.org/10.1109/MC.1983.1654471]
6. Hempel, B.; Chugh, R. Semi-Automated SVG Programming via Direct Manipulation. Proceedings of the 29th Annual Symposium on User Interface Software and Technology, UIST ’16; Tokyo, Japan, 16–19 October 2016; pp. 379-390. [DOI: https://dx.doi.org/10.1145/2984511.2984575]
7. Mayer, M.; Kuncak, V.; Chugh, R. Bidirectional Evaluation with Direct Manipulation. Proc. ACM Program. Lang.; 2018; 2, pp. 1-28. [DOI: https://dx.doi.org/10.1145/3276497]
8. Hempel, B.; Lubin, J.; Chugh, R. Sketch-n-Sketch: Output-Directed Programming for SVG. Proceedings of the 32nd Annual ACM Symposium on User Interface Software and Technology, UIST ’19; New Orleans, LA, USA, 20–23 October 2019; pp. 281-292. [DOI: https://dx.doi.org/10.1145/3332165.3347925]
9. Zhang, X.; Xie, R.; Guo, G.; He, X.; Zan, T.; Hu, Z. Fusing Direct Manipulations into Functional Programs. Proc. ACM Program. Lang.; 2024; 8, pp. 1211-1238. [DOI: https://dx.doi.org/10.1145/3632883]
10. Czarnecki, K.; Foster, J.N.; Hu, Z.; Lämmel, R.; Schürr, A.; Terwilliger, J.F. Bidirectional Transformations: A Cross-Discipline Perspective. Theory and Practice of Model Transformations; Paige, R.F. Springer: Berlin/Heidelberg, Germany, 2009; pp. 260-283.
11. Foster, J.N.; Greenwald, M.B.; Moore, J.T.; Pierce, B.C.; Schmitt, A. 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 Languages, POPL ’05; Long Beach, CA, USA, 12–14 January 2005; pp. 233-246.
12. Fischer, S.; Hu, Z.; Pacheco, H. The essence of bidirectional programming. Sci. China Inf. Sci.; 2015; 58, pp. 1-21. [DOI: https://dx.doi.org/10.1007/s11432-015-5316-8]
13. Hofmann, M.; Pierce, B.; Wagner, D. Symmetric Lenses. Proceedings of the 38th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’11; Austin, TX, USA, 26–28 January 2011; pp. 371-384.
14. Ko, H.S.; Hu, Z. An Axiomatic Basis for Bidirectional Programming. Proc. ACM Program. Lang.; 2017; 2, pp. 1-29. [DOI: https://dx.doi.org/10.1145/3158129]
15. Barbosa, D.M.; Cretin, J.; Foster, N.; Greenberg, M.; Pierce, B.C. Matching Lenses: Alignment and View Update. Proceedings of the 15th ACM SIGPLAN International Conference on Functional Programming, ICFP ’10; Baltimore, MD, USA, 27–29 September 2010; pp. 193-204.
16. Hu, Z.; Mu, S.C.; Takeichi, M. A programmable editor for developing structured documents based on bidirectional transformations. High.-Order Symb. Comput.; 2008; 21, pp. 89-118. [DOI: https://dx.doi.org/10.1007/s10990-008-9025-5]
17. Zhu, Z.; Ko, H.S.; Zhang, Y.; Martins, P.; Saraiva, J.; Hu, Z. Unifying Parsing and Reflective Printing for Fully Disambiguated Grammars. New Gener. Comput.; 2020; 38, pp. 423-476. [DOI: https://dx.doi.org/10.1007/s00354-019-00082-y]
18. Hidaka, S.; Hu, Z.; Inaba, K.; Kato, H.; Matsuda, K.; Nakano, K. Bidirectionalizing Graph Transformations. Proceedings of the 15th ACM SIGPLAN International Conference on Functional Programming, ICFP ’10; Baltimore, MD, USA, 27–29 September 2010; pp. 205-216.
19. Hidaka, S.; Asada, K.; Hu, Z.; Kato, H.; Nakano, K. Structural Recursion for Querying Ordered Graphs. Proceedings of the 18th ACM SIGPLAN International Conference on Functional Programming, ICFP ’13; Boston, MA, USA, 25–27 September 2013; pp. 305-318.
20. Tran, V.D.; Kato, H.; Hu, Z. Programmable View Update Strategies on Relations. Proc. VLDB Endow.; 2020; 13, pp. 726-739. [DOI: https://dx.doi.org/10.14778/3377369.3377380]
21. Matsuda, K.; Wang, M. FliPpr: A System for Deriving Parsers from Pretty-Printers. New Gener. Comput.; 2018; 36, pp. 173-202. [DOI: https://dx.doi.org/10.1007/s00354-018-0033-7]
22. Cheney, J.; Gibbons, J.; McKinna, J.; Stevens, P. On principles of Least Change and Least Surprise for bidirectional transformations. J. Object Technol.; 2017; 16, pp. 3:1-3:31. [DOI: https://dx.doi.org/10.5381/jot.2017.16.1.a3]
23. Zhang, X.; Hu, Z. Towards Bidirectional Live Programming for Incomplete Programs. Proceedings of the 44th International Conference on Software Engineering, ICSE ’22; Pittsburgh, PA, USA, 22–27 May 2022; pp. 2154-2164. [DOI: https://dx.doi.org/10.1145/3510003.3510195]
24. Zhang, X.; Guo, G.; He, X.; Hu, Z. Bidirectional Object-Oriented Programming: Towards Programmatic and Direct Manipulation of Objects. Proc. ACM Program. Lang.; 2023; 7, pp. 230-255. [DOI: https://dx.doi.org/10.1145/3586035]
25. Ko, H.S.; Zan, T.; Hu, Z. BiGUL: A formally verified core language for putback-based bidirectional programming. Proceedings of the 2016 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation, PEPM ’16; St. Petersburg, FL, USA, 18–19 January 2016; pp. 61-72. [DOI: https://dx.doi.org/10.1145/2847538.2847544]
26. Hu, Z.; Ko, H.S. Principles and practice of bidirectional programming in BiGUL. Bidirectional Transformations: International Summer School, Oxford, UK, July 25–29, 2016, Tutorial Lectures; Springer: Cham, Switzerland, 2018; pp. 100-150.
27. Jackiw, R.N.; Finzer, W.F. The geometer’s sketchpad: Programming by geometry. Watch What I Do: Programming by Demonstration; MIT Press: Cambridge, MA, USA, 1993; pp. 293-307.
28. Xia, H.; Araujo, B.; Grossman, T.; Wigdor, D. Object-Oriented Drawing. Proceedings of the 2016 CHI Conference on Human Factors in Computing Systems, CHI ’16; San Jose, CA, USA, 7–12 May 2016; pp. 4610-4621. [DOI: https://dx.doi.org/10.1145/2858036.2858075]
29. Jacobs, J.; Gogia, S.; Mundefinedch, R.; Brandt, J.R. Supporting Expressive Procedural Art Creation through Direct Manipulation. Proceedings of the 2017 CHI Conference on Human Factors in Computing Systems, CHI ’17; Denver, CO, USA, 6–11 May 2017; pp. 6330-6341. [DOI: https://dx.doi.org/10.1145/3025453.3025927]
30. Schachman, T. Apparatus. Available online: http://aprt.us (accessed on 17 February 2025).
31. Bricault, S. Recursive Drawing. Available online: http://bricault.mit.edu/recursive-drawing (accessed on 17 February 2025).
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.