Search

US-12626054-B2 - User interface(s) related to synthesizing programs in a spreadsheet programming language

US12626054B2US 12626054 B2US12626054 B2US 12626054B2US-12626054-B2

Abstract

Techniques are described herein for automatically synthesizing programs that include one or more functions in a spreadsheet programming language. A method includes: receiving first user input in a first cell in a spreadsheet; automatically synthesizing a program using the first user input in the first cell as a first example, where the program includes at least one function in a spreadsheet programming language and, when the program is executed, the program generates output that matches the first example; determining at least one additional cell in the spreadsheet that is related to the first cell; determining that a display triggering condition is satisfied; and in response to the determining that the display triggering condition is satisfied, displaying, in each of the at least one additional cell, an output of the program corresponding to the additional cell.

Inventors

  • Rishabh Singh
  • Rahul Srinivasan
  • Simon Tong
  • Victoria Taylor
  • Vishnu Sivaji
  • Zifan Xiao
  • Aaron Zemach
  • Chiraag Galaiya
  • Dima Brezhnev
  • David Lick
  • Francisco Velasquez
  • Max Lin
  • Neha Bhargava
  • Peilun Zhang

Assignees

  • GOOGLE LLC

Dates

Publication Date
20260512
Application Date
20201215

Claims (18)

  1. 1 . A method implemented by one or more processors, the method comprising: receiving first user input in a first cell in a spreadsheet; automatically synthesizing a program using the first user input in the first cell as a first example, wherein: executing the program, that is automatically synthesized, uses fewer processing resources or memory resources than executing the first user input, the program comprises at least one function in a spreadsheet programming language that is implemented by a spreadsheet application, one or more of the at least one function in the spreadsheet programming language operate on data in another cell in the spreadsheet, and when the program is stored in association with the first cell and executed by the spreadsheet application, the program generates output that matches the first example; determining at least one additional cell in the spreadsheet that is related to the first cell; determining, based on functions in the spreadsheet programming language that are in the program that is automatically synthesized, a level of complexity of the program that is automatically synthesized; determining an additional level of complexity of the first user input; determining that a display triggering condition is satisfied, based on the level of complexity of the program that is automatically synthesized not exceeding the additional level of complexity of the first user input; in response to the determining that the display triggering condition is satisfied, displaying, in each of the at least one additional cell, an output of the program corresponding to the additional cell; and displaying the program in a formula bar in a user interface associated with the spreadsheet.
  2. 2 . The method according to claim 1 , further comprising determining a confidence score associated with the program that is automatically synthesized, wherein the determining that the display triggering condition is satisfied is further based on determining that the confidence score associated with the program that is automatically synthesized exceeds a predetermined confidence threshold.
  3. 3 . The method according to claim 2 , further comprising, in response to the confidence score associated with the program that is automatically synthesized exceeding a minimum confidence threshold but not exceeding the predetermined confidence threshold, displaying in the user interface associated with the spreadsheet an indication of availability of the program that is automatically synthesized.
  4. 4 . The method according to claim 1 , further comprising determining that a synthesizing triggering condition is satisfied, wherein the automatically synthesizing the program is performed in response to the determining that the synthesizing triggering condition is satisfied.
  5. 5 . The method according to claim 4 , wherein the determining that the synthesizing triggering condition is satisfied is based on the receiving the first user input in the first cell.
  6. 6 . The method according to claim 5 , further comprising receiving second user input in a second cell in the spreadsheet, wherein: the determining that the synthesizing triggering condition is satisfied is further based on the receiving the second user input in the second cell; the automatically synthesizing the program further comprises using the second user input in the second cell as a second example; and the program, when executed, further generates output that matches the second example.
  7. 7 . The method according to claim 1 , further comprising: receiving, from a user, an edit to the program that is displayed in the formula bar; and storing the edit to the program in association with the first cell.
  8. 8 . The method according to claim 1 , wherein the output of the program is displayed in the at least one additional cell using a font, a style, or a color that is different from the font, the style, or the color used to display the first user input in the first cell.
  9. 9 . The method according to claim 1 , further comprising: displaying a prompt in the user interface associated with the spreadsheet that requests that a user accept or reject the program; in response to the displaying the prompt, receiving an acceptance of the program from the user; and in response to the receiving the acceptance of the program from the user, replacing the first user input by storing the program in association with the first cell, and storing the program in association with each of the at least one additional cell.
  10. 10 . The method according to claim 9 , wherein the acceptance of the program is received in response to a selection of a user interface element that is included in the prompt or in response to an input of a keyboard shortcut.
  11. 11 . The method according to claim 9 , wherein: a first font appearance comprising a font, a style, and a color is used to display the user input in the first cell; prior to the receiving the acceptance of the program from the user, the output of the program is displayed in the at least one additional cell using a second font appearance that is different from the first font appearance; and subsequent to the receiving the acceptance of the program from the user, the output of the program is displayed in the first font appearance.
  12. 12 . The method according to claim 1 , further comprising: displaying a prompt in the user interface associated with the spreadsheet that requests that a user accept or reject the program; in response to the displaying the prompt, receiving a rejection of the program from the user; and in response to the receiving the rejection of the program from the user, maintaining the first user input in the first cell and stopping the displaying, in each of the at least one additional cell, the output of the program corresponding to the additional cell.
  13. 13 . The method according to claim 12 , further comprising modifying the display triggering condition in response to receiving the rejection of the program from the user.
  14. 14 . A computer program product comprising one or more non-transitory computer-readable storage media having program instructions collectively stored on the one or more non-transitory computer-readable storage media, the program instructions executable to: receive first user input in a first cell in a spreadsheet, the first user input comprising at least one function in a spreadsheet programming language that is implemented by a spreadsheet application; determine that a display triggering condition is satisfied based on (i) the receiving the first user input in the first cell, (ii) a level of complexity of the first user input in the first cell, the level of complexity being determined based on the at least one function in the spreadsheet programming language that is in the first user input, and (iii) a duration of time a user spent providing the first user input exceeding a threshold duration of time; and in response to the determining that the display triggering condition is satisfied, display a prompt in a user interface associated with the spreadsheet that provides an option to automatically synthesize a program in the spreadsheet programming language based on an example, wherein: executing the program uses fewer processing resources or memory resources than executing the first user input, the program comprises one or more functions, in the spreadsheet programming language, that operate on data in another cell in the spreadsheet, the program, when stored in association with the first cell and executed by the spreadsheet application, generates output that matches the example, and the program, upon selection of the first cell, is displayed in a formula bar in the user interface associated with the spreadsheet.
  15. 15 . The computer program product according to claim 14 , wherein the display triggering condition is further based on the level of complexity of the first user input exceeding a level of complexity of the program.
  16. 16 . The computer program product according to claim 14 , the program instructions further being executable to: in response to the displaying the prompt, receive an acceptance of the option to automatically synthesize the program; automatically synthesize the program in the spreadsheet programming language, using a result value in the first cell in the spreadsheet generated based on the first user input as the example; and in response to the receiving the acceptance, replace the first user input by storing the program in association with the first cell, wherein the acceptance of the option to automatically synthesize the program is received in response to a selection of a user interface element that is included in the prompt or in response to an input of a keyboard shortcut.
  17. 17 . A system comprising: a processor, a computer-readable memory, one or more computer-readable storage media, and program instructions collectively stored on the one or more computer-readable storage media, the program instructions executable to: receive first user input in a first cell in a spreadsheet; in response to the receiving the first user input in the first cell, determine that a display triggering condition is not satisfied, based on previous user interactions with the spreadsheet; receive second user input in a second cell in the spreadsheet; in response to the receiving the second user input in the second cell, determine that the display triggering condition is satisfied, based on the previous user interactions with the spreadsheet; automatically synthesize a program using the first user input in the first cell as a first example and the second user input in the second cell as a second example, wherein: executing the program uses fewer processing resources or memory resources than executing the first user input and/or executing the second user input, the program comprises at least one function in a spreadsheet programming language that is implemented by a spreadsheet application, one or more of the at least one function in the spreadsheet programming language operate on data in another cell in the spreadsheet, the program, when stored in association with the first cell and executed by the spreadsheet application, generates first output that matches the first example and second output that matches the second example, and the program, upon selection of the first cell, is displayed in a formula bar in a user interface associated with the spreadsheet; determine at least one additional cell that is related to the first cell and the second cell; and in response to the determining that the display triggering condition is satisfied, display, in each of the at least one additional cell, an output of the program corresponding to the additional cell.
  18. 18 . The method according to claim 1 , wherein the level of complexity of the program that is automatically synthesized is determined based on a number of the functions in the spreadsheet programming language that are in the program or based on a number of nested levels of the functions in the spreadsheet programming language that are in the program.

Description

BACKGROUND Spreadsheet applications may implement a spreadsheet programming language that includes various functions that operate on data in a cell or range of cells in a spreadsheet and/or on other inputs in order to produce various outputs. Non-limiting examples of functions in a spreadsheet programming language include sum, count, average, length, concatenate, maximum, minimum, and lookup functions. Users may manually enter data into a spreadsheet that could be obtained programmatically. For example, a user may manually enter last names into a column in a first table that could be obtained instead by using a function in a spreadsheet programming language to extract the last names from a column in a second table that stores full names. This manual approach, however, may be an inefficient use of user time and computer storage resources, as it may result in excessive data entry, client device usage, and duplication of the same data in multiple places in a spreadsheet. Additionally, when the underlying data changes in one location (e.g., a user's last name changes), the change must be manually propagated to all places in the spreadsheet where the data is used. Users who are not programmers or experienced spreadsheet application users may be unaware of or uncomfortable with using functions in the spreadsheet programming language that are usable to programmatically obtain data to populate certain cells in a spreadsheet. Additionally, users may not understand how to combine together multiple functions in the spreadsheet programming language to form a program to obtain data to populate certain cells in a spreadsheet. Other users may be able to write their own programs that use multiple functions in the spreadsheet programming language to obtain data, but the programs that they write may be inefficient solutions that require excess processing and memory resources compared to more efficient solutions for obtaining the same data. Moreover, manually crafting the programs can often take an extended amount of time (e.g., to identify appropriate function(s), for trial and error, etc.) and, as a result, can lead to excess usage of power resources and/or other computational resource(s) of a client device used in manually crafting the programs. This can be exacerbated when the client device has a relatively small display and/or a software keyboard, both of which can prolong the amount of time needed to craft the programs. SUMMARY Implementations disclosed herein relate to automatically synthesizing a program that includes at least one function in a spreadsheet programming language and that, when executed, generates output matching one or more user-provided output examples. For example, a first user input in a first cell in a spreadsheet can be used as a first example, and a program can be automatically synthesized such that the program, when executed, generates output that matches the first example. At least one additional cell in the spreadsheet that is related to the first cell can then be identified, and a determination can be made that a display triggering condition is satisfied. In response to the determination that the display triggering condition is satisfied, outputs of the program corresponding to the additional cells can then be displayed in the additional cells. In some implementations, the determining that the display triggering condition is satisfied can include determining that a level of complexity of the program that is automatically synthesized satisfies a complexity threshold. In an example, the complexity threshold can be a maximum complexity threshold, and programs that do not exceed the maximum complexity threshold, e.g., based on a number of functions or a number of levels of nested functions, can be determined to satisfy the complexity threshold. Accordingly, system resources can be conserved by avoiding using overly complex programs. In some implementations, a confidence score associated with the program that is automatically synthesized can be determined. The determining that the display triggering condition is satisfied can include determining that the confidence score associated with the program that is automatically synthesized exceeds a predetermined confidence threshold. In an example, the confidence score can be a score that indicates a level of confidence that the program that is automatically synthesized will generate correct output. In another example, the confidence score can be based on compliance of the program with coding rules or coding standards (e.g., rules related to best practices). In some implementations, in response to the confidence score associated with the program that is automatically synthesized exceeding a minimum confidence threshold but not exceeding the predetermined confidence threshold, an indication of availability of the program that is automatically synthesized can be displayed in a user interface associated with the spreadsheet. In some implementations, a determ