14. The method of claim 13 , wherein the discovering comprises, for each action in the plurality of actions: variablizing the action; exploring at least one loop anchored at the action; and deriving a set of one or more generalized program fragments from the at least one loop.
14. The method of claim 13 , wherein the discovering comprises, for each action in the plurality of actions: variablizing the action; exploring at least one loop anchored at the action; and deriving a set of one or more generalized program fragments from the at least one loop. 16. The method of claim 14 , wherein the exploring comprises: receiving a plurality of inputs, wherein the plurality of inputs comprises: a length of a body of the at least one loop, an index into the user demonstration that is associated with a start of the body of the at least one loop, a starting point index into the user demonstration, and a multimap that that maps one or more data values to one or more supports for the action; constructing the at least one loop in accordance with the plurality of inputs; executing the at least one loop for a plurality of iterations, wherein a number of the plurality of iterations is one less than a current iteration count; and forming a loop statement in accordance with variables contained in the at least one loop.