![]() Swap Expressions Move Definition Swap DefinitionsĬreate Function from Definition Reorder ArgumentsĬreating Function by Merging Definitions Rename #LOC is non-blank lines of code in the starting program.Įxample Tool Sequence (with minimum number of transforms required) Overview of the four head-to-head and two open-ended tasks. To wrap up, users answered questions about their programming background andĮxperience using Deuce in an exit survey. Issues unrelated to Deuce, the user study proctor did not answer any Besides helping to get started and correct minor In situations where the log information was insufficient or Recorded video of the users performing the tasks, for manual inspection Our system logged user events to analyze the tutorial and tasks. Rewriting arithmetic expression definitions as an alternative way to deal with dependency Our implementation of Move Definitions also provides options for whether or not toĬollapse multiple definitions into a single tuple, and also provides support for Variables and moving dependencies) to the program to avoid these issues. Text-edits alone), the transformation makes secondary edits (alpha-renaming In cases where the intended transformation would capture variable uses or moveĭefinitions above their dependencies (errors that are easy to make when using If the target position defines a single variable, List pattern, then the selected definitions are inserted into the list. Whitespace is added or removed to match the indentation of the target If the target position is beforeĪn expression, a new let-binding is added to surround the target. The Move Definitions transformation takes a set of selected definitions and a single target position, and attempts to move theĭefinitions to the target position. Many stylistic choices about variable definitions when programming in Displaying Active Code Toolsīecause of nested scopes and simultaneous bindings ( i.e. In other settings, it may be worthwhile to consider alternative approaches Newline, then we do not expose any selection widget for before- e.įor comparison, notice how the whitespace from theįigure 3 (right) is split into two polygons,īut the whitespace from the end of line 3 to the beginning of line 4 in The space up to the first newline, if any, is dedicated toĪfter- p the remaining is for before- e. To allocate the whitespace between p and e, There is both an after- p target and a before- e target. ![]() Which will also be exposed for selection. Positions are “abstract whitespace” between items in the abstract syntax tree, In addition, there are target positions, denoted by blueĭots, before and after every definition, expression, and pattern in the program. ![]() ![]() ![]() (both at the top-level and locally via let), and branches of caseĮxpressions are surrounded in the abstract syntax by orange boxes these denoteĬode items that will be exposed for selection and deselection in the user Notice that all (sub)expressions, (sub)patterns, definitions To make the discussion of our design concrete, we choose to work withĪ small functional language called Little, defined in Figure 1.Ī Little program is a sequence of top-level definitions, the last of which isĬalled main. Structural interactions on top of familiar text-based editing. These results accord with Deuce’s aim to provide human-friendly Text-selection interface and may be faster overall once users That structural selection is preferred to a more traditional In the context of a small functional programming language.Ī controlled user study with 21 participants demonstrates (ii) a lightweight, interactive menu of potential transformations Unstructured text for subexpressions and other relevant features, and Source code that allow the user to structurally select the In particular, Deuce draws (i) clickable widgets atop the Interface that is tightly integrated within a text-based editing Refactoring environments, Deuce employs a direct manipulation We present a structure-aware code editor, called Deuce, that isĮquipped with direct manipulation capabilities for invokingĪutomated program transformations. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |