We present an approach to folding of finite program terms based on the detection of recurrence relations in a single given
term which is considered as the kth unfolding of an unknown recursive program. Our approach goes beyond Summers’ classical approach in several aspects: It
is language independent and works for terms belonging to an arbitrary term algebra; it allows induction of sets of recursive equations which are in some arbitrary ‘calls’ relation; induced equations can be dependent on more than one
input parameters and we can detect interdependencies of variable substitutions in recursive calls; the given input terms can
represent incomplete unfoldings of an hypothetical recursive program.
Keywords Inductive program synthesis - folding - recursive program schemes
Topics Symbolic computations and machine learning - term rewriting