主权项 |
1. A method, performed using at least one computing device, for generating a program that performs a data manipulation task, comprising: receiving input-output examples, the input-output examples providing input text-strings and corresponding output text-strings, each corresponding output text-string representing a transformation performed on a respective input text-string; analyzing the input-output examples to generate sets of subprograms for the respective input-output examples, each subprogram configured to transform an input text-string associated with a particular input-output example to an output text-string associated with the particular input-output example, wherein said generating comprises generating a set of subprograms for the particular input-output example by identifying occurrences of string items in the input text-string that match respective string items in the output text-string to provide matching results, and providing the set of subprograms that map the input text-string to the output text-string using the matching results and constant strings; grouping the sets of subprograms into partitions, and selecting representative subprograms from the respective partitions; determining selection conditions for the respective partitions, each selection condition covering input text-strings associated with a particular partition while excluding input text-strings associated with other partitions; and providing a created program based on the selection conditions together with the representative subprograms. |