1. A method, performed using computing functionality, for generating subprograms that perform string manipulation tasks, comprising: receiving and storing input-output examples, the input-output examples providing input strings and corresponding output strings; based on a first program-generating constraint, generating sets of subprograms for the respective input-output examples, each subprogram configured to transform at least one input string associated with a particular input-output example to at least one output string associated with the particular input-output example; grouping the sets of subprograms into partitions, yielding at least one representative subprogram for each partition; determining whether said generating and grouping provide results that satisfy a predefined success test; and repeating said generating and grouping, as governed by a second program-generating constraint, if it is determined that said generating and grouping do not satisfy the predefined success test, the first program-generating constraint and the second program-generating constraint each governing types of expressions that are generated for use in subprograms, and the second program-generating constraint imposing greater processing complexity and allowing for a larger set of subprograms compared to the first program-generating constraint.