# US 2021/0263729 A1 · Bidirectional evaluation for general- purpose programming

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0263729 A1
- Document ID: US20210263729A1
- Status: Published application
- Kind: A1
- Application number: 17/227,227
- Filed: 2021-04-09
- Published: 2021-08-26
- Earliest claimed: 2018-07-27
- Assignees: The University of Chicago
- Applicants: The University of Chicago
- Inventors: Mikaël Mayer; Ravi Chugh
- Web page: https://patentgrep.com/patent/US20210263729A1

## CPC

- G06F 8/355: {Round-trip engineering}
- G06F 8/71: Version control (security arrangements therefor G06F21/57); Configuration management
- G06F 8/31: {Programming languages or programming paradigms}
- G06F 8/34: Graphical or visual programming
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method of facilitating bidirectional programming of a user may include receiving an original program source code and evaluating the original program source code in the forward direction to generate a program output. The evaluation may occur in a programming environment. The program output may be displayed, and an indication of the user corresponding to modifying the program output may be received. The modified program output may be evaluated to generate an updated program source code, wherein the updated program source code, when evaluated, may generate the modified program output. The modified program output may be displayed in a display device of the user. A computing system including a bidirectional programming environment may also be included.

## Claims

### Claim 1

A method of facilitating bidirectional programming of a user, comprising:
receiving, via a processor, an original program source code,
evaluating the original program source code to generate a program output,
displaying, in a first display device of the user, one or both of (i) the original program source code, and (ii) the program output,
receiving an indication of the user corresponding to modifying the program output; and
evaluating the modified program output to generate an updated program source code, wherein the updated program source code, when evaluated, generates the modified program output.

### Claim 2 (depends on 1)

The method of claim 1, wherein the original program source code includes one or more instructions encoded in a general-purpose computer programming language.

### Claim 3 (depends on 1)

The method of claim 1, wherein evaluating the original program source code to generate a program output includes generating HTML output.

### Claim 4 (depends on 1)

The method of claim 1, wherein evaluating the modified program output to generate an updated program source code includes a tail-recursive optimization, a merging closure optimization, and/or an edit difference optimization.

### Claim 5 (depends on 1)

The method of claim 1, wherein evaluating the modified program output to generate an updated program source code includes applying a user-defined lens to the modified program output.

### Claim 6 (depends on 1)

The method of claim 1, further comprising, displaying, in a second display device of the user, one or both of (i) the updated program source code, and (ii) the modified program output.

### Claim 7 (depends on 6)

The method of claim 6, wherein the user interacts with the second display device of the user to accept the modified program output.

### Claim 8 (depends on 6)

The method of claim 6, wherein the updated program source code includes a plurality of ambiguous candidate source codes, each of which, when evaluated, generate the modified program output.

### Claim 9 (depends on 8)

The method of claim 8, wherein displaying the updated program source code is based on applying a heuristic to automatically select one of the plurality of ambiguous candidate source codes.

### Claim 10

A computing device configured for bidirectional programming of textual data by a user via a graphical user interface, the computing device comprising:
a least one display device,
at least one processor,
at least one memory, including computer-readable instructions that, when executed by the at least one processor, cause the computing device to:
display, in the at least one display device, an original program source code and a program output corresponding to the evaluated original program source code,
receive, via the graphical user interface, an indication of the user corresponding to modifying the program output; and
evaluate the modified program output to generate an updated program source code.

### Claim 11 (depends on 10)

The computing device of claim 10, wherein the original program source code includes one or more instructions encoded general-purpose computer programming language.

### Claim 12 (depends on 10)

The computing device of claim 10, including further instructions that, when executed cause the computing system to:
output HTML.

### Claim 13 (depends on 10)

The computing device of claim 10, including further instructions that, when executed, cause the computing system to:
generate an updated program source code using a tail-recursive optimization, a merging closure optimization, and/or an edit difference optimization.

### Claim 14 (depends on 10)

The computing device of claim 10, including further instructions that, when executed, cause the computing system to:
apply a user-defined lens to the modified program output.

### Claim 15 (depends on 10)

The computing device of claim 10, wherein the updated program source code includes a plurality of ambiguous candidate source codes, each of which, when evaluated, generate the modified program output.

### Claim 16 (depends on 15)

The computing device of claim 15, including further instructions that, when executed, cause the computing system to:
apply a heuristic to automatically select one of the plurality of ambiguous candidate source codes.

### Claim 17 (depends on 10)

The computing device of claim 10, including further instructions that, when executed cause the computing system to:
display, in the at least one display device, one or both of (i) the updated program source code, and (ii) the modified program output.

### Claim 18 (depends on 17)

The computing device of claim 17, including further instructions that, when executed, cause the computing system to:
listen for a graphical user interface event corresponding to an action of a user, wherein the action represents the user's acceptance of the modified program output.

### Claim 19

A computing device including a computer-readable medium storing a programming environment application that, when activated, causes the computing device to:
evaluate, in a forward direction, an original program source code to generate an output,
receive, via an input device, an indication of a user, the indication affecting the state of the output,
evaluate, in a reverse direction, the output, to generate an updated program source code; and
display, in a display screen, the output and the updated program source code.

### Claim 20 (depends on 19)

The computing device as recited in claim 19, wherein the updated program source code includes a plurality of ambiguous candidate source codes, and wherein the programming environment application further causes the computing device to:
display, in the display screen, the plurality of ambiguous candidate source codes,
receive, via the input device, a selection of the user corresponding to one of the plurality of ambiguous candidate source codes; and
in response to the selection of the user, display, in the display screen, the one of the plurality of ambiguous candidate source codes.
