PatternLearning and Structure of Programs