Programming by Example Using Least General Generalizations