Programming by Analogy: Retrieval, Mapping, Adaptation and Generalization of Recursive Program Schemes

We present an approach to program reuse by analogical transfer based upon the notion of recursive program schemes (RPSs). RPSs are representations which capture the structure of a program and are executable (if the symbols are interpreted by operator symbols of a functional programming language). This kind of representation is extremly useful for programming by analogy. The general outline of our approach is as follows: we start with a straight-forward program (initial program) which can be seen as handsimulation for transforming a fixed input into the corresponding output value. The desired iterative (recursive) program generalizing over the fixed input (RPS) is constructed by analogical transfer of an already known RPS which is structural similar to the new programming problem. Source and target RPSs are generalized to an RPS representing the common structure of both problems. Target RPS and generalized RPS are stored in memory with the generalized RPS as parent to source and target. By building a hierachical memory of generalized RPSs we can use programs as well as abstract schemes as sources. In this paper we present our approach to retrieval from and stepwise construction of an hierarchical memory and an algorithm and first results for adaptation of isomorphical and non-isomorphical sources.

[1]  Gerhard Weber,et al.  Episodic Learner Modeling , 1996, Cogn. Sci..

[2]  Phillip D. Summers,et al.  A Methodology for LISP Program Construction from Examples , 1977, J. ACM.

[3]  Irène Guessarian,et al.  Program Transformations and Algebraic Semantics , 1979, Theor. Comput. Sci..

[4]  Ute Schmid,et al.  Programmieren durch analoges Schließen , 1997, Kognitionswissenschaft.

[5]  Bruno Courcelle,et al.  The Algebraic Semantics of Recursive Program Schemes , 1978, MFCS.

[6]  Erica Melis,et al.  Beweisen durch Analogie , 1997, Kognitionswissenschaft.

[7]  Jon Whittle,et al.  External Analogy in Inductive Theorem Proving , 1997, KI.

[8]  Fritz Wysotzki,et al.  Induction of Recursive Program Schemes , 1998, ECML.

[9]  Sylvia Weber Russell The Structure-Mapping Engine: Algorithm and Examples (Book) , 1992 .

[10]  Stephen Muggleton,et al.  Efficient Induction of Logic Programs , 1990, ALT.

[11]  Shin-Yee Lu A Tree-to-Tree Distance and Its Application to Cluster Analysis , 1979, IEEE Transactions on Pattern Analysis and Machine Intelligence.

[12]  John E. Hummel,et al.  Distributed representations of structure: A theory of analogical access and mapping. , 1997 .

[13]  Paul Thagard,et al.  Analogical Mapping by Constraint Satisfaction , 1989, Cogn. Sci..

[14]  K. Holyoak,et al.  Mathematical problem solving by analogy. , 1991, Journal of experimental psychology. Learning, memory, and cognition.

[15]  Dedre Gentner,et al.  Structure-Mapping: A Theoretical Framework for Analogy , 1983, Cogn. Sci..

[16]  Jaime G. Carbonell,et al.  Derivational Analogy in PRODIGY: Automating Case Acquisition, Storage, and Utilization , 1993, Machine Learning.

[17]  Fritz Wysotzki,et al.  Skill acquisition can be regarded as program synthesis: An integrative approach to learning by doing and learning by analogy , 1998 .

[18]  P. Pirolli,et al.  The role of learning from examples in the acquisition of recursive programming skills. , 1985 .

[19]  Fritz Wysotzki Representation and Induction of Infinite Concepts and Recursive Action Sequences , 1983, IJCAI.

[20]  Gordon Plotkin,et al.  A Note on Inductive Generalization , 2008 .

[21]  John R. Anderson,et al.  Use of analogy in a production system architecture , 1989 .

[22]  P.G. Selfridge,et al.  Knowledge-based software engineering , 1992, IEEE Expert.

[23]  Makoto Haraguchi,et al.  Analogical Logic Program Synthesis from Examples , 1995, ECML.